It is now of common knowledge that Arma AI barely got its driving license !
While the driving is "decent enough" for single vehicles, when asked to form convoys, the AI will often stop/get stuck for no reason.
Here's a script using new features of Arma 3 engine and following Occam's Razor principle :
Simpler is better.
- Convoys will not get stuck for no reason !
- Robust script
- Easy to use : put your waypoints in the editor, and run the script with the convoy's group name as parameter
- Player friendly : you can be part of the convoy as driver/gunner/commander in any vehicle of the convoy without breaking the script
- Adjustable convoy speed
- Adjustable convoy spacing
- Performance and environnement friendly :)
Installation / Usage:
Put the script code in an sqf file, trigger, init field or whatever you fancy, then call it with :
convoyScript = [convoyGroup] spawn TOV_fnc_SimpleConvoy;
Check the readMe in the Demo mission file for more details.
- Having mixed vehicles in the convoy will cause the fastest vehicles to have a not so smooth driving, as they'll accelerate faster than the other vehicles then brake once they reach target speed.
- Due to how setConvoySeparation works, the convoy will stop on tight turns, vehicles crossing one at a time. Rear vehicles will then cut the corner to catch up faster if possible (doFollow behaviour).
- It doesn't fix all AI driving issues !
Credits & Thanks:
The Arma community with special thanks to all who answer scripting questions on the forums
License / Disclaimer:
Share it, edit it, steal it, rip it, call it your own etc.
Arma scripting and modding is about sharing !
If you're having fun, then I'm happy !
- Initial version
- BI forums