Casting on self spells with an area
From The Elder Scrolls Construction Set Wiki
[edit] Introduction
In this article we will learn how to create a script that is used in an “on self” spell with an area. (Eg. The PushActorAway function will create some kind of shockwave around the player.) There are two scripts: the first script is used by the player self. He moves an activator above himself that will automatically cast the other spell (of the second script). If you have trouble with the “source” reference, then take a look at this page: Casting Spells From An Activator
[edit] Script 1
As I said before this script will move an activator above the player (250 units) and then cast the spell with script 2.
Scn SpellScript1
Ref source
Ref me
Begin scripteffectstart
Set me to getself
Source.moveto me 0, 0, 250
Source.cast 000Spell me
End
[edit] Script 2
This is the script for the second spell (I called it 000Spell). (It is used in the first script so if you rename it you’ll have to change the previous script to.) The second spell will only run on everybody in range of the area effect, except for the player because the effect will only run on targets who arent the player (‘!=’ means ‘is not’).
Scn SpellScript2
Ref me
Begin scripteffectstart
Set me to getself
If me != player
;place your fuctions here (Eg. Player.pushactoraway me 100)
Endif
End

