IsDetectedBy - Actor

Member of: Actor Script

Is this actor currently detected by the other one?

SyntaxEdit

bool Function IsDetectedBy(Actor akOther) native

ParametersEdit

  • akOther: The actor who may have detected us.

Return ValueEdit

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

ExamplesEdit

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

NotesEdit

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 AlsoEdit