get current camera mode

Post » Mon Jun 18, 2012 6:08 am

Is there a way to detect the current camera mode?
The camera's mode can be forced with Game.ForceFirstPerson () and Game.ForceThirdPerson ().
But there doesn't seem to be a way to detect what the camera is currently set at.
User avatar
Rachel Briere
 
Posts: 3438
Joined: Thu Dec 28, 2006 9:09 am

Post » Mon Jun 18, 2012 9:37 am

You can use IsPC1stPerson, it returns 1 if the player's in 1st person, and 0 otherwise.
User avatar
Gaelle Courant
 
Posts: 3465
Joined: Fri Apr 06, 2007 11:06 pm

Post » Mon Jun 18, 2012 1:17 pm

Cool! Thanks Poulpe_38!

Edit:

That's not in the Scripting Reference for some reason - Maybe because it's a Console Command.
Hopefully Console Commands work in Papyrus scripts.

Next question: Is there a way to get the distance of the camera from the player's 3rd-person view?
And Is there's a way to set that distance?
User avatar
Mistress trades Melissa
 
Posts: 3464
Joined: Mon Jun 19, 2006 9:28 pm

Post » Mon Jun 18, 2012 3:05 pm

Hopefully Console Commands work in Papyrus scripts.
Unfortunately not.

Next question: Is there a way to get the distance of the camera from the player's 3rd-person view?
And Is there's a way to set that distance?
It's a little ugly, but maybe you can use http://www.creationkit.com/MoveToNode_-_ObjectReference to put an object at the camera node. (Is that still a node?)
User avatar
Taylah Haines
 
Posts: 3439
Joined: Tue Feb 13, 2007 3:10 am

Post » Mon Jun 18, 2012 3:32 pm

That's not in the Scripting Reference for some reason - Maybe because it's a Console Command.
Hopefully Console Commands work in Papyrus scripts.

I just saw that, it was present in GECK (fallout editor), but got removed apparently.

I'm not sur if there is a way now to detect the Player's PoV via Papyrus scripts, unfortunately.
User avatar
Alex Vincent
 
Posts: 3514
Joined: Thu Jun 28, 2007 9:31 pm

Post » Mon Jun 18, 2012 11:25 am

You can query an animation variable:
Game.GetPlayer().GetAnimationVariableInt("i1stPerson") as bool
Use it in conditionals or assign to a bool variable.
User avatar
NO suckers In Here
 
Posts: 3449
Joined: Thu Jul 13, 2006 2:05 am


Return to V - Skyrim