Code:
// How to start this script?
// 1 Create new mission
// 2 Put the script in a folder with a mission
// 3 Create airplane and give it a name
// 4 Activate the script from a trigger or from an other script
// For example: p=[true,sam,"ParachuteBigWest_EP1","M2A2_EP1"] execVM "sbros.sqf"
// true mode for boxes, if you gonna reset ammo box, write in script activation true!
// false mode for vehicle, if you gonna reset vehicle, write in script activation false!
// sam The airplane name which reset object, it is necessary to deliver it in the editor!
// "ParachuteBigWest_EP1" Parachute name(from config)
// "M2A2_EP1" Name ammo box or vehicle (from config)
// Script from within
// _c130 Name airplane, local variable!
// _chute Name parachute, local variable!
// _box Name ammo box or vehicle, local variable!
// _bam Name new ammo box or vehicle, local variable!
_nm = TypeOf (_this select 1);
if (_this select 0) then { // if true, make next code, edit in trigger!(for ammo box)
_c130 = _this select 1; // transfer airplane name in script
_chute = (_this select 2) createVehicle [0, 0, 0]; // Create parachute
_chute setPos [(getpos _c130 select 0), (getPos _c130 select 1)-10, (getPos _c130 select 2)-10]; // Parachute teleport to airplane coordinates
_box = (_this select 3) createVehicle [0, 0, 0]; // create ammo box
_box setpos [(getpos _c130 select 0), (getpos _c130 select 1)-10, (getpos _c130 select 2)-10]; // ammo box teleport to airplane coordinates
_box attachto [_chute, [0, 0, 0]]; // ammo box attachment to a parachute
waitUntil {((getPos _box) select 2) < 1}; // Waiting of a landing of a ammo box
switch (true) do
{
case not (alive _box): {detach _box;_box setpos [(getpos _box select 0), (getpos _box select 1), 0];}; // If ammo box destroyed, make this code
case alive _box: {detach _box;_box setpos [(getpos _box select 0), (getpos _box select 1), 0];_bam =(_this select 3) createVehicle [(getpos _box select 0),(getpos _box select 1),(getpos _box select 2)+0];deletevehicle _box;"SmokeShellgreen" createVehicle getPos _bam;_flare = "F_40mm_White" createVehicle [getPos _bam select 0,getPos _bam select 1,+150];}; // If alive ammo box, make this code
};
_chute setPos [(getpos _box select 0)+2, (getPos _box select 1), (getPos _box select 2)]; // Parachute teleport to ammo box edge
} else { // if false, make next code, edit this variable in trigger!(for vehicle)
_c130 = _this select 1; // transfer airplane name in script
_chute = (_this select 2) createVehicle [0, 0, 0]; // Create parachute
_chute setPos [(getpos _c130 select 0), (getPos _c130 select 1)-10, (getPos _c130 select 2)-10]; // Parachute teleport to airplane coordinates
_box = (_this select 3) createVehicle [0, 0, 0]; // create vehicle
_box setpos [(getpos _c130 select 0), (getpos _c130 select 1)-10, (getpos _c130 select 2)-10]; // Vehicle teleport to airplane coordinates
_box attachto [_chute, [0, 0, 0]]; // Vehicle attachment to a parachute
waitUntil {((getPos _box) select 2) < 1}; // Waiting of a landing of a vehicle
switch (true) do
{
case not (alive _box): {detach _box;}; // if not alive vehicle, then Unhitching vehicle from parachute.
case alive _box: {detach _box;"SmokeShellgreen" createVehicle getPos _box;_flare = "F_40mm_White" createVehicle [getPos _box select 0,getPos _box select 1,+150];}; // if alive vehicle, then Unhitching vehicle from parachute; Create smoke grenade; create the lighting rocket;
};
_chute setPos [(getpos _box select 0)+2, (getPos _box select 1), (getPos _box select 2)]; // Parachute teleport to vehicle edge
};
PS: I hope you understand me. If not, drop me a PM.