Dist: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
One (talk | contribs)
No edit summary
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''dist''' <RETURNVAR> <SPRITE1> <SPRITE2>
'''dist''' <[[gamevar]]> <[[sprite id|sprite1]]> <[[sprite id|sprite2]]>


Used to determine the distance between the bases of two actors' sprites.
Calculates the 3D distance between two sprites.


The RETURNVAR would be equal to the distance between the base of SPRITE1 and the base of SPRITE2.  It is useful for locational damage, for example.
<[[gamevar]]> is set to the distance between <[[sprite id|sprite1]]> and <[[sprite id|sprite2]]>.  It is useful for locational damage, for example.
 
Compare with [[ldist]], which uses only x and y coordinates.


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

Latest revision as of 17:18, 2 March 2011

dist <gamevar> <sprite1> <sprite2>

Calculates the 3D distance between two sprites.

<gamevar> is set to the distance between <sprite1> and <sprite2>. It is useful for locational damage, for example.

Compare with ldist, which uses only x and y coordinates.