After I finished Race 2 I began to work on the final race, race 3. After I recieved the track from my team mate Kyle Williams, I added the waypoints and renamed all the Marks and it looked like this:
As soon as I finished the waypoints I began working on all the if statements and testing the AI to make sure its able to complete multiple laps without crashing, falling off the track or spinning out. Here is the if statements code:
After playtesting the game after this code was produced, the AI is quite difficult which is what I intended, race 3 as a whole is quite difficult. The AI is a little troublesome at the beginning because its likely to ram the player because it is faster than the player. However it works as intended so I am happy with it.