Findnearactor: Difference between revisions
Jump to navigation
Jump to search
m Categories |
m Oops. |
||
Line 5: | Line 5: | ||
By getting the actor ID of a nearby actor, the current actor can use [[getactor]]/[[setactor]] to edit the properties of the target actor or [[getangle]] to face the target actor, among other potential uses. | By getting the actor ID of a nearby actor, the current actor can use [[getactor]]/[[setactor]] to edit the properties of the target actor or [[getangle]] to face the target actor, among other potential uses. | ||
[[Category: | [[Category:EDuke specific commands]] | ||
[[Category:Gamevar manipulation]] | [[Category:Gamevar manipulation]] |
Revision as of 05:46, 7 September 2006
findnearactor <actor> <distance> <gamevar>
Gets the actor ID of the closest <actor> within <distance> into a <gamevar>. If no actor within range is found, the gamevar is set to -1. The input for <actor> may be its tile number (example: 2000) or its defined name (example: PIGCOP). The <distance> will be determined on the x and y plane only; for finding actors on the x, y, and z axes use findnearactor3d instead.
By getting the actor ID of a nearby actor, the current actor can use getactor/setactor to edit the properties of the target actor or getangle to face the target actor, among other potential uses.