@SpellSelect

From SphereWiki
Revision as of 23:58, 19 June 2009 by MrSugarCube (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

This trigger fires when a character selects to cast a spell. It fires multiple times during the different stages of a spell being cast.


Fires on:


References

The following object references are explicitly available for this trigger:

Name Description
ARGO The source of the spell. Could be the item used to cast the spell (e.g. a wand or scroll) or the character casting the spell.
I The character casting the spell.
SRC The character casting the spell.


Arguments

The following arguments are set for this trigger. If an argument is marked as "In" then a value will be passed in to the trigger, if an argument is marked as "Out" then it can be set to a value to affect Sphere's behaviour:

Argument In/Out Description
ARGN1 IO The spell being cast.
ARGN2 IO The amount of mana needed to cast the spell.
ARGN3 I Flags representing what stage of the casting process the trigger is being used at.
Flag Meaning
01 Just a test (no reagents or mana will be consumed)
02 Display fail message if unable to cast
Spell Casting Stage Expected Flags
Spell selected for casting 01
Spell is about to start casting 03
Spell is about to finish casting 03
Spell casting finished successfully 02
Spell casting finished unsuccessfully 00


Return Values

The following return values are explicitly defined for this trigger:

Return Value Description
1 Prevents the spell from being cast.
6 Allows the spell to be cast.