GetPCDetectionState

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Returns an integer representing the Player character's current detection state.

Possible return values and their meaning:

-1	N/A (Main Menu / Load Screen)
 0	HIDDEN
 1	CAUTION
 2	DETECTED
 3	DANGER

Note that the player does not have to be sneaking/crouched for this function to return results such as "HIDDEN".

Syntax

[help]
(detectionState:int) GetPCDetectionState

Example

set iDetectionState to GetPCDetectionState 

Notes

  • May not return the expected value if OnFire is used and the calling actor is hidden, the detection state might not be updated immediatly after the weapon is fired and the block is triggered, so it's best to use CallAfterFrames to check a few frames later so that GetPCDetectionState will return an expected value.

See Also