Difference between revisions of "Scripting Tutorial: My Second Script"
→Scripting tutorial: adding the trap
imported>Jeepcreep |
imported>Jeepcreep |
||
|
MessageBox "Your answer was wrong."
Cast Mg05FingerSpell15 Player
Set controlvar to
EndIf</pre>
Note the use of the [[Cast]] function. (Advanced scripting information: Cast requires a calling object to work. We did not include one in our script because it is an Object script, and will be attached to an object in the game. The script will therefore default to the attached object when functions require a calling object.)
| |||