Welcome to the Creatures Wiki! Log in and join the community.

Editing CALL

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
'''CALL''' is a [[Docking Station]]-only [[CAOS]] command.  It is used in the [[Empathic Vendor]] and mini empathic vendor in the push and pull script to randomise what is vended when a creature uses it, and it is used in the large DS teleporter in the [[Workshop]] to randomise the location when a creature uses it.
+
'''CALL''' is a [[Docking Station]]-only [[CAOS]] command.  It is used in the [[Empathic Vendor]] and mini empathic vendor in the push and pull script to randomise what is vended when a creature uses it, and used in the large DS teleporter in the [[Workshop]] to randomise the location when a creature uses it.
  
 
Syntax: ''CALL (command) EVENT_NO (integer) PARAM_1 (anything) PARAM_2 (anything)''
 
Syntax: ''CALL (command) EVENT_NO (integer) PARAM_1 (anything) PARAM_2 (anything)''
  
Calls a [[subroutine]] script on the [[OWNR|owner]] with the specified [[script number|event number]]. When that script finishes, the current script is resumed. No [[variable]]s are shared between the two scripts, so any return values must go through [[Object Variables|OVs]]. The called script starts in the same [[INST]] state as the calling script; however, it may use [[SLOW]] or INST to override this initial state. In addition, when the script returns to the calling script, the INST state is reset to what it was before the CALL command, so CALL preserves INSTness in the calling script. So if the caller script is in an INST, then the called script will inherit that; any change in the called script to cancel this (such as [[OVER]], [[WAIT]], SLOW etc) will only affect the called script... when execution returns to the caller script, it will still be in whatever state it was in before.
+
Calls a [[subroutine]] script on the [[OWNR|owner]] with the specified [[event number]]. When that script finishes the current script is resumed. No [[variable]]s are shared between the two scripts so any return values must go through [[Object Variables|OVs]]. The called script starts in the same [[INST]] state as the calling script, however, it may use [[SLOW]] or INST to override this initial state. In addition, when the script returns to the calling script, the INST state is reset to what it was before the CALL command, so CALL preserves INSTness in the calling script. So if the caller script is in an INST then the called script will inherit that, any change in the called script to cancel this (such as [[OVER]], [[WAIT]], SLOW etc) will only affect the called script... when execution returns to the caller script it will still be in whatever state it was in before.
  
 
==See also==
 
==See also==

All contributions to Creatures Wiki are considered to be released under the CC-BY-SA and GFDL (see Creatures Wiki:Copyrights for details).

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)