<RetVar/IF> is script with prio <Var/Number> on stack

Previous: infinite loop detection enabled = <Var/Number> General Commands Next: <RetVar/IF> get task ID
This page is a chapter in the book General Commands.
[skip|else] if [not]|while [not]| <RetVar/IF> = is script with prio <Var/Number> on 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.
Determines if a script of a given priority is on the call stack.
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: (check if still current)
  • 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




General Commands - Contents


Posting Permissions

Posting Permissions
  • You may not create new articles
  • You may not edit articles
  • You may not protect articles
  • You may not post comments
  • You may not post attachments
  • You may not edit your comments