Lua PathFinder: Difference between revisions
From Spring
Jump to navigationJump to search
m Font colors, 2 (used #55ee99) |
|||
| Line 5: | Line 5: | ||
number end_x, number end_y, number end_z | number end_x, number end_y, number end_z | ||
[, number radius = 8 ] | [, number radius = 8 ] | ||
) -> nil | pathObject path <font color=" | ) -> nil | pathObject path <font color="#55ee99">(see bellow)</font> | ||
== Path UserData Object == | == Path UserData Object == | ||
| Line 16: | Line 16: | ||
[3] = startIdxOfDetailedEstimatedPath2, | [3] = startIdxOfDetailedEstimatedPath2, | ||
} | } | ||
<font color=" | <font color="#55ee99">GetUnitEstimatedPath() returns 2 tables: | ||
1 table with the waypoints and 1 table with 3 indices (in the waypoint table) | 1 table with the waypoints and 1 table with 3 indices (in the waypoint table) | ||
when a new (more lazy) pathfinding algorithm begins. | when a new (more lazy) pathfinding algorithm begins. | ||
Revision as of 20:53, 27 October 2008
PathFinder
Spring.RequestPath
( string "MoveTypeName" | number moveID, number start_x, number start_y, number start_z, number end_x, number end_y, number end_z [, number radius = 8 ] ) -> nil | pathObject path (see bellow)
Path UserData Object
Path.GetEstimatedPath
( ) -> nil | {
[1] = { x,y,z }, ...
},{
[1] = startIdxOfDetailedPath,
[2] = startIdxOfDetailedEstimatedPath1,
[3] = startIdxOfDetailedEstimatedPath2,
}
GetUnitEstimatedPath() returns 2 tables:
1 table with the waypoints and 1 table with 3 indices (in the waypoint table)
when a new (more lazy) pathfinding algorithm begins.
So the waypoint table contains 3 different levels of details.
Path.Next
( number pos_x, number pos_y, number pos_z, [, number radius = 0 ] ) -> nil | number x, number y, number z