ZDoom Line Specials

82:ACS_Terminate

Name

ACS_Terminate — halts execution of a script.

Synopsis

ACS_Terminate (script, map);
ACS_Terminate (
  script,    // script to terminate
  map,       // map containing the script
);

Parameters

script
The script to terminate.
map
The map to terminate 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

This special is similar to ACS_Suspend, except that the script's execution state is not remembered. The next time you start it with ACS_Execute or ACS_ExecuteAlways, the script will restart from the beginning as if it had exited normally.

You can only use this special to terminate scripts that were started with ACS_Execute or ACS_LockedExecute. If you try to use it with a script started with ACS_ExecuteAlways, nothing will happen and the script will continue execution normally.

If the specified script is not already executing, this special does nothing. You cannot use this special to force a script to automatically terminate the next time it starts.

To terminate the current script, you should use the ACS terminate command instead.

Examples

Terminating a script on the current map

ACS_Terminate (1, 0);

Terminating a script on another map

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

ACS_Terminate (1, 3);

First Available In

Hexen

See Also

ACS_Execute | ACS_ExecuteAlways | ACS_LockedExecute | ACS_Suspend