Findnearactor

From EDukeWiki
Revision as of 10:54, 1 March 2005 by Usurper (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

findnearactor <actor> <distance> <gamevar>

Gets the actor ID of the closest <actor> within <distance> into a <gamevar>. The input for <actor> may be its tile number (example: 2000) or its defined name (example: PIGCOP).

By getting the actor ID of a nearby actor, the current actor can use getactor to determine the properties of the target actor or getangle to face the target actor.