Dist: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Corrected Dist. Dist:xyz, Ldist:xy
No edit summary
Line 1: Line 1:
'''dist''' <RETURNVAR> <SPRITE1> <SPRITE2>
'''dist''' <GAMEVAR> <SPRITE1> <SPRITE2>


Used to determine the distance between two sprites.
Used to return the 3D distance between SPRITE1 and SPRITE2 into GAMEVAR.


The RETURNVAR is equal to the distance between SPRITE1 and SPRITE2. Compare with [[Ldist]], which uses only x and y coordinates.
GAMEVAR is equal to the distance between SPRITE1 and SPRITE2. Compare with [[Ldist]], which uses only x and y coordinates.
It is useful for locational damage, for example.
It is useful for locational damage, for example.


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

Revision as of 16:29, 2 March 2011

dist <GAMEVAR> <SPRITE1> <SPRITE2>

Used to return the 3D distance between SPRITE1 and SPRITE2 into GAMEVAR.

GAMEVAR is equal to the distance between SPRITE1 and SPRITE2. Compare with Ldist, which uses only x and y coordinates. It is useful for locational damage, for example.