Game Development Community

Unit trajectory traces

by Justin Woods (ESAL) · in RTS Starter Kit · 05/15/2006 (1:08 am) · 5 replies

I would like to implement a system that shows a line or trace between each unit and their next waypoint (destination). Would this be easy to do? Has it already been done? Can anyone provide me with a starting point?

I would like it to be a GUI button that allows me to turn this on and off.

#1
05/15/2006 (9:24 am)
Visible pathfinding ?

"shows a line or trace between each unit and their next waypoint "

at present the released version uses 1 destination , next means only
#2
05/31/2006 (1:36 am)
Yes, I hadn't realized this until after I had made the post. I'm having trouble finding a way to set waypoints in the style of Warcraft III.
#3
06/01/2006 (8:02 am)
Look in the source, there is a pathfinding file. You could set a list of waypoints and it could go from one to the next...?
#4
06/23/2006 (12:53 pm)
The pathfinding file is empty, unless you speak of another. The concept is simple, anyway. I want to draw a line between the unit and its destination. The best example is the way it is done in Command and Conquer: Tiberian Sun, where every single model has its own green line.
#5
06/25/2006 (7:01 am)
Right, the pathFinding.cs contains the function where the unit finds its next waypoint.

It takes %start and %goal as arguments, correct me if I'm wrong, but I think thats it.

It returns the next position for the unit as "x y z".

You could make r-click set waypoint variables and then return the first waypoint.

After it has reached the first waypoint, the function is called again, check it against the first waypoint and return the next, etc, etc.

There you go. Waypoints.