Difference between revisions of "MessageBox Tutorial"

Jump to navigation Jump to search
250 bytes added ,  02:50, 29 August 2007
→‎Multiple Menus in a Spell Script: updating script to recast if choice isnt completed
imported>Haama
imported>ShadowDancer
(→‎Multiple Menus in a Spell Script: updating script to recast if choice isnt completed)
<pre>Short Choosing
Short Choice
Ref TargetRef
 
 
 
Begin SpellEffectStart
Set TargetRef to GetSelf
if MenuVariables.Choosing
Set Choosing to MenuVariables.Choosing
set MenuVariables.Choosing to Choosing
set MenuVariables.Choice to Choice
playerTargetRef.Cast Spell TargetRef
endif
end</pre>
* 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.
* Spell using the script must have a '''Range''' of ''Self''
* ''Spell'' in the above script (TargetRef.Cast ''Spell'' TargetRef) must be replaced with '''Spell ID''' of the Spell using the script
 
==Extras==
Anonymous user

Navigation menu