Makes a trigger execution sleep for a given duration. The thread will yield so other threads can do their work.
This works only in a trigger action execution context, not in trigger conditions nor for example in timer functions or
ForGroupfunctions. However, it also works in
ExecuteFunccontexts, even if the
ExecuteFunccall is not in a trigger action execution context.
This has many implications, see other trigger-related natives.
This ticks while the game was paused with the
PauseGamenative, unlike timers.
This does not tick while the game was paused by the user, neither in singleplayer nor in multiplayer. (But the Trigger Editor of the World Editor denotes it as a real-time wait. Is this a bug?)
This ticks independently from game speed, i.e., in Fast mode, it will be about the same as a game time, in Normal mode, it will be about 25% faster than game time and in Slow mode, it will be about 67% faster than game time, see table below.
Game speed TSA speed (%) game speed (%) Fast 100% 100% Normal 100% 80% Slow 100% 60%
Example elapsed game time after TSA with timeout = 30:
Game speed game time elapsed Fast 30s Normal 24s Slow 18s
- return type
- Source code
native TriggerSleepAction takes real timeout returns nothing