2010-08-22 13:13:17 +00:00
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
< !DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
2009-05-09 13:11:51 +00:00
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs >
<func >
<title > GetPathLength</title>
2010-08-22 13:13:17 +00:00
<category > Landscape</category>
2009-05-09 13:11:51 +00:00
<version > 4.9.1.0 GWE</version>
<syntax >
<rtype > int</rtype>
<params >
<param >
<type > int</type>
2010-03-15 22:55:14 +00:00
<name > startx</name>
2010-08-22 13:13:17 +00:00
<desc > X coordinate of starting position</desc>
2009-05-09 13:11:51 +00:00
</param>
<param >
<type > int</type>
2010-03-15 22:55:14 +00:00
<name > starty</name>
2010-08-22 13:13:17 +00:00
<desc > Y coordinate of starting position</desc>
2009-05-09 13:11:51 +00:00
</param>
<param >
<type > int</type>
2010-03-15 22:55:14 +00:00
<name > endx</name>
2010-08-22 13:13:17 +00:00
<desc > X coordinate of end position</desc>
2009-05-09 13:11:51 +00:00
</param>
<param >
<type > int</type>
2010-03-15 22:55:14 +00:00
<name > endy</name>
2010-08-22 13:13:17 +00:00
<desc > Y coordinate of end position</desc>
2009-05-09 13:11:51 +00:00
</param>
</params>
</syntax>
2010-08-22 13:13:17 +00:00
<desc > Searches for a path from start point to end point using the pathfinding algorithm as used by clonks and returns the length of the found path. Returns 0 if no path was found.</desc>
2009-05-09 13:11:51 +00:00
<examples >
<example >
<code > var iDist = GetPathLength(<funclink > GetX</funclink> (), <funclink > GetY</funclink> (), <funclink > GetX</funclink> (<funclink > FindBase</funclink> (<funclink > GetOwner</funclink> ())), <funclink > GetY</funclink> (<funclink > FindBase</funclink> (<funclink > GetOwner</funclink> ())));</code>
2010-08-22 13:13:17 +00:00
<text > Determines the distance from an object to its closest friendly base.</text>
2009-05-09 13:11:51 +00:00
</example>
</examples>
</func>
2010-08-22 13:13:17 +00:00
<author > PeterW</author> <date > 2002-04</date>
2009-05-09 13:11:51 +00:00
</funcs>