Wait - Utility

From the CreationKit Wiki
(Redirected from Wait (Papyrus))
Jump to navigation Jump to search

Member of: Utility Script

Pauses the script for at least the specified amount of real-world time. This function is latent. Unlike WaitMenuMode, time will not be counted while the player is in a menu.

Syntax[edit | edit source]

Function Wait(float afSeconds) native global

Parameters[edit | edit source]

  • afSeconds: How long to wait, in real-time seconds.

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; Pause our currently running stack for 5 seconds - and do not count the time spent in a menu
Utility.Wait(5.0)

Notes[edit | edit source]

  • This function is often used to wait until a currently-open menu is closed, by waiting for a small amount of time (eg 0.001 or so).
    • Crafting menus, conversations, and certain other IU "menus" do not count as menus for this purpose, since they do not pause the game. See IsInMenuMode for alternative detection methods.
  • Wait time isn't precise, based on framerate and general Papyrus system workload.
  • A wait time of 0 won't actually wait (??? check: even if in a menu?), and will just return immediately.


There is a veritable plethora of ways that scripts, actors and the PC may wait. These include:

See Also[edit | edit source]