mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
see the below links for more info. uiSleep is based off of a more accurate method of tracking time, whereas sleep can fluctuate depending on application performance since it is based on framerate. https://community.bistudio.com/wiki/uiSleep https://community.bistudio.com/wiki/sleep_vs_uiSleep https://community.bistudio.com/wiki/sleep
27 lines
737 B
Plaintext
27 lines
737 B
Plaintext
//Small secondary fuel explosions
|
|
//By Maddmatt for ArmA 2
|
|
_v=_this select 0;
|
|
_int=_this select 1;
|
|
_list=[];
|
|
_lifecheck=true;
|
|
|
|
//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")||{((_v isKindOf "LandVehicle")||{(_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];
|
|
};
|
|
|
|
{
|
|
uiSleep _x;
|
|
if((_lifecheck&&(alive _v))||(isnull _v)||(((getposASL _v)select 2)<0))exitwith{};
|
|
createVehicle ["SmallSecondary", (_v modelToWorld _effect2pos), [], 0, "CAN_COLLIDE"];
|
|
}forEach(_list); |