What I want to accomplish is the attacker to receive the damage from using these spells against me. So far only the opposite has happened, and the result is me being killed by my own script. I think my problem lies with the targeting variables? I don't quite understand that part yet..
Scriptname FrostFxScript extends activemagiceffect ;This entire spell currently adds 10 second shader to the player, in addition to having the ability to reflect spells.;============/;PROPERTIES;============/EffectShader Property AtronachFrostFXS auto; This will not add the Frost Atronach's shader, I didn't feel like changing the name. Instead it uses GhostEtherealFXSpell property IceStrike auto ; Spell - Icy SpikeSpell property IceStorm auto ; Spell - Ice StormSpell property IceSpear auto ; Spell - Icy Spear;============/;VARIABLES;============/Actor TargetActorActor CasterActor;============/;EVENTS;============/Event OnEffectStart(Actor Target, Actor Caster) TargetActor = Target CasterActor = Caster AtronachFrostFXS.Play(caster)EndEvent ; This block adds the shader effect to the player.Event OnHit(ObjectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack,bool abBashAttack, bool abHitBlocked) if IceStrike (akAggressor as Actor).DamageAV("health", 50) endif if IceStorm (akAggressor as Actor).DamageAV("health", 50) endif if IceSpear (akAggressor as Actor).DamageAV("health", 50) ;Random value I chose. ;In order for the attacker, the one who is attacking you to receive any damage or detrimental change, The actor has be to be the aggressor as per the above functions. endifEndEvent ; This block defines how much damage the target recieves from the three spells specified from the properties.Event OnEffectFinish(Actor Target, Actor Caster) CasterActor = Caster AtronachFrostFXS.Stop(caster)EndEvent ; The ending block from the first event.