|
|
|
|
|
catch_script_call
Response Type | script |
---|
Entities | Rooms, Mobiles, Objects |
---|
Parameters | name [, param1Name [, param2Name [, param3Name [, ... ]]]] |
---|
|
This trigger sets up a callable script which can be run by using either of the %callScript() or %usurpScript() BlobbieScript functions. The name is used to give the script an identity so that is can be selected via the %callScript() or %usurpScript() functions. The name should consist only of letters, digits or underscores. After the name you may declare the names of as many parameters as you please. The will be converted to variables in the actual script and will contain the appropriate sequential values provided in the parameter list of the %callScript() or %usurpScript() functions. The script may return a value via the return command but this will only work properly if the entire script is in a protected block and you do not do any waits. This is because this is not a true function call (which hopefully I'll have time to do later) and so the state of the system cannot be saved midway through a %callScript() or %usurpScript() function call. The following variables are intialized when the script is run (note that you can clobber these variable if you choose parameters of the same name -- which may or may not be a useful feature):
@i - Unlike the usual @i this depends on whether the script is invoked with callScript() or %usurpScript().
@caller - A pointer to the calling entity if one is available.
@owner - A pointer to the ACTUAL entity that owns the script. This may be different from @i if the script was invoked with %usurpScript(). |
|
|
|
|
|
|
|