Home   Help Search Login Register  

Author Topic: AI convoy Script  (Read 2201 times)

0 Members and 1 Guest are viewing this topic.

Offline norrin

  • Tutorial Writer
  • **
AI convoy Script
« on: 20 Mar 2010, 04:12:32 »
// convoyDefend.sqf
// © MARCH 2010 - norrin

Description: This is a script that improves the convoy behaviour of AI controlled vehicles. W0lle asked me to write it for him a few days back and suggested I post it as he thought others might benefit.

readMe

Thanks to W0lle for the idea behind this one

Download:
http://norrin.org/downloads/ArmA2/convoy/convoy_test.utes.rar

To use:
1. Add the code from the init.sqf into your mission init.sqf
2. copy the convoyDefend folder from the test mission into your mission directory.
3. Create a convoy of AI vehicles, not grouped, spaced about 40 metres apart along a road, make sure each vehicle is named in the editor
4. Add markers on the map that you want the convoy to move through. Note the number of these required depend on the straightness of the road. Tanks in particular are notorious for going cross country so you may need a few more of these if there are tanks in the convoy. You may also want to increase the skill of the AI vehicles as this may help their path finding. Finally, W0lle tells me that the convoys don't like crossing bridges so you may want to avoid these.

Its also a good idea to fly the convoy route with the convoy to check that you don't need extra moveTo markers

The parameters in the script-call are:

1. An array of convoy route markers eg. ["pos1","pos2","pos3","pos4"]
2. An array that contains the names of the vehicles in the convoy eg. [c1,c2,c3,c4,c5,c6]

*If you destroy any of the vehicles in the convoy, then the other vehicles will stop and all units on board except the gunners will disembark and assume combat behaviour.

* Theoretically you can have a convoy of any size you like but its only been checked for a convoy of up to 8 vehicles.

License: These scripts are not to be altered or used for commercial purposes without the author's prior consent.

Offline Katrician

  • Members
  • *
Re: AI convoy Script
« Reply #1 on: 21 Jul 2010, 16:56:37 »
Looks promising as I tried a simple convoy with three Hummers it seemed impossible to make them "convoy" correctly, the path was roads, fifth waypoints nothing spectacular, but they keep riding at 10Km/h speed.... I talk about OA here. Again will try this script and report for duty  ;)
Quote
People do what they must.
rpm666 from Overclock.net