GetDetected
From GECK
Link to TES4 Construction Set Wiki: GetDetected.
A function included in the GECK for Fallout 3.
Contents
Description
Returns 1 if the target Reference is currently detected by the calling Actor. In other words, checks if the calling actor detects the target reference.
This function can be used either in a script, or as a Condition.
Syntax
[Actor].GetDetected TargetID:reference
Example
BuddyRef.GetDetected player
Returns 1 if Buddy can detect the player, and 0 otherwise.
Notes
- This function can still return true even if the actor is dead. This is because the detection value does not seem to update when the actor is dead, unless the area is re-loaded.
- When called from console, will print two values instead of the function result. The first is the detection value between -100 and 100, the second is the light amount.
- 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 GetDetected will return an expected value.