This wiki is a copy of the original Oblivion CS wiki created and maintained by the UESP.net. See CSwiki:Copy Notice for more info.

Difference between revisions of "Scripting Tutorial: My Second Script"

Jump to navigation Jump to search
imported>Elster
imported>BEarish pArrot
Line 221: Line 221:
       MessageBox "Your answer was wrong."
       MessageBox "Your answer was wrong."
       Cast Mg05FingerSpell15 Player
       Cast Mg05FingerSpell15 Player
       Set controlvar to 0
       Set controlvar to -1
     EndIf</pre>
     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.)
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.)

Navigation menu