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

CALL

From Creatures Wiki
Revision as of 23:13, 6 June 2012 by Malkin (talk | contribs) (MESG WRIT)
Jump to navigation Jump to search

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)

Calls a subroutine script on the owner with the specified event number. When that script finishes the current script is resumed. No variables are shared between the two scripts so any return values must go through 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