IsDetectedBy - Actor

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: Actor Script

Is this actor currently detected by the other one?

Syntax[edit | edit source]

bool Function IsDetectedBy(Actor akOther) native

Parameters[edit | edit source]

  • akOther: The actor who may have detected us.

Return Value[edit | edit source]

Whether this actor is currently detected by the other one or not.

Examples[edit | edit source]

; Is the player detected by Nate?
bool nateSeesUs = Game.GetPlayer().IsDetectedBy(Nate)

Notes[edit | edit source]

For an actor that isn’t hostile (ie wouldn’t attack the other), the first time you “poke” an actor asking about his detection, it essentially “wakes up” detection running on that actor but doesn’t actually check until the next time you poke him for detection. If you don’t poke him fast enough the second time, you’ll just “wake him up" again.

If you do it every second it should work.

See Also[edit | edit source]