Dist: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
'''dist''' <GAMEVAR> <SPRITE1> <SPRITE2>
'''dist''' <[[gamevar]]> <[[sprite id|sprite1]]> <[[sprite id|sprite2]]>


Used to return the 3D distance between SPRITE1 and SPRITE2 into GAMEVAR.
Used to calculate the 3D distance between <[[sprite id|sprite1]]> and <[[sprite id|sprite2]]>.


GAMEVAR 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 <[[sprite id|sprite1]]> and <[[sprite id|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:15, 2 March 2011

dist <gamevar> <sprite1> <sprite2>

Used to calculate the 3D distance between <sprite1> and <sprite2>.

<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.