recon14192 Posted June 9, 2017 Share Posted June 9, 2017 I am trying to make an object that when it is activated by the player it changes the facial hair of the player. I've been trying to do this to figure out how the ChangeHeadPart command works, and I have been unsuccessful. The following is what I have so far for the source. Scriptname ChangeHair extends ObjectReference Native Hidden Function ChangeHeadPart(headpart apHeadPart, bool abRemovePart = false, bool abRemoveExtraParts = false) native Event OnActivate(ObjectReference akActionRef)ActorToChange.ChangeHeadPart(BigBeard06)EndEvent I get the following three errors: (6,1): variable ActorToChange is undefined(6,30): variable BigBeard06 is undefined(6,15): none is not a known user-defined script type I see where the errors point, but I'm not understanding what is wrong because I pulled the pieces of it straight from the wiki. I'm doing this as an initial test to try and learn and understand the ChangeHeadPart script with the end goal of using that command with an in game timer to change the player's hair after a set time. This is my first attempt at a mod. I have had basic C, but I have never used Papyrus. Any help, tips, or recommendations are appreciated. Link to comment Share on other sites More sharing options...
shavkacagarikia Posted June 9, 2017 Share Posted June 9, 2017 (edited) Compiler doesn't know who that ActorToChange is and which headpart is that BigBeard06. You must define properties with that names and then fill them with needed Actor and Headpart.But For your case, ActorToChange will be player, so you don't need to define it's property and can just call: Game.getplayer().changeHeadPart(BigBeard06). But you will need to define property BigBeard06. For this write this at the beginning of your script:ÃÂ headpart property BigBeard06 AutoThen compile, save, go to pproperties and point that to needed head part. Final script should be something like this: Scriptname ChangeHair extends ObjectReference Native Hidden Headpart property BigBeard06 Auto Event OnActivate(ObjectReference akActionRef) Game.getplayer().ChangeHeadPart(BigBeard06) EndEvent Edited June 9, 2017 by shavkacagarikia Link to comment Share on other sites More sharing options...
recon14192 Posted June 9, 2017 Author Share Posted June 9, 2017 Compiler doesn't know who that ActorToChange is and which headpart is that BigBeard06. You must define properties with that names and then fill them with needed Actor and Headpart.But For your case, ActorToChange will be player, so you don't need to define it's property and can just call: Game.getplayer().changeHeadPart(BigBeard06). But you will need to define property BigBeard06. For this write this at the beginning of your script:ÃÂ headpart property BigBeard06 AutoThen compile, save, go to pproperties and point that to needed head part. Final script should be something like this: Scriptname ChangeHair extends ObjectReference Native Hidden Headpart property BigBeard06 Auto Event OnActivate(ObjectReference akActionRef) Game.getplayer().ChangeHeadPart(BigBeard06) EndEvent Thanks for the help I really appreciate it. Link to comment Share on other sites More sharing options...
Recommended Posts