Re: Zone help
Posted: Wed Feb 25, 2015 11:59 pm
The code you are modifying is using the word "zone" incorrectly. Those 2 dimensional coordinates are actually spawn points for the drones, and nothing more. In this case, the 3rd coordinate defined later, using getLOSInfo to find the height of the terrain at the 2 dimensional location. Once the bots are spawned, they can go where ever they are programmed to go.
When using 2 dimensional coordinates, I recommend using waypoints, instead of world coordinates.
For instance, WaypointToWorld("512 512") will always be dead center of the command map. WaypointToWorld("0 0") will always be the southwest corner of the command map. Etc...
AI follow a path comprised of 3d world coordinates, but they ignore the z coordinate. If you knock a bot off of the catwalks in botpractice MK III, they'll continue running around their circles back and forth on the ground floor.
This is the command that builds a bot's path:
The first argument is the name of the bot. It needs to be unique or you'll be instructing multiple bots simultaneously.
The second argument is the position (again, they'll ignore the z coordinate and run to the x and y).
Last is the order number (0-100).
There are 2 path types. linear, (0-100, then 100-0, then 0-100, etc...) or circular (0-100. then 0-100, then 0-100, etc...).
If you continuously assign order number 0, it will move on command rather than predetermined paths.
Bottom line, AI don't care about boundaries... They care about paths.
When using 2 dimensional coordinates, I recommend using waypoints, instead of world coordinates.
For instance, WaypointToWorld("512 512") will always be dead center of the command map. WaypointToWorld("0 0") will always be the southwest corner of the command map. Etc...
AI follow a path comprised of 3d world coordinates, but they ignore the z coordinate. If you knock a bot off of the catwalks in botpractice MK III, they'll continue running around their circles back and forth on the ground floor.
This is the command that builds a bot's path:
Code: Select all
AI::DirectiveWaypoint( %aiName, %position, %orderNumber );
The second argument is the position (again, they'll ignore the z coordinate and run to the x and y).
Last is the order number (0-100).
There are 2 path types. linear, (0-100, then 100-0, then 0-100, etc...) or circular (0-100. then 0-100, then 0-100, etc...).
If you continuously assign order number 0, it will move on command rather than predetermined paths.
Bottom line, AI don't care about boundaries... They care about paths.