EVENTS

From SphereWiki
Revision as of 20:42, 11 June 2009 by MrSugarCube (talk | contribs) (Created page with 'An EVENTS definition contains a set of trigger scripts which can be attached to characters. There are different properties that can be used to attach an event block to a characte...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

An EVENTS definition contains a set of trigger scripts which can be attached to characters. There are different properties that can be used to attach an event block to a character or set of characters:


The syntax for defining an event is:


[EVENTS defname]
ON=trigger_name
    script

ON=trigger_name
    script


Any number of triggers can be handled by one EVENTS definition, however it is not possible to handle the same trigger twice without using multiple definitions.


The trigger name can be the name of any character trigger. The return value from the script can affect Sphere's hardcoded behaviour in different ways. See the documentation for the trigger to discover what parameters are passed in to each trigger and what the return values do.