GetPathLength
Category: Landscape
Since engine version: 5.1 OC
Description
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 nil
if no path was found.
Syntax
int GetPathLength(int startx, int starty, int endx, int endy);
Parameters
- startx:
X coordinate of starting position. Always global coordinate.
- starty:
Y coordinate of starting position. Always global coordinate.
- endx:
X coordinate of end position. Always global coordinate.
- endy:
Y coordinate of end position. Always global coordinate.
Example
PeterW, 2002-04