Difference between revisions of "MessageBox Tutorial/Spell Scripts"
MessageBox Tutorial/Spell Scripts (edit)
Revision as of 17:13, 8 December 2007
, 17:13, 8 December 2007→Notes: Interference from object's script
imported>Haama m |
imported>Haama (→Notes: Interference from object's script) |
||
Line 100: | Line 100: | ||
==Notes== | ==Notes== | ||
* This should only be used for spells cast on the player. If the target's script already uses [[GetButtonPressed]], it may interfere with this menu (see [[GetButtonPressed]] for more details). That will probably never happen for the player, but any other object is questionable. | |||
* Using multiple menus, or catching a button press with [[GetButtonPressed]] in a magic effect script requires that the spell duration be more than 0 in order for '''GetButtonPressed''' to capture the button. | * Using multiple menus, or catching a button press with [[GetButtonPressed]] in a magic effect script requires that the spell duration be more than 0 in order for '''GetButtonPressed''' to capture the button. | ||
* The [[ScriptEffectFinish]] block will always run immediately after the last running of the [[ScriptEffectUpdate]] block. Due to this, if the '''ScriptEffectUpdate''' block has a '''Return''' statement that fires at this point of the script, the '''ScriptEffectFinish''' block will not run. | * The [[ScriptEffectFinish]] block will always run immediately after the last running of the [[ScriptEffectUpdate]] block. Due to this, if the '''ScriptEffectUpdate''' block has a '''Return''' statement that fires at this point of the script, the '''ScriptEffectFinish''' block will not run. | ||
* Spell using the script must have a '''Range''' of ''Self'' | * Spell using the script must have a '''Range''' of ''Self'' | ||
* ''Spell'' in the above script (TargetRef.Cast ''Spell'' TargetRef '''and''' TargetRef.Dispel ''Spell'') must be replaced with '''Editor ID''' of the Spell using the script | * ''Spell'' in the above script (TargetRef.Cast ''Spell'' TargetRef '''and''' TargetRef.Dispel ''Spell'') must be replaced with '''Editor ID''' of the Spell using the script |