Help with CastRemoteCast

Post » Tue Dec 30, 2014 7:26 am

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!
User avatar
Bee Baby
 
Posts: 3450
Joined: Sun Jun 18, 2006 4:47 am

Post » Mon Dec 29, 2014 10:03 pm

The only difference with RemoteCast is it gives you the option to place the blame on someone other that source the spell came from.

Anyway.. change (akTarget, akTarget) to (akCaster, akCaster)

User avatar
Unstoppable Judge
 
Posts: 3337
Joined: Sat Jul 29, 2006 11:22 pm


Return to V - Skyrim