I want an AI truck to drive towards a waypoint, as achieved in the "bank robbery" scenario. I wrote a Lua file based on the robbery Lua file, and it worked. Problem is, in that scenario the robber is set to "flee" mode in the Lua file, so if overtaken by you, it will head the long way, to avoid your car. helper.setAiMode('robber', 'flee', 'scenario_player0') That is impossible for me, since I want the AI to keep going in the shortest route even if you're in front of them. I want the AI to only care about the waypoint. I tried setting the AI to manual as follows: helper.setAiMode('truck', 'manual') but it doesn't work. The truck doesn't drive at all. How can I fix it? (I'm confident that this is what causes the truck not to move, since in flee mode helper.setAiMode('truck', 'flee', 'scenario_player0') it works just fine.)
Here's a piece of code I got working on my side : Code: helper.setAiMode('AICar', 'manual') helper.setAiTarget('AICar', 'waypoint') You could maybe try to take some inspiration from the corridor scenario's lua. I could also take a look at your code to see if something's wrong if you want