Hi, I'm working on a simple racing game, and while trying to make some collision between the AI I ran into some problems.
The problem I'm having is that sometimes the AI get stuck and stop moving. I'm still not too sure about what is happening, I'm trying to avoid that making the ai cars choose different paths along the track, so they avoid a bit of collision.
My track is set up like this, each waypoint is in fact subdivided in 3 (Waypoint object has 3 variables, number, path and taken). Number goes as usual, 1..2..3 until the track finished, path ranges from 0 to 2, 0 means inside part of the track, 1 means middle of the track and 2 means outisde.
What I'm trying to do is to make the car choose only Waypoints that aren't "taken". For some reason I'm stuck on this, I'm realy struggling trying to set it up in Construct,
something like this:
while(pickedWaypoint.taken) pick another one.
The real problem is more speficly in the AI event sheet, events 11 and 12 in case someone wants to help.
Any tips on how to make better collisions are also welcome.
Edit: Problem solved using sub picking events, 1st I pick every Waypoint with the desired number, then I pick again all the ones that aren't taken and then I pick a random one within them.