I can't seem to get spells using the Cast and RemoteCast functions to work properly. I have a spell called HitSelf that damages the caster when it's cast. I made another spell called StopHittingYourself that should force an NPC to cast HitSelf. I've tested HitSelf, and it seems to working just fine. I can't get StopHittingYourself to work, though. I'm using the following script:
Scriptname StopHittingYourselfScript extends activemagiceffect
Spell Property HitSelf auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
HitSelf.Cast(akTarget,akTarget)
EndEvent
Apparently, I can't share links, so I can't show you the specifics of the effect and spell I made in the CK, but maybe the problem is there?
Also, I know there are easier ways to damage npcs. I wrote these effects to see if I understood how to use Cast and RemoteCast, which I apparently don't. I would greatly appreciate any help!