Deleted38846565User Posted July 28, 2018 Share Posted July 28, 2018 Would anyone happen to know how to transform an NPC into a werewolf, similar to Farkas' scene in the companion's Quest? There doesn't seem to be much on this. Link to comment Share on other sites More sharing options...
Evangela Posted July 28, 2018 Share Posted July 28, 2018 (edited) Study the C01 quest which handles Farkas'(he is referred to as the Observer) transformation. The quest script contains the functions necessary for the transformation to take place. Edited July 28, 2018 by Rasikko Link to comment Share on other sites More sharing options...
SeraphimKensai Posted July 28, 2018 Share Posted July 28, 2018 A couple posts down someone was asking something similar. I developed a script that works for either the player or an NPC target that has a werewolf transformation. I'm in Mobile ATM so I can't really post code format, but here's the snippet I posted before: ;-- Properties --------------------------------------race property TargetsOriginalRace autoimagespacemodifier property ChangeFX autorace property WerewolfBeastRace auto ;-- Variables --------------------------------------- ;-- Functions ---------------------------------------function OnEffectFinish(Actor Target, Actor Caster) utility.Wait(5 as Float) ChangeFX.Apply(1.00000) Target.SetRace(TargetsOriginalRace)endFunction function OnEffectStart(Actor Target, Actor Caster) TargetsOriginalRace = Target.GetActorBase().GetRace() self.RegisterForAnimationEvent(Target as objectreference, "SetRace") utility.Wait(5 as Float) self.UnRegisterForAnimationEvent(Target as objectreference, "SetRace") Target.SetRace(WerewolfBeastRace) endIfendFunction Link to comment Share on other sites More sharing options...
ReDragon2013 Posted July 31, 2018 Share Posted July 31, 2018 Just in case someone is reading that in the future, I want to give a bit more details here. xyz_BeastTransformScript Scriptname xyz_BeastTransformScript extends ActiveMagicEffect ; Skyrim Creation Kit and Modders --> "NPC Werewolf Transformation" ; for more details see "WerewolfTransformVisual.psc", "C01QuestScript.psc" ; https://forums.nexusmods.com/index.php?/topic/6858232-npc-werewolf-transformation/ ; SeraphimKensai posted code snippets Race PROPERTY WerewolfBeastRace auto ; use autofill within CK Race PROPERTY TargetsOriginalRace auto Hidden ; race holder only ImageSpaceModifier PROPERTY ChangeFX auto ; effect to mask transformation, "WerewolfChangeFX" ;-- EVENTs -- EVENT OnEffectStart(Actor akTarget, Actor akCaster) myF_Transform(akTarget) ENDEVENT EVENT OnEffectFinish(Actor akTarget, Actor akCaster) Utility.Wait(5.0) ; wait some time before using IF ( TargetsOriginalRace ) ChangeFX.Apply(1.0) ; FX to hide race transformation akTarget.SetRace(TargetsOriginalRace) ; back to original stored race if available ENDIF ENDEVENT EVENT OnAnimationEvent(ObjectReference akSource, String asEventName) ; "Animation event, sent when an object we are listening to hits one of the events we are listening for" ; IF (asEventName == "SetRace") ; Debug.Trace("AnimationEvent 'SetRace' has been called.. " + self) ; ENDIF ENDEVENT EVENT OnAnimationEventUnregistered(ObjectReference akSource, String asEventName) ; "Event sent when you have been unregistered from receiving an animation event because the target object's animation graph has been unloaded" ; IF (asEventName == "SetRace") ; Debug.Trace("AnimationEvent 'SetRace' has been unregistered.. " + self) ; ENDIF ENDEVENT ; -- FUNCTION -- ;------------------------------------- FUNCTION myF_Transform(Actor akTarget) ;------------------------------------- TargetsOriginalRace = akTarget.GetActorBase().GetRace() ; store current race IF (TargetsOriginalRace == WerewolfBeastRace) ; already of werewolf race TargetsOriginalRace = None self.Dispel() ELSE self.RegisterForAnimationEvent(akTarget as Objectreference, "SetRace") ; OnAnimationEvent() Utility.Wait(5.0) self.UnRegisterForAnimationEvent(akTarget as Objectreference, "SetRace") ; OnAnimationEventUnregistered() akTarget.SetRace(WerewolfBeastRace) ; tranform target of magiceffect into werewolf ENDIF Link to comment Share on other sites More sharing options...
Recommended Posts