Jump to content

Scripting Help: Werewolf Follower Transformations


thisisheffner

Recommended Posts

  • 3 years later...

@sp0ckrates

Either of you got this working? 4 years later? HEHE

I know it's been a LONG TIME since this article but I'm wanting to do a similar thing here.

I have an NPC/Follower who is a Redguard.

In the Actor's papyrus script box I added the script below (based on the script mentioned in this topic).

I want him/her to be able to transform into a werewolf when at a certain level of health.

Once combat is complete, and he feels safe OR when he's been a werewolf for 3 minutes I would like him/her to morph back to his original race, ie. Redguard.

I used the original script on this post for an NPC I created -- it worked for the most part however, he seems to remain as a werewolf. He will talk and you can have dialog with him -- while he's in werewolf mode. I would travel to places and he would still remain a werewolf.

 

Any help would be appreciated!

 

So this is what I have:

Although the properties are set to auto, the aforementioned results are due to me setting the following properties manually:

 

SPELL Property = WerewolfChangeFX

Actor Property = with Pick reference in render window I chose my NPC in the object window.

WerewolfChangeFX = Pick Object is set to WerewolfBeastRace

Scriptname CREATENAMEHERE extends ObjectReference  
 
SPELL Property WerewolfChangeFX  Auto
Actor Property actorproperty  Auto  
race property raceyouwant auto
 
Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
if (aeCombatState == 0)
actorproperty.setrace(raceyouwant)
unregisterforupdate()
elseif (aeCombatState == 1)
registerforupdate(3.0)
endif
endevent
 
event onupdate()
float ActorHealth2 = actorproperty.GetAV("health")
if actorhealth2 <= 200
werewolfchangefx.cast(actorproperty)
unregisterforupdate()
endif
endevent
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...