Findnearsprite: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Herejex (talk | contribs)
No edit summary
No edit summary
Line 5: Line 5:
Note that findnearsprite and friends work just like findnearactor and friends, except that the sprite commands will find sprites of any statnum, including sleeping actors and sprites that are not actors.
Note that findnearsprite and friends work just like findnearactor and friends, except that the sprite commands will find sprites of any statnum, including sleeping actors and sprites that are not actors.


See also [[findnearactor]].
Also see [[findnearactor]].
[[Category:EDuke commands]]
[[Category:EDuke commands]]
[[Category:Sprite manipulation]]
[[Category:Sprite manipulation]]

Revision as of 05:35, 12 March 2009

findnearsprite <tile number> <distance> <gamevar>

Gets the actor ID of the closest sprite of with a picnum of <tile number> within <distance> into a <gamevar>. If no sprite within range is found, the gamevar is set to -1. The input for <tile number> 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 sprites on the x, y, and z axes use findnearsprite3d instead.

Note that findnearsprite and friends work just like findnearactor and friends, except that the sprite commands will find sprites of any statnum, including sleeping actors and sprites that are not actors.

Also see findnearactor.