CallPersonScript
From Spheriki
Directly call one of the person's personal scripts. See SetPersonScript for the list of event scripts that can be called.
Contents |
Usage
- name identifies the name of the person.
- which determines the type of script to call.
Examples
Call a person's ON_ACTIVATE_TOUCH script under a different circumstance than if the person was actually touching anything.
//Person is not touching anything, but we want to invoke the touch script anyway...
CallPersonScript("Bob", SCRIPT_ON_ACTIVATE_TOUCH);
Notes
You usually do not need this function because the person scripts are called automatically when the appropiate event happens (the user talks, or touches something, or is destroyed etc). Only use this function if you want to invoke any of the behaviours when the conditions for the event not automatically happening are not met.
See also
- SetPersonScript(name, which, script)