spells that command npcs

Post » Mon Jul 15, 2013 10:30 pm

I am attempting to make powers the player can use to command a follower. I have not gotten to the stage where I have tested any of my work, because my computer is a toaster and this makes testing very time consuming, so I figure I'd ask for advice first. I'm not sure I'm going about this the right way.

The original thought process was that a spell cast by the player would place an effect on the follower, and a script on the follower would recognize the effect as it is applied, and then run an appropriate "commanded" function.

Here's how it came out, though:

I have a spell with a magic effect with a script that upon casting of the spell the magic effect applies to the player and the script runs to cast a spell on the follower that puts a magic effect on her. This already seems needlessly complicated. Then I have this script.

Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)    If(akEffect == SuperMoveEffect)        StarStorm.cast(Andromeda, Andromeda)    EndIfEndEvent
It appears that this event doesn't care who the effect is even cast on to begin with. Will it pick up that an effect is applied to the player after he casts on himself even if the script extends the follower? This would remove half the objects required.
Or am I going about this a completely moronic way?
User avatar
Michelle Chau
 
Posts: 3308
Joined: Sat Aug 26, 2006 4:24 am

Return to V - Skyrim