Fix loot spawn + BIS_air_destruction

This commit is contained in:
icomrade
2014-03-21 18:19:21 -04:00
parent e2b95634e3
commit 6c360073c2
11 changed files with 335 additions and 211 deletions

View File

@@ -1,22 +1,27 @@
private ["_v","_int","_list","_lifecheck","_effect2pos","_t"];
//Small secondary fuel explosions
//By Maddmatt for ArmA 2
_v=_this select 0;
_int=_this select 1;
_list=[];
_lifecheck=true;
if (count _this > 2) then {
_lifecheck=_this select 2
};
_int=_int min 3;
if (!((_v isKindOf "Air") OR {((_v isKindOf "LandVehicle") OR {(_v isKindOf "Ship")})}))exitWith{};
_effect2pos=_v selectionposition"destructionEffect2";
while {_int>1} do {
_int=_int-1;
_t=(random 45)+1;
_list=_list+[_t];
};
//if true then script will only run while unit is 'dead'
if (count _this > 2) then {_lifecheck=_this select 2};
_int = _int min 3;
if (!((_v isKindOf "Air")OR{((_v isKindOf "LandVehicle")OR{(_v isKindOf "Ship")})})) exitWith {};
_effect2pos = _v selectionposition "destructionEffect2";
//Generate intervals between explosions
while {_int>1} do
{
_int=_int-1;_t=(random 45)+1;_list=_list+[_t];
};
{
sleep _x;
if ((_lifecheck && (alive _v))||(isnull _v)||(((getposASL _v)select 2) < 0))exitwith{};
if((_lifecheck&&(alive _v))||(isnull _v)||(((getposASL _v)select 2)<0))exitwith{};
"SmallSecondary" createvehicle(_v modelToWorld _effect2pos);
}foreach (_list);
}foreach(_list);