ACS_LockedExecute — begin execution of a script, provided the player has the right key.
ACS_LockedExecute (script, map, s_arg1, s_arg2, lock);
ACS_LockedExecute ( script, // script to execute map, // map containing the script s_arg1, // first argument passed to the script s_arg2, // second argument passed to the script lock // required key, if any );
This special's function is the same whether you activate it on a line or use it in a script.
The only difference between this special and ACS_Execute is that this special will only execute the script if the player is carrying the correct key. If the player does not have the key, a message is printed to the screen to tell him which key he needs, and the script is not executed.
Just as with ACS_Execute, if the specified script is already running, this special will not start it again unless all the running copies of the script were started with ACS_ExecuteAlways.
Unlike ACS_Execute, you must specify two parameters to pass to the script. If the script only needs one parameter, you can use zero for the second parameter. If the script does not take any parameters, you can use zero for both of them.
See the Remarks section of ACS_Execute for more details on script execution.
ACS_LockedExecute (1, 0, 0, 0, 100);
This example executes a script on a map with levelnum 3. Unless you specify otherwise in your MAPINFO, this will correspond to MAP03.
ACS_LockedExecute (1, 3, 0, 0, 100);
Hexen
ACS_Execute | ACS_ExecuteAlways | ACS_Suspend | ACS_Terminate