Hi Arma team,
New to scripting and I have a question or more.
Background story:
Single-player mission.
BLUFOR(player) is a militia opposing an OPFOR militia. BLUFOR needs arms.
We're actually attacking a powerful ally and blaming it on our enemy to get supplies and support.
NOTE: For the simplicity of the mission the convoy is OPFOR!
Convoy consists of 1 APC in the front, 2 trucks then an APC at the rear.
The outcome should be:
When the lead APC(variable: lead_convoy) hits the AT mine the (player) group engages the rear APC with an RPG and engages the dismounted crew when (all) the fighting is over gets into one of the trucks, and profits. The drivers of the ammo trucks should surrender and survive so the attack is blamed on a rival militia, crafty huh?
Here's the part that's troublesome:
There should be a group of BLUFOR AI that hits the front APC as they dismount after the AT mines detonate, then kills the crew of the lead APC and then gets in one of the trucks to profit.
I have this in a trigger once the lead convoy vehicle hits the mine:
```
Condition:
!alive convoy;
{
// Change state of the AI units from hiding (this works ok)
_x commandWatch objNull;
_x enableAI "AUTOTARGET";
_x enableAI "TARGET";
_x enableAI "SUPPRESSION";
_x enableAI "AUTOCOMBAT";
_x enableAI "MOVE";
} foreach (units ambush_1);
// stops the trucks from rushing off (this works ok)
{_x disableAI "MOVE"} forEach (units (group driver ammo_truck_1));
{_x disableAI "MOVE"} forEach (units (group driver ammo_truck_2));
// I want to change the vehicles to captive and the occupants
ammo_truck_1D setcaptive TRUE; // Can you set a vehicle captive?
ammo_truck_1D action ["EJECT", ammo_truck_1];
removeAllWeapons ammo_truck_1D;
ammo_truck_2D setcaptive TRUE;
ammo_truck_2 setcaptive TRUE;
ammo_truck_2D action ["EJECT", ammo_truck_2];
removeAllWeapons ammo_truck_2D;
```
Behaviour:
The AI ambush_1 activates, the truck drivers (ammo_truck_1D/2D) stop, get out and are captured. But the ambushers spend the time engaging the APC crew (waypoint activated) and rest mag-dumping into the empty ammo trucks often at point-blank range like absolute fuck faces.
The ambushers do not get into the vehicle after the firefight is over from any waypoints.
Playing from a squad member of the ambush_1 crew the ammo_trucks remain targets of the squad.
I guess the question is how to make the trucks accessible to our AI?