Turning a follower into a flame atronach oncombat help!

Post » Sat Jul 07, 2012 2:56 am

I'm a all new to this, so maybe I am missing something simple. I want my follower to turn into a flame atronach during combat.

Should the value be at default? When I choose autofill, it fills in AtronachFlameRace. Regardless, neither option works.

Is it just not possible?

Spoiler


Scriptname FlameOn extends Actor

Race Property AtronachFlameRace Auto
Race ActorRace

Event OnInit()
ActorRace = GetRace()
EndEvent

Auto State Waiting
Event OnCombatStateChanged(Actor actorRef, int combatState)
GoToState("Busy")
RegisterForSingleUpdate(1)
EndEvent
EndState

State Busy
Event OnUpdate()
if (IsInCombat() && GetRace() == ActorRace)
SetRace(AtronachFlameRace)
elseif (!IsInCombat() && GetRace() == AtronachFlameRace)
SetRace(ActorRace)
else
GoToState("Waiting")
Return
endif
RegisterForSingleUpdate(1)
EndEvent
EndState

User avatar
Etta Hargrave
 
Posts: 3452
Joined: Fri Sep 01, 2006 1:27 am

Post » Fri Jul 06, 2012 5:14 pm

This should probably be in the CK forum.
Have you considered hiding the follower and summoning an atronach? They wouldn't necessarily appear in the same place, but...
User avatar
Jessica Stokes
 
Posts: 3315
Joined: Fri Jul 28, 2006 11:01 am

Post » Sat Jul 07, 2012 6:58 am

Stick a few debugs in there and make sure the functions are firing. Stick one in for each logic path so you can tell the manner in which the script is failing.

Then we'll have a better idea how to proceed.
User avatar
Ilona Neumann
 
Posts: 3308
Joined: Sat Aug 19, 2006 3:30 am


Return to V - Skyrim