Tiziano74 Posted February 13, 2022 Share Posted February 13, 2022 HiI'm creating some animation in my house and I'm looking for a way to make a script recognize whether the player's view is first or third person.What I would like to do is record the state of the view, if it's in first or third person, before the animation, force the third person view, and after the animation, if the player was playing in first person bring the game back to first person view.Does anyone know of a command or script that checks the state of the player's view, if the game is in first or third person?Thanks in advance to those who will answer! Link to comment Share on other sites More sharing options...
dylbill Posted February 13, 2022 Share Posted February 13, 2022 Hey yeah, I do something similar in one of my mods. You can do something like this: Bool FirstPerson = PlayerRef.GetAnimationVariableBool("IsFirstPerson") If FirstPerson Game.ForceThirdPerson() Endif ;play animation If FirstPerson Game.ForceFirstPerson() Endif Link to comment Share on other sites More sharing options...
Tiziano74 Posted February 15, 2022 Author Share Posted February 15, 2022 Thanks dylbill The script works perfectly, the only thing more is to add an utility wait for a number of seconds higher than the animation before returning to first person, otherwise the player remains blocked Link to comment Share on other sites More sharing options...
dylbill Posted February 16, 2022 Share Posted February 16, 2022 No problem. There's also a PlayAnimationAndWait function: https://www.creationkit.com/index.php?title=PlayAnimationAndWait_-_ObjectReference I've never used it, and read it can cause bugs though so using utility.wait is probably the better option. Link to comment Share on other sites More sharing options...
Recommended Posts