[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = Command return, will be TRUE (1) if condition passes or FALSE (0) if it fails.
<Var/Number> = Script priority to be checked
Determines if a script of a given priority is on the call stack.
The call stack is the list of scripts running in a Prio Used by given process.
Every time one script calls another, that script is added to the stack.
Scripts are also added to the stack during an interrupt or signal.
This instruction always runs on the current task – it cannot be used to determine if a script of a given priority is running under a different task ID.
Different script priorities are used for different functions.
Most notably, the different signals operate at different priorities.
This instruction is often used to determine if a particular signal has been received by a ship.
By checking to see if a script of priority 99 is on the stack, for example, a script can tell if the ship it is running on has been attacked and was in the process of fighting back against its attacker.
Table - Script Priorities:
- 0 .............. All scripts by default
50 ............ Flee response to SIGNAL_ATTACKED
99 ............ Attack response to SIGNAL_ATTACKED
100 .......... SIGNAL_ATTACKED
150 .......... SIGNAL_LEADERNEEDSHELP
??? ........... SIGNAL_FOLLOWERNEEDSHELP
200 .......... SIGNAL_FORMATIONLEADERCHANGED
300 .......... SIGNAL_CAPTURED
10000 ...... SIGNAL_KILLED
Command Location:
- »» General Commands
<RetVar/IF> = is script with prio <Var/Number> on stack