Unknown
From DarkAI
AI
MAKE MEMBLOCK FROM WAYPOINTS
This command will
create a memblock containing the waypoints from the specified
container. If the memblock already exists it will first be
deleted.
The structure of the memblock is as follows:
Number
of waypoints as DWORD (4 bytes)
Number of edges as
DWORD (4 bytes)
Then for each waypoint:
X# as FLOAT
(4 bytes)
Z# as FLOAT (4 bytes)
Cost# as FLOAT (4
bytes)
Then for each edge:
First Waypoint Index as
DWORD (4 bytes)
Second Waypoint Index as DWORD (4
bytes)
Edge Cost# as FLOAT (4 bytes)
The cost for a
waypoint defines the cost of moving through that waypoint when using
it as a path, entities will attempt to avoid using higher cost
waypoints if they increase the path cost too much and an alternative
route is available. The default cost for all waypoints is 0, and must
be a positive value.
Edges reference waypoints from the
waypoint list above it, with index 0 being the first waypoint in the
list. The edge is valid from the first waypoint to the second, but
not the other way around. Therefore, if you want to define that the
edge between two waypoints can be used in both directions you must
define two edges, one going from the first waypoint to the second
waypoint and the second edge going from the second waypoint to the
first waypoint. The edge cost must always be at least the straight
line distance between the two waypoints for the path finding to work
correctly, but can be any number above this. Entities will avoid
edges with a large cost where possible preferring the least cost
path.
Syntax
AI Make Memblock From Waypoints
Memblock Number, Container Number
Parameters
Memblock
Number, The id of the memblock you want to use to store the
waypoint data.
Container Number, The id of the
container you want to use to fill the memblock.
Return
n/a