Findnearactor3dvar: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
mNo edit summary
One (talk | contribs)
No edit summary
Line 1: Line 1:
Version of [[findnearactor3d]] that takes a [[gamervar]]
'''findnearactor3dvar''' <[[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, y, and z planes; for finding actors on the x and y planes only, use [[findnearactor]] 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.


[[Category:EDuke32 specific commands]]
[[Category:EDuke32 specific commands]]
[[Category:Sprite manipulation]]
[[Category:Sprite manipulation]]

Revision as of 12:19, 4 May 2009

findnearactor3dvar <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, y, and z planes; for finding actors on the x and y planes only, use findnearactor 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.