ZDoom Line Specials

81:ACS_Suspend

Name

ACS_Suspend — temporarily halts execution of a script.

Synopsis

ACS_Suspend (script, map);
ACS_Suspend (
  script,    // script to suspend
  map,       // map containing the script
);

Parameters

script
The script to suspend.
map
The map to suspend the script on. This corresponds to the map's levelnum set in the MAPINFO lump. If you set map to zero, then the script will be suspended on the current map.

ACS

This special's function is the same whether you activate it on a line or use it in a script.

Remarks

If the script to be suspended is on the current map, its execution will cease immediately. If the script is on another map, it will not automatically resume execution when you return to that map.

If the script is not currently executing, it will be immediately suspended the next time it executes.

To resume a suspended script, execute it again with either ACS_Execute or ACS_LockedExecute. Rather than starting at the beginning, it will continue execution immediately after the point where it was suspended.

This special has no effect on scripts started with ACS_ExecuteAlways. It can only be used with ACS_Execute and ACS_LockedExecute.

Note that when you leave a map in a hub, its scripts are automatically suspended—they do not continue executing while you are on another map. Any scripts that are automatically suspended like this will automatically resume the next time you return to the map. If a script was running on a map you left, and you suspend that script on a different map by using this special, it will not automatically resume when you return to the map.

Examples

Suspending a script on the current map

ACS_Suspend (1, 0);

Suspending a script on another map

This example suspends a script on a map with levelnum 3. Unless you specify otherwise in your MAPINFO, this will correspond to MAP03.

ACS_Suspend (1, 3);

First Available In

Hexen

See Also

ACS_Execute | ACS_ExecuteAlways | ACS_LockedExecute | ACS_Terminate