Hello everyone! I am trying to make a scenario with AI, but the documentation, as we all know, is lacking. Since I don't know Lua at all, reading and adapting files like the airport drag-race scenario is pretty useless. What I want to know is how to set AI cars to behave like in the AI app, but only using the scenario files. For example- to make a AI car chase the player, chase another car, or follow a predefined route. I also want to know if it's possible to set an AI car in such a way, that when it reaches a checkpoint, the scenario fails- That way one can make a race scenario very easily.
With .lua pretty much ^.^ It's not that hard to set up AI, if you use the existing .lua file that we use in some scenarios. What do you want to do exactly? Make the AI drive along a path? Make it flee? Yes. In the intersection scenarios we do that.
@Nadeox1 Thanks for the response. I want to know how to set up an AI follow a path, and how to set an AI to chase the player (or another AI car). Re-using the official .lua files was what I was trying to do so far, and it didn't really work. I upload to this post an example of that. The lua file I upload is based on the JRI airport drag-race .lua. The idea is basically the same as the official drag-race, only you should race 3 opponents, on a flat road w/o bumps. The problem I witness is the scenario can't even be opened in-game. So I assume the .lua file I made is broken. If you can help me and take a look at the file, and try to locate the problem, I'll really appreciate it. The file has comments on the different stuff I edited, to make it simpler for you.
I haven't downloaded your file, but here are two things which you might find helpful: Open the console in-game for help identifying where you messed up the Lua. (~ opens the console) See this recent thread on a similar subject: http://www.beamng.com/threads/player-car-in-scenario-changing-id.29100/