OnPlayerCameraState - Form

From the CreationKit Wiki
Jump to navigation Jump to search

SKSE Member of: Form Script

Listens for camera state changes, for this event to be received the form must have been registered previously via RegisterForCameraState.

Syntax[edit | edit source]

Event OnPlayerCameraState(int oldState, int newState)

Parameters[edit | edit source]

  • oldState - The State which the camera used to be in.
  • newState - The State the Camera is now in.

Return Value[edit | edit source]

None

Examples[edit | edit source]

Event OnInit()
	RegisterForCameraState();Register for camera states
EndEvent
 
Event OnPlayerCameraState(int oldState, int newState)
	if newState == 0
		Debug.Trace("The Camera is in First Person mode.")
	EndIf	
EndEvent

Notes[edit | edit source]

  • valid States for Camera:
    • 0 - first person
    • 1 - auto vanity
    • 2 - VATS
    • 3 - free
    • 4 - iron sights
    • 5 - furniture
    • 6 - transition
    • 7 - tweenmenu
    • 8 - third person 1
    • 9 - third person 2
    • 10 - horse
    • 11 - bleedout
    • 12 - dragon

See Also[edit | edit source]