ACS specials

80:ACS_Execute (script, map, s_arg1, s_arg2, s_arg3)

script
Script to execute
map
Map which contains the script
s_arg1
First argument passed to the script
s_arg2
Second argument passed to the script
s_arg3
Third argument passed to the script

Executes the specified script. A map value of zero indicates that the script is on the current map. If the script is on a different map, then the execution of the script will be delayed until the player enters the map that contains it. Only one copy of a script can be running at a time when started with this special.

If the specified script was previously executed but then suspended, then execution will begin at the point immediately after where it was suspended instead of starting over again at the beginning.

226:ACS_ExecuteAlways (script, map, s_arg1, s_arg2, s_arg3)

script
Script to execute
map
Map which contains the script
s_arg1
First argument passed to the script
s_arg2
Second argument passed to the script
s_arg3
Third argument passed to the script

Like ACS_Execute, this special starts a script. However, it will allow multiple instance of a script to run simultaneously. The down side is that any scripts started with this special cannot be suspended or terminated with ACS_Suspend or ACS_Terminate. This is intended to be used from inside another script only, where you want to have one script do something at the same time as a "subtask" and it doesn't matter if there are more than one script running at once.

83:ACS_LockedExecute (script, map, s_arg1, s_arg2, lock)

script
Script to execute
map
Map which contains the script
s_arg1
First argument passed to the script
s_arg2
Second argument passed to the script
lock
Required key, if any (see key types)

Executes the specified script if the player has the right key. A map value of zero indicates that the script is on the current map. If the script is on a different map, then the execution of the script will be delayed until the player enters the map that contains it. Only one copy of a script can be running at a time when started with this special.

If the specified script was previously executed but then suspended, then execution will begin at the point immediately after where it was suspended instead of starting over again at the beginning.

81:ACS_Suspend (script, map)

script
Script to suspend
map
Map which contains the script

Suspends execution of a script until an ACS_Execute or ACS_LockedExecute special starts it. If the specified script is not currently running, then it will be immediately suspended the next time it is run.

82:ACS_Terminate (script, map)

script
Script to suspend
map
Map which contains the script

Terminates execution of the specified script.