Dist: Difference between revisions

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


Calculates the 3D distance between <[[sprite id|sprite1]]> and <[[sprite id|sprite2]]>.
Calculates the 3D distance between two sprites.


<[[gamevar]]> is set to the distance between <[[sprite id|sprite1]]> and <[[sprite id|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.

Latest revision as of 16: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.