Difference between revisions of "OnPlayerCameraState - ScriptObject"

added descriptions and example
imported>Qazaaq
(added f4se member)
 
imported>Qazaaq
(added descriptions and example)
Line 3: Line 3:
{{Template:Papyrus:RequiredF4SE|version=0.3.1}}
{{Template:Papyrus:RequiredF4SE|version=0.3.1}}


Placeholder Description.
Event called when the players camera state has changed.


== Syntax ==
== Syntax ==
Line 11: Line 11:


== Parameters ==
== Parameters ==
*aiOldState: Placeholder Description.
*aiOldState: The players old camera state.
*aiNewState: Placeholder Description.
*aiNewState: The players new camera state.
 
== Camera States ==
* 0 - First Person
* 1 - Auto Vanity
* 2 - VATS
* 3 - Free
* 4 - Iron Sights
* 5 - Transition
* 6 - Tween Menu
* 7 - ThirdPerson1
* 8 - ThirdPerson2
* 9 - Furniture
* 10 - Horse
* 11 - Bleedout
* 12 - Dialogue


== Examples ==
== Examples ==
<source lang="papyrus">
<source lang="papyrus">
; Placeholder Code.
Event OnPlayerCameraState(int aiOldState, int aiNewState)
    Debug.Trace("The new state is "+aiNewState+" and the old state is "+aiOldState)
EndEvent
</source>
 
<source lang="papyrus">
Scriptname Example extends ScriptObject
 
int FirstPersonState = 0 const
int AutoVanityState = 1 const
int VATSState = 2 const
int FreeState = 3 const
int IronSightsState = 4 const
int TransitionState = 5 const
int TweenMenuState = 6 const
int ThirdPerson1State = 7 const
int ThirdPerson2State = 8 const
int FurnitureState = 9 const
int HorseState = 10 const
int BleedoutState = 11 const
int DialogueState = 12 const
 
Event OnInit()
    RegisterForCameraState()
EndEvent
 
Event OnPlayerCameraState(int aiOldState, int aiNewState)
    If (aiNewState == FirstPersonState)
        Debug.Trace("The new camera state of "+aiNewState+" is the first person state.")
    ElseIf (aiNewState == AutoVanityState)
        Debug.Trace("The new camera state of "+aiNewState+" is the auto vanity state.")
    ElseIf (aiNewState == VATSState)
        Debug.Trace("The new camera state of "+aiNewState+" is the VATS state.")
    ElseIf (aiNewState == FreeState)
        Debug.Trace("The new camera state of "+aiNewState+" is the free state.")
    ElseIf (aiNewState == IronSightsState)
        Debug.Trace("The new camera state of "+aiNewState+" is the iron sights state.")
    ElseIf (aiNewState == TransitionState)
        Debug.Trace("The new camera state of "+aiNewState+" is the transition state.")
    ElseIf (aiNewState == TweenMenuState)
        Debug.Trace("The new camera state of "+aiNewState+" is the tween menu state.")
    ElseIf (aiNewState == ThirdPerson1State)
        Debug.Trace("The new camera state of "+aiNewState+" is the third person 1 state.")
    ElseIf (aiNewState == ThirdPerson2State)
        Debug.Trace("The new camera state of "+aiNewState+" is the third person 2 state.")
    ElseIf (aiNewState == FurnitureState)
        Debug.Trace("The new camera state of "+aiNewState+" is the furniture state.")
    ElseIf (aiNewState == HorseState)
        Debug.Trace("The new camera state of "+aiNewState+" is the horse state.")
    ElseIf (aiNewState == BleedoutState)
        Debug.Trace("The new camera state of "+aiNewState+" is the bleedout state.")
    ElseIf (aiNewState == DialogueState)
        Debug.Trace("The new camera state of "+aiNewState+" is the dialogue state.")
    Else
        Debug.Trace("Something went wrong, the new camera state of "+aiNewState+" is out of range.")
    EndIf
EndEvent
 
</source>
</source>


== See Also ==
== See Also ==
*[[ScriptObject Script]]
*[[ScriptObject Script]]
*[[RegisterForCameraState - ScriptObject]]




Anonymous user