IsDetectedBy - Actor

From Creation Kit
Jump to: navigation, search

Member of: Actor Script

Is this actor currently detected by the other one?

Syntax

bool Function IsDetectedBy(Actor akOther) native

Parameters

  • akOther: The actor who may have detected us.

Return Value

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

Examples

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

Notes

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