I took Siil's script and added a few modifications to it.
I switched this to waypoints for a number of reasons. One of them is that waypoints are connected with lines and thus make it easier to make sure the convoy route is on the roat. The waypoints are actually deleted in the convoyInit script, they are just for reference.
I use this in my functions library to create the functions:
- It's a function module now
- Scripts have been modified to make them reentrant, i.e. you can have more than one convoy
- Now uses waypoints of the lead vehicle instead of game logic.
- Place your convoy units as desired
- In the lead vehicle's init field, add the line
[this] call FHQ_fnc_convoyInit;
- Set waypoints for the lead vehicle that the convoy should follow. See below.
- To start the convoy, call
[veh1, veh2, veh3, ...] spawn FHQ_fnc_convoy;
(obviously, replace the veh1 etc with your vehicle variables)
- You can call
this setVariable ["FHQ_AmbushAction", actiontype];
in each vehicle's init field. actionType can be "tank", "truck" or "apc". Truck in this context means a troop transporter
I switched this to waypoints for a number of reasons. One of them is that waypoints are connected with lines and thus make it easier to make sure the convoy route is on the roat. The waypoints are actually deleted in the convoyInit script, they are just for reference.
I use this in my functions library to create the functions:
Quote:class Convoy
{
// Siil's convoy scripts, modified a bit for ease of use
tag="FHQ";
file="functions\fhq_ai";
EXPORTED_FUNCTION(convoyInit, "Init Convoy Lead Vehicle")
EXPORTED_FUNCTION(convoy, "Looks like we got us a convoy")
EXPORTED_FUNCTION(convoyAmbushAction, "Perform Ambush Action")
};
I don't need luck, I have ammo.