gammons123 Posted September 27, 2019 Posted September 27, 2019 Hi, I am trying to make the player play an idle when a button is pressed. I ahve everything working except the playing an idle part... is there a trick to using PlayerREF.playidle(idlename) ? it doesn;t seem to do anything. I can play the idle from the console fine, but need to be able to start it froma script (ideally a quest script) is this possible? can anyone help me understand this? I've tried googling/searching here but I can't find any answers I understand, except that the above is working for other people. is it because its in a quest script? Thanks in advance.
gammons123 Posted September 28, 2019 Author Posted September 28, 2019 By shamelessly stealing Dagobaking's code from the Scripts for AAF I figured out something that works. I have no idea WHY it works, but that's just details... Code as follow for anyone interested. Idle Property myIdle Auto Const Actor Property PlayerRef Auto Function MakeIdleHapped() int targetActorFormID = PlayerRef.GetFormID() Actor targetActor = Game.GetForm(targetActorFormID) as Actor targetActor.PlayIdle(MyIdle) EndFunction
dagobaking Posted October 2, 2019 Posted October 2, 2019 You can't play idles by using their id names. You have to use their formID. That may be why it wasn't working before.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.