Difference between revisions of "Casting Spells From An Activator"
→The Area of Effect Spell Script
imported>GhanBuriGhan (Added to scripting tutorials cat.) |
imported>Ukgazzer |
||
Line 115: | Line 115: | ||
source.Disable | source.Disable | ||
End</pre> | End</pre> | ||
Instead of using the lines | |||
<pre> | |||
set source to me.PlaceAtMe ActivatorSource, 1, 0, 0 | |||
float height | |||
set height to me.GetPos z | |||
set height to height + 1000 | |||
source.SetPos z, height | |||
</pre> | |||
an alternative is to place an example of the activator on the map,give it a unique name (eg 'source' in this case) and check the persistent reference box- This creates a single copy of ActivatorSource in the game instead of creating new ones every time the spell is used with the placeatme command.Then replace these lines with | |||
<pre> | |||
source.moveto me,0,0,1000 | |||
</pre> | |||
==Attach the Scripts to the Spells== | ==Attach the Scripts to the Spells== |