I am currently working with the RTS pathfinding behavior to try and accomplish a racing line to direct the AI around the tracks of a TD Racer I am working on. I have set up more than 30 points using individual sprites around the track to represent the path and am directing the ai to move from point to point determined by a private variable. The event sheet is getting way out of hand considering I am going to attempt to implement 22 ai opponents. I am thinking before I get to ahead of myself that I might want to think about making this met hod a bit simpler.
My event sheet is looking something like what you see below.
Timer is equal to 4000 - aicar01 set 'point1' to 1
+aicar01: Value 'point1' equal to 1 - add waypoint at point1
- move to point1
+aicar01: Value 'point1' equal to 2 - add waypoint at point2
- move to point2
+aicar01: Value 'point1' equal to 3 - add waypoint at point3
- move to point3
etc...etc...etc... until the ai car equals point 30 and then loops
to change the value I have set it to change when you overlap each point as to create a loop
so it looks like this.
aicar01 overlaps point1 - set point1 to 2
aicar01 overlaps point2 - set point1 to 3
aicar01 overlaps point3 - set point1 to 4
As you can see this process becomes very repetitive when having to create each cars pathfinding and I would really like to simplify this. Any suggestions?