mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Fix loot spawn + BIS_air_destruction
This commit is contained in:
@@ -76,14 +76,14 @@ class CfgBuildingLoot {
|
|||||||
,{"ItemKnife","generic",0.04}
|
,{"ItemKnife","generic",0.04}
|
||||||
,{"ItemMatchbox_DZE","generic",0.01}
|
,{"ItemMatchbox_DZE","generic",0.01}
|
||||||
,{"","generic",0.36}
|
,{"","generic",0.36}
|
||||||
,{"backpacks","backpack",0.04}
|
,{"backpacks","backpacks",0.04}
|
||||||
,{"tents","single",0.01}
|
,{"tents","tents",0.01}
|
||||||
,{"","military",0.02}
|
,{"","military",0.02}
|
||||||
,{"","trash",0.17}
|
,{"","trash",0.17}
|
||||||
,{"Binocular","weapon",0.02}
|
,{"Binocular","weapon",0.02}
|
||||||
,{"PartPlywoodPack","magazine",0.02}
|
,{"PartPlywoodPack","magazine",0.02}
|
||||||
,{"clothes","single",0.01}
|
,{"clothes","clothes",0.01}
|
||||||
,{"specialclothes","single",0.01}
|
,{"specialclothes","specialclothes",0.01}
|
||||||
,{"WeaponHolder_MeleeCrowbar","object",0.03}
|
,{"WeaponHolder_MeleeCrowbar","object",0.03}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -104,14 +104,14 @@ class CfgBuildingLoot {
|
|||||||
,{"ItemKnife","generic",0.04}
|
,{"ItemKnife","generic",0.04}
|
||||||
,{"ItemMatchbox_DZE","generic",0.01}
|
,{"ItemMatchbox_DZE","generic",0.01}
|
||||||
,{"","generic",0.31}
|
,{"","generic",0.31}
|
||||||
,{"backpacks","backpack",0.04}
|
,{"backpacks","backpacks",0.04}
|
||||||
,{"tents","single",0.01}
|
,{"tents","tents",0.01}
|
||||||
,{"","military",0.02}
|
,{"","military",0.02}
|
||||||
,{"","trash",0.21}
|
,{"","trash",0.21}
|
||||||
,{"Binocular","weapon",0.02}
|
,{"Binocular","weapon",0.02}
|
||||||
,{"PartPlywoodPack","magazine",0.02}
|
,{"PartPlywoodPack","magazine",0.02}
|
||||||
,{"clothes","single",0.01}
|
,{"clothes","clothes",0.01}
|
||||||
,{"specialclothes","single",0.01}
|
,{"specialclothes","specialclothes",0.01}
|
||||||
,{"WeaponHolder_MeleeCrowbar","object",0.03}
|
,{"WeaponHolder_MeleeCrowbar","object",0.03}
|
||||||
,{"ItemBriefcaseEmpty","magazine",0.01}
|
,{"ItemBriefcaseEmpty","magazine",0.01}
|
||||||
,{"ItemDocument","magazine",0.01}
|
,{"ItemDocument","magazine",0.01}
|
||||||
@@ -209,8 +209,8 @@ class CfgBuildingLoot {
|
|||||||
,{"ItemKnife","generic",0.02}
|
,{"ItemKnife","generic",0.02}
|
||||||
,{"ItemMatchbox_DZE","generic",0.04}
|
,{"ItemMatchbox_DZE","generic",0.04}
|
||||||
,{"","generic",0.04}
|
,{"","generic",0.04}
|
||||||
,{"backpacks","backpack",0.07}
|
,{"backpacks","backpacks",0.07}
|
||||||
,{"tents","single",0.01}
|
,{"tents","tents",0.01}
|
||||||
,{"","food",0.3}
|
,{"","food",0.3}
|
||||||
,{"","trash",0.23}
|
,{"","trash",0.23}
|
||||||
,{"Binocular","weapon",0.05}
|
,{"Binocular","weapon",0.05}
|
||||||
@@ -232,8 +232,8 @@ class CfgBuildingLoot {
|
|||||||
,{"NVGoggles","weapon",0.01}
|
,{"NVGoggles","weapon",0.01}
|
||||||
,{"AmmoBoxSmall_556","object",0.03}
|
,{"AmmoBoxSmall_556","object",0.03}
|
||||||
,{"AmmoBoxSmall_762","object",0.03}
|
,{"AmmoBoxSmall_762","object",0.03}
|
||||||
,{"militaryclothes","single",0.05}
|
,{"militaryclothes","militaryclothes",0.05}
|
||||||
,{"militaryammo","single",0.06}
|
,{"militaryammo","militaryammo",0.06}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class HeliCrash_No50s: Default {
|
class HeliCrash_No50s: Default {
|
||||||
@@ -250,8 +250,8 @@ class CfgBuildingLoot {
|
|||||||
,{"NVGoggles","weapon",0.01}
|
,{"NVGoggles","weapon",0.01}
|
||||||
,{"AmmoBoxSmall_556","object",0.03}
|
,{"AmmoBoxSmall_556","object",0.03}
|
||||||
,{"AmmoBoxSmall_762","object",0.03}
|
,{"AmmoBoxSmall_762","object",0.03}
|
||||||
,{"militaryclothes","single",0.05}
|
,{"militaryclothes","militaryclothes",0.05}
|
||||||
,{"militaryammo","single",0.06}
|
,{"militaryammo","militaryammo",0.06}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class Hospital: Default {
|
class Hospital: Default {
|
||||||
@@ -279,7 +279,7 @@ class CfgBuildingLoot {
|
|||||||
,{"ItemKnife","military",0.01}
|
,{"ItemKnife","military",0.01}
|
||||||
,{"ItemGPS","weapon",0.01}
|
,{"ItemGPS","weapon",0.01}
|
||||||
,{"ItemMap","military",0.02}
|
,{"ItemMap","military",0.02}
|
||||||
,{"militarybackpacks","backpack",0.05}
|
,{"militarybackpacks","militarybackpacks",0.05}
|
||||||
,{"","medical",0.03}
|
,{"","medical",0.03}
|
||||||
,{"","generic",0.1}
|
,{"","generic",0.1}
|
||||||
,{"","military",0.3}
|
,{"","military",0.3}
|
||||||
@@ -302,7 +302,7 @@ class CfgBuildingLoot {
|
|||||||
,{"ItemKnife","military",0.04}
|
,{"ItemKnife","military",0.04}
|
||||||
,{"ItemGPS","weapon",0.01}
|
,{"ItemGPS","weapon",0.01}
|
||||||
,{"PartVRotor","magazine",0.01}
|
,{"PartVRotor","magazine",0.01}
|
||||||
,{"militarybackpacks","backpack",0.03}
|
,{"militarybackpacks","militarybackpacks",0.03}
|
||||||
,{"","medical",0.05}
|
,{"","medical",0.05}
|
||||||
,{"","generic",0.35}
|
,{"","generic",0.35}
|
||||||
,{"","military",0.07}
|
,{"","military",0.07}
|
||||||
@@ -330,7 +330,7 @@ class CfgBuildingLoot {
|
|||||||
,{"PartFueltank","magazine",0.03}
|
,{"PartFueltank","magazine",0.03}
|
||||||
,{"PartEngine","magazine",0.04}
|
,{"PartEngine","magazine",0.04}
|
||||||
,{"PartGlass","magazine",0.05}
|
,{"PartGlass","magazine",0.05}
|
||||||
,{"militarybackpacks","backpack",0.03}
|
,{"militarybackpacks","militarybackpacks",0.03}
|
||||||
,{"","medical",0.05}
|
,{"","medical",0.05}
|
||||||
,{"","generic",0.25}
|
,{"","generic",0.25}
|
||||||
,{"","military",0.07}
|
,{"","military",0.07}
|
||||||
@@ -356,12 +356,12 @@ class CfgBuildingLoot {
|
|||||||
,{"ItemGPS","weapon",0.01}
|
,{"ItemGPS","weapon",0.01}
|
||||||
,{"ItemMap","military",0.01}
|
,{"ItemMap","military",0.01}
|
||||||
,{"Binocular_Vector","military",0.01}
|
,{"Binocular_Vector","military",0.01}
|
||||||
,{"militarybackpacks","backpack",0.04}
|
,{"militarybackpacks","militarybackpacks",0.04}
|
||||||
,{"","medical",0.08}
|
,{"","medical",0.08}
|
||||||
,{"","generic",0.3}
|
,{"","generic",0.3}
|
||||||
,{"","military",0.01}
|
,{"","military",0.01}
|
||||||
,{"machinegunammo","single",0.05}
|
,{"machinegunammo","machinegunammo",0.05}
|
||||||
,{"militaryclothes","single",0.05}
|
,{"militaryclothes","militaryclothes",0.05}
|
||||||
,{"NVGoggles","weapon",0.01}
|
,{"NVGoggles","weapon",0.01}
|
||||||
,{"100Rnd_762x54_PK","magazine",0.05}
|
,{"100Rnd_762x54_PK","magazine",0.05}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ class Land_SS_hangar: Military {
|
|||||||
{"ItemTankTrap","magazine",0.02},
|
{"ItemTankTrap","magazine",0.02},
|
||||||
//bags
|
//bags
|
||||||
//multiple spawns
|
//multiple spawns
|
||||||
{"", "Industrial",0.60}
|
{"","generic",0.60}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class Land_A_Pub_01: Residential {
|
class Land_A_Pub_01: Residential {
|
||||||
@@ -414,7 +414,7 @@ class USMC_WarfareBFieldhHospital: MASH {
|
|||||||
zedPos[] = {{-3.52246,-5.03906,1.20731},{2.36621,-4.52246,1.20792},{1.39209,-0.420898,1.20752},{1.14258,5.01172,1.20786},{3.7124,1.89746,1.19794}};
|
zedPos[] = {{-3.52246,-5.03906,1.20731},{2.36621,-4.52246,1.20792},{1.39209,-0.420898,1.20752},{1.14258,5.01172,1.20786},{3.7124,1.89746,1.19794}};
|
||||||
}; // Qty: 1
|
}; // Qty: 1
|
||||||
|
|
||||||
class Land_Ind_Shed_02_main: Default {
|
class Land_Ind_Shed_02_main: Industrial {
|
||||||
zombieChance = 0.3;
|
zombieChance = 0.3;
|
||||||
maxRoaming = 3;
|
maxRoaming = 3;
|
||||||
}; // Qty: 283
|
}; // Qty: 283
|
||||||
|
|||||||
@@ -325,9 +325,9 @@ class CfgLoot {
|
|||||||
,{"Skin_INS_Lopotev_DZ",0.02}
|
,{"Skin_INS_Lopotev_DZ",0.02}
|
||||||
};
|
};
|
||||||
tents[] = {
|
tents[] = {
|
||||||
{"ItemTentOld",0.34}
|
{"WeaponHolder_ItemTentOld",0.34}
|
||||||
,{"ItemTentDomed",0.33}
|
,{"WeaponHolder_ItemTentDomed",0.33}
|
||||||
,{"ItemTentDomed2",0.33}
|
,{"WeaponHolder_ItemTentDomed2",0.33}
|
||||||
};
|
};
|
||||||
backpacks[] = {
|
backpacks[] = {
|
||||||
{"DZ_Assault_Pack_EP1",0.22}
|
{"DZ_Assault_Pack_EP1",0.22}
|
||||||
|
|||||||
@@ -2,10 +2,9 @@
|
|||||||
Created exclusively for ArmA2:OA - DayZMod.
|
Created exclusively for ArmA2:OA - DayZMod.
|
||||||
Please request permission to use/alter/distribute from project leader (R4Z0R49)
|
Please request permission to use/alter/distribute from project leader (R4Z0R49)
|
||||||
*/
|
*/
|
||||||
//private ["_lootChance","_index","_weights","_cntWeights","_itemType","_qty","_rnd","_iPos","_obj","_type","_config","_pos","_itemTypes","_positions","_bias"];
|
|
||||||
private ["_lootChance"];
|
private ["_lootChance"];
|
||||||
_obj = _this;
|
_obj = _this;
|
||||||
_type = typeOf _obj;
|
_type = configName (configFile >> "CfgBuildingLoot" >> (typeOf _obj)); //make sure we return the same case
|
||||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||||
_pos = [] + getArray (_config >> "lootPos");
|
_pos = [] + getArray (_config >> "lootPos");
|
||||||
_itemTypes = [] + getArray (_config >> "lootType");
|
_itemTypes = [] + getArray (_config >> "lootType");
|
||||||
@@ -33,7 +32,6 @@ _ShuffleArray = {
|
|||||||
};
|
};
|
||||||
_positions = _pos call _ShuffleArray;
|
_positions = _pos call _ShuffleArray;
|
||||||
|
|
||||||
|
|
||||||
// bias for this building. The lower it is, the lower chance some of the lootpiles will spawn
|
// bias for this building. The lower it is, the lower chance some of the lootpiles will spawn
|
||||||
_bias = 50 max _lootSpawnBias;
|
_bias = 50 max _lootSpawnBias;
|
||||||
_bias = 100 min _bias;
|
_bias = 100 min _bias;
|
||||||
|
|||||||
@@ -1,24 +1,16 @@
|
|||||||
private ["_iPos","_tQty","_qty","_index","_weights","_cntWeights","_canType","_item","_itemTypes","_max","_magQty","_mags","_iItem","_iClass","_radius","_uniq","_iPosZ"];
|
private ["_iPos","_tQty","_qty","_index","_weights","_cntWeights","_canType","_item","_magQty","_mags","_item2","_itemTypes","_max","_iItem","_iClass","_radius","_uniq","_iPosZ"];
|
||||||
|
|
||||||
_iItem = _this select 0;
|
_iItem = _this select 0;
|
||||||
_iClass = _this select 1;
|
_iClass = _this select 1;
|
||||||
_iPos = _this select 2;
|
_iPos = _this select 2;
|
||||||
_radius = _this select 3;
|
_radius = _this select 3;
|
||||||
|
|
||||||
//_uniq = ["ItemWaterbottle", "ItemWaterbottleUnfilled"];
|
|
||||||
_uniq = [];
|
_uniq = [];
|
||||||
//_permaLoot = false;
|
|
||||||
|
|
||||||
_iPosZ = _iPos select 2;
|
_iPosZ = _iPos select 2;
|
||||||
if((isNil "_iPosZ") OR {( _iPosZ < 0)}) then { _iPos = [_iPos select 0,_iPos select 1,0]; };
|
if((isNil "_iPosZ") OR {( _iPosZ < 0)}) then { _iPos = [_iPos select 0,_iPos select 1,0]; };
|
||||||
|
if (isNil "_iClass") exitWith {diag_log "_iClass isNil, exiting loot spawn!";};
|
||||||
//if(_iClass == "Unknown") exitwith {};
|
diag_log _iClass;
|
||||||
|
|
||||||
switch (_iClass) do {
|
switch (_iClass) do {
|
||||||
default {
|
default {
|
||||||
//Item is food, add random quantity of cans along with an item (if exists)
|
|
||||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
|
||||||
|
|
||||||
_itemTypes = [];
|
_itemTypes = [];
|
||||||
{
|
{
|
||||||
_itemTypes set [count _itemTypes, _x select 0]
|
_itemTypes set [count _itemTypes, _x select 0]
|
||||||
@@ -26,6 +18,8 @@ switch (_iClass) do {
|
|||||||
|
|
||||||
_qty = 0;
|
_qty = 0;
|
||||||
_max = ceil(random 2) + 1;
|
_max = ceil(random 2) + 1;
|
||||||
|
if (_iClass in ["trash","civilian","office","office2","food","generic","medical","hospital","military","militarypilot","policeman","hunter","worker"]) then {
|
||||||
|
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||||
while {_qty < _max} do {
|
while {_qty < _max} do {
|
||||||
_index = dayz_CLBase find _iClass;
|
_index = dayz_CLBase find _iClass;
|
||||||
_weights = dayz_CLChances select _index;
|
_weights = dayz_CLChances select _index;
|
||||||
@@ -33,38 +27,58 @@ switch (_iClass) do {
|
|||||||
_index = floor(random _cntWeights);
|
_index = floor(random _cntWeights);
|
||||||
_index = _weights select _index;
|
_index = _weights select _index;
|
||||||
_canType = _itemTypes select _index;
|
_canType = _itemTypes select _index;
|
||||||
|
|
||||||
//_itemarray = dayz_CLItemNames select _index;
|
|
||||||
//_canType = _itemarray call BIS_fnc_selectRandom;
|
|
||||||
|
|
||||||
//diag_log ("CanType: "+str(_canType));
|
|
||||||
_tQty = round(random 1) + 1;
|
_tQty = round(random 1) + 1;
|
||||||
if (_canType in _uniq) then {
|
if (_canType in _uniq) then {
|
||||||
if (({_x in _uniq} count magazines _item) == 0) then { _tQty = 1; } else { _tQty = 0;};
|
if (({_x in _uniq} count magazines _item) == 0) then { _tQty = 1; } else { _tQty = 0;};
|
||||||
if (_tQty == 0) then {diag_log(format["%1 Prevent any duplicate member %2 from family %3",__FILE__, _canType, _uniq]);};
|
if (_tQty == 0) then {diag_log(format["%1 Prevent any duplicate member %2 from family %3",__FILE__, _canType, _uniq]);};
|
||||||
//diag_log(format["%1 %2 DUP? type:%3 mag:%4 _this:%5",__FILE__, __LINE__, _canType, magazines _item, _this]);
|
|
||||||
};
|
};
|
||||||
if (_tQty > 0) then {
|
if (_tQty > 0) then {
|
||||||
if (!(_canType in _uniq)) then {
|
if (!(_canType in _uniq)) then {
|
||||||
_item addMagazineCargoGlobal [_canType,1];
|
_item addMagazineCargoGlobal [_canType,1];
|
||||||
_uniq set [count _uniq, _canType];
|
_uniq set [count _uniq, _canType];
|
||||||
//diag_log ("uniq: "+str(_uniq));
|
|
||||||
_qty = _qty + 1;
|
_qty = _qty + 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
if (_iItem != "") then {
|
if ((_iItem != "") && (isClass(configFile >> "CfgWeapons" >> _iItem))) then {
|
||||||
_item addWeaponCargoGlobal [_iItem,1];
|
_item addWeaponCargoGlobal [_iItem,1];
|
||||||
//diag_log ("Unknown");
|
};
|
||||||
|
} else {
|
||||||
|
_index = dayz_CLBase find _iClass;
|
||||||
|
_weights = dayz_CLChances select _index;
|
||||||
|
_cntWeights = count _weights;
|
||||||
|
_index = floor(random _cntWeights);
|
||||||
|
_index = _weights select _index;
|
||||||
|
_item2 = _itemTypes select _index;
|
||||||
|
if ((_item2 != "") && (isClass(configFile >> "CfgWeapons" >> _item2))) then {
|
||||||
|
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||||
|
_item addWeaponCargoGlobal [_item2,1];
|
||||||
|
if ((count _mags) > 0) then {
|
||||||
|
if (_mags select 0 == "20Rnd_556x45_Stanag") then { _mags set [0, "30Rnd_556x45_Stanag"] };
|
||||||
|
if (_mags select 0 == "30Rnd_556x45_G36") then { _mags set [0, "30Rnd_556x45_Stanag"] };
|
||||||
|
if (_mags select 0 == "30Rnd_556x45_G36SD") then { _mags set [0, "30Rnd_556x45_StanagSD"] };
|
||||||
|
if (!(_item2 in MeleeWeapons)) then {
|
||||||
|
_magQty = round(random 10);
|
||||||
|
if (_magQty > 3) then {
|
||||||
|
_item addMagazineCargoGlobal [(_mags select 0), (round(random 1) + 1)];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
if ((_item2 != "") && (isClass(configFile >> "CfgMagazines" >> _item2))) then {
|
||||||
|
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||||
|
_item addMagazineCargoGlobal [_item2,1];
|
||||||
|
};
|
||||||
|
if ((_item2 != "") && (isClass(configFile >> "CfgVehicles" >> _item2))) then {
|
||||||
|
_item = createVehicle [_item2, _iPos, [], _radius, "CAN_COLLIDE"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
case "weapon": {
|
case "weapon": {
|
||||||
//Item is a weapon, add it and a random quantity of magazines
|
|
||||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||||
_item addWeaponCargoGlobal [_iItem,1];
|
_item addWeaponCargoGlobal [_iItem,1];
|
||||||
_mags = [] + getArray (configFile >> "cfgWeapons" >> _iItem >> "magazines");
|
_mags = [] + getArray (configFile >> "cfgWeapons" >> _iItem >> "magazines");
|
||||||
if ((count _mags) > 0) then {
|
if ((count _mags) > 0) then {
|
||||||
// if (_mags select 0 == "Quiver") then { _mags set [0, "WoodenArrow"] }; // Prevent spawning a Quiver
|
|
||||||
if (_mags select 0 == "20Rnd_556x45_Stanag") then { _mags set [0, "30Rnd_556x45_Stanag"] };
|
if (_mags select 0 == "20Rnd_556x45_Stanag") then { _mags set [0, "30Rnd_556x45_Stanag"] };
|
||||||
if (_mags select 0 == "30Rnd_556x45_G36") then { _mags set [0, "30Rnd_556x45_Stanag"] };
|
if (_mags select 0 == "30Rnd_556x45_G36") then { _mags set [0, "30Rnd_556x45_Stanag"] };
|
||||||
if (_mags select 0 == "30Rnd_556x45_G36SD") then { _mags set [0, "30Rnd_556x45_StanagSD"] };
|
if (_mags select 0 == "30Rnd_556x45_G36SD") then { _mags set [0, "30Rnd_556x45_StanagSD"] };
|
||||||
@@ -76,20 +90,11 @@ switch (_iClass) do {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
case "tools": {
|
|
||||||
//Item is one tool
|
|
||||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
|
||||||
_item addMagazineCargoGlobal [_iItem,1];
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
case "magazine": {
|
case "magazine": {
|
||||||
//Item is one magazine
|
|
||||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||||
_item addMagazineCargoGlobal [_iItem,1];
|
_item addMagazineCargoGlobal [_iItem,1];
|
||||||
};
|
};
|
||||||
case "object": {
|
case "object": {
|
||||||
//Item is one magazine
|
|
||||||
_item = createVehicle [_iItem, _iPos, [], _radius, "CAN_COLLIDE"];
|
_item = createVehicle [_iItem, _iPos, [], _radius, "CAN_COLLIDE"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -97,6 +102,4 @@ if ((count _iPos) > 2) then {
|
|||||||
_item setPosATL _iPos;
|
_item setPosATL _iPos;
|
||||||
};
|
};
|
||||||
|
|
||||||
//if (_permaLoot == true) then { _item setVariable ["permaLoot",true]; };
|
_item
|
||||||
|
|
||||||
_item // used in server_spawnCrashSite
|
|
||||||
|
|||||||
@@ -10,14 +10,13 @@ for "_i" from 0 to ((count _config) - 1) do {
|
|||||||
_classname = configName (_config select _i);
|
_classname = configName (_config select _i);
|
||||||
_itemChances = getArray (_config >> _classname >> "lootType");
|
_itemChances = getArray (_config >> _classname >> "lootType");
|
||||||
_itemCount = count _itemChances;
|
_itemCount = count _itemChances;
|
||||||
|
|
||||||
//diag_log format["Classname: %1, Array: %2, Amount: %3", _classname, _itemChances, _itemCount];
|
//diag_log format["Classname: %1, Array: %2, Amount: %3", _classname, _itemChances, _itemCount];
|
||||||
|
|
||||||
if (_itemCount > 0) then {
|
if (_itemCount > 0) then {
|
||||||
if (dayz_CBLBase find _classname < 0) then {
|
if ((dayz_CBLBase find _classname) < 0) then {
|
||||||
_weighted = [];
|
_weighted = [];
|
||||||
_j = 0;
|
_j = 0;
|
||||||
for "_l" from 0 to ((count _itemChances) - 1) do {
|
for "_l" from 0 to (_itemCount - 1) do {
|
||||||
_weight = round (((_itemChances select _l) select 2) * 100);
|
_weight = round (((_itemChances select _l) select 2) * 100);
|
||||||
for "_k" from 0 to (_weight - 1) do
|
for "_k" from 0 to (_weight - 1) do
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,69 +1,144 @@
|
|||||||
private ["_fl","_sm","_expl","_dr","_tv","_i","_wave","_splash","_velz","_v","_int","_t","_pos"];
|
private ["_fl","_sm","_expl","_dr","_tv","_i","_wave","_splash","_velz","_v","_int","_t","_pos"];
|
||||||
|
|
||||||
_v=_this select 0;
|
_v=_this select 0;
|
||||||
_int = (fuel _v)*(8+random 2);
|
_int = (fuel _v)*(8+random 2);
|
||||||
_t=time;
|
_t=time;
|
||||||
if (!isDedicated) then {
|
|
||||||
|
if (!isDedicated) then { //dw, particle stuff don't need run on dedicated
|
||||||
|
|
||||||
_fl = "#particlesource" createVehicleLocal getPosATL _v;
|
_fl = "#particlesource" createVehicleLocal getPosATL _v;
|
||||||
_fl attachto [_v,[0,0,0],"destructionEffect2"];
|
_fl attachto [_v,[0,0,0],"destructionEffect2"];
|
||||||
_fl setParticleRandom [0.3, [1, 1, 0], [0, 0, 0], 0, 0.3, [0, 0, 0, 0], 0, 0];
|
_fl setParticleRandom [0.3, [1, 1, 0], [0, 0, 0], 0, 0.3, [0, 0, 0, 0], 0, 0];
|
||||||
_fl setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal",16,10,32],"","Billboard",1,2,"destructionEffect2",[0,0,5],0,10,7.9,0.075,[4,7,9,10],[[1,1,1,-1],[1,1,1,-1],[1,1,1,-1],[1,1,1,-0.5],[1,1,1,-0]],[1,0.5],1,0,"","",_v];
|
_fl setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 10, 32], "", "Billboard", 1, 2, "destructionEffect2",
|
||||||
|
[0, 0, 5], 0, 10, 7.9, 0.075, [4,7,9,10], [[1, 1, 1, -1], [1, 1, 1, -1],
|
||||||
|
[1, 1, 1, -1], [1, 1, 1, -0.5], [1, 1, 1, -0]], [1,0.5], 1, 0, "", "", _v];
|
||||||
_fl setDropInterval 1;
|
_fl setDropInterval 1;
|
||||||
|
|
||||||
_sm = "#particlesource" createVehicleLocal getPosATL _v;
|
_sm = "#particlesource" createVehicleLocal getPosATL _v;
|
||||||
_sm attachto [_v,[0,0,0],"destructionEffect1"];
|
_sm attachto [_v,[0,0,0],"destructionEffect1"];
|
||||||
_sm setParticleRandom [2, [2, 2, 0], [0, 0, 0], 0, 0.3, [0, 0, 0, 0.1], 0, 0];
|
_sm setParticleRandom [2, [2, 2, 0], [0, 0, 0], 0, 0.3, [0, 0, 0, 0.1], 0, 0];
|
||||||
_sm setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal",16,7,48],"","Billboard",1,5,"destructionEffect1",[0,0,5],0,10,7.9,0.075,[4,8,12,14],[[0.3,0.3,0.3,1],[0.45,0.45,0.45,1],[0.6,0.6,0.6,0.6],[0.7,0.7,0.7,0.25],[1,1,1,0]],[0.8,0.3,0.25],1,0,"","",_v];
|
_sm setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 5, "destructionEffect1",
|
||||||
|
[0, 0, 5], 0, 10, 7.9, 0.075, [4,8,12,14], [[0.3, 0.3, 0.3, 1],
|
||||||
|
[0.45, 0.45, 0.45, 1],[0.6, 0.6, 0.6, 0.6], [0.7, 0.7, 0.7, 0.25], [1, 1, 1, 0]], [0.8,0.3,0.25], 1, 0, "", "", _v];
|
||||||
_sm setDropInterval 1;
|
_sm setDropInterval 1;
|
||||||
};
|
|
||||||
|
}; // end of dedicated check
|
||||||
|
|
||||||
_i=0;
|
_i=0;
|
||||||
_dr=0.2;
|
_dr=0.2;
|
||||||
_tv=11;
|
_tv=11;
|
||||||
removeAllWeapons _v;
|
|
||||||
if (local _v AND {(_v isKindOf "Air")}) then {
|
|
||||||
_expl=createVehicle ["HelicopterExploSmall",(getPosATL _v),[],0,"CAN_COLLIDE"];
|
//Remove weapons/ammo to prevent explosion. Script will create its own explosions (doesnt work?)
|
||||||
};
|
removeallweapons _v;
|
||||||
if (!isDedicated) then {
|
|
||||||
while{_i<1200 && ((velocity _v select 2) < -20||(getPosATL _v select 2) > 8) && !(alive _v) && !(isnull _v) && (getPosATL _v select 2) > 1} do {
|
if (local _v) then {_expl=createVehicle ["HelicopterExploSmall", (getPosATL _v), [], 0, "CAN_COLLIDE"];};
|
||||||
|
|
||||||
|
if (!isDedicated) then { //dw, particle stuff don't need run on dedicated
|
||||||
|
while {_i <1200 && ((velocity _v select 2)<-20 || (getPosATL _v select 2)>8) && !(alive _v) && !(isnull _v) && (getPosATL _v select 2)>1} do
|
||||||
|
{
|
||||||
_tv=abs(velocity _v select 0)+abs(velocity _v select 1)+abs(velocity _v select 2);
|
_tv=abs(velocity _v select 0)+abs(velocity _v select 1)+abs(velocity _v select 2);
|
||||||
_dr=if(_tv>2)then{1/_tv}else{1};
|
if (_tv>2) then {_dr=1/_tv} else {_dr=1};
|
||||||
_fl setDropInterval _dr;
|
_fl setDropInterval _dr;
|
||||||
_sm setDropInterval _dr;
|
_sm setDropInterval _dr;
|
||||||
_i=_i+1;
|
_i=_i+1;
|
||||||
sleep 0.2;
|
sleep 0.2;
|
||||||
};
|
};
|
||||||
};
|
}; // end of dedicated check
|
||||||
|
|
||||||
_pos=getPosATL _v;
|
_pos=getPosATL _v;
|
||||||
clearVehicleInit _v;
|
clearVehicleInit _v;
|
||||||
if (!isDedicated) then {
|
|
||||||
deletevehicle _fl;
|
if (!isDedicated) then { //dw, particle stuff don't need run on dedicated
|
||||||
deletevehicle _sm;
|
deletevehicle _fl;deletevehicle _sm;
|
||||||
};
|
}; // end of dedicated check
|
||||||
if (surfaceiswater(_pos) && (_pos select 2) < 9) then {
|
if (surfaceiswater(_pos) && (_pos select 2)<9 ) then
|
||||||
if (!isDedicated) then {
|
{
|
||||||
|
if (!isDedicated) then { //dw, particle stuff don't need run on dedicated
|
||||||
_wave = "#particlesource" createVehicleLocal getPosATL _v;
|
_wave = "#particlesource" createVehicleLocal getPosATL _v;
|
||||||
_wave attachto [_v,[0,0,0],"destructionEffect1"];
|
_wave attachto [_v,[0,0,0],"destructionEffect1"];
|
||||||
_wave setParticleRandom [0.3, [1, 1, 0], [0.5, 0.5, 0], 0, 0.3, [0, 0, 0, 0], 0, 0];
|
_wave setParticleRandom [0.3, [1, 1, 0], [0.5, 0.5, 0], 0, 0.3, [0, 0, 0, 0], 0, 0];
|
||||||
_wave setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal",16,12,13,0],"","Billboard",1,1.6,"destructionEffect1",[0,0,0],0,10,7.9,0.075,[3,8],[[0.7,0.8,1,0.6],[0.85,0.9,1,0.0]],[1000],1,0,"","",_v];
|
_wave setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 13,0], "", "Billboard", 1, 1.6, "destructionEffect1",
|
||||||
|
[0, 0, 0], 0, 10, 7.9, 0.075, [3,8],
|
||||||
|
[[0.7,0.8,1,0.6],[0.85,0.9,1,0.0]], [1000], 1, 0, "", "", _v];
|
||||||
_wave setparticlecircle [2,[0,16,0]];
|
_wave setparticlecircle [2,[0,16,0]];
|
||||||
_wave setDropInterval 0.0015;
|
_wave setDropInterval 0.0015;
|
||||||
|
|
||||||
_splash = "#particlesource" createVehicleLocal getPosATL _v;
|
_splash = "#particlesource" createVehicleLocal getPosATL _v;
|
||||||
_splash attachto [_v,[0,0,0],"destructionEffect1"];
|
_splash attachto [_v,[0,0,0],"destructionEffect1"];
|
||||||
_splash setParticleRandom [2, [2, 2, 0], [2, 2, 7], 0, 0.5, [0, 0, 0, 0], 0, 0];
|
_splash setParticleRandom [2, [2, 2, 0], [2, 2, 7], 0, 0.5, [0, 0, 0, 0], 0, 0];
|
||||||
_splash setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal",16,13,6,0],"","Billboard",1,4,"destructionEffect1",[0,0,0],0,30,7.9,0.075,[8,15],[[0.7,0.7,0.7,1],[1,1,1,0]],[1000],1,0,"","",_v];
|
_splash setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 13, 6, 0], "", "Billboard", 1, 4, "destructionEffect1",
|
||||||
|
[0, 0, 0], 0, 30, 7.9, 0.075, [8,15],
|
||||||
|
[[0.7,0.7,0.7,1],[1,1,1,0]], [1000], 1, 0, "", "", _v];
|
||||||
_splash setparticlecircle [2,[0,3,15]];
|
_splash setparticlecircle [2,[0,3,15]];
|
||||||
_splash setDropInterval 0.002;
|
_splash setDropInterval 0.002;
|
||||||
|
|
||||||
sleep 0.2;
|
sleep 0.2;
|
||||||
deletevehicle _wave;
|
deletevehicle _wave;deletevehicle _splash;
|
||||||
deletevehicle _splash;
|
}; // end of dedicated check
|
||||||
|
/*
|
||||||
|
if (local _v) then
|
||||||
|
{
|
||||||
|
_wreck=GetText (configFile >> "CfgVehicles" >> (typeof _v) >> "wreck");
|
||||||
|
if (_wreck!="") then
|
||||||
|
{
|
||||||
|
_pos = getpos _v;
|
||||||
|
_dir = vectordir _v;
|
||||||
|
_vecUp = vectorup _v;
|
||||||
|
_vel = velocity _v;
|
||||||
|
|
||||||
|
clearvehicleinit _v;
|
||||||
|
_crw= crew _v;
|
||||||
|
clearvehicleinit _v;
|
||||||
|
deleteVehicle _v;
|
||||||
|
_v =(_wreck) createvehicle _pos;
|
||||||
|
{_x moveincargo _v} foreach _crw;
|
||||||
|
_v setVectorDirAndUp [_dir,_vecUp];
|
||||||
|
_v setFuel 0;
|
||||||
|
_v setdamage 0;
|
||||||
|
_v setvelocity _vel;
|
||||||
|
//Send to garbage collecter so wreck can be deleted later
|
||||||
|
[_v] call BIS_GC_trashItFunc;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
}; */
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
if (local _v) then {
|
{
|
||||||
|
if (local _v) then
|
||||||
|
{
|
||||||
|
//_velx = velocity _v select 0; _velx = _velx / 4;
|
||||||
|
//_vely = velocity _v select 1; _vely = _vely / 4;
|
||||||
_velz=velocity _v select 2;
|
_velz=velocity _v select 2;
|
||||||
if (_velz>1) then {
|
if (_velz>1) then {_v setvelocity [velocity _v select 0,velocity _v select 1,0]};
|
||||||
_v setvelocity [velocity _v select 0,velocity _v select 1,0]
|
|
||||||
};
|
|
||||||
_expl = createVehicle ["HelicopterExploBig", [_pos select 0,_pos select 1,(_pos select 2) + 1], [], 0, "CAN_COLLIDE"];
|
_expl = createVehicle ["HelicopterExploBig", [_pos select 0,_pos select 1,(_pos select 2) + 1], [], 0, "CAN_COLLIDE"];
|
||||||
sleep 0.05;
|
sleep 0.05;
|
||||||
|
/*
|
||||||
|
_wreck=GetText (configFile >> "CfgVehicles" >> (typeof _v) >> "wreck");
|
||||||
|
if (_wreck!="") then
|
||||||
|
{
|
||||||
|
_pos = getpos _v;
|
||||||
|
_dir = vectordir _v;
|
||||||
|
_vecUp = vectorup _v;
|
||||||
|
_vel = velocity _v;
|
||||||
|
|
||||||
|
_crw= crew _v;
|
||||||
|
clearvehicleinit _v;
|
||||||
|
deleteVehicle _v;
|
||||||
|
_v =(_wreck) createvehicle _pos;
|
||||||
|
{_x moveincargo _v} foreach _crw;
|
||||||
|
//sleep 0.05;
|
||||||
|
_v setvelocity _vel;
|
||||||
|
//_v setPos _pos;
|
||||||
|
_v setvectordir (_dir);
|
||||||
|
_v setvectorup _vecUp;
|
||||||
|
_v setFuel 0;
|
||||||
|
_v setdamage 0;
|
||||||
|
|
||||||
|
|
||||||
|
}; */
|
||||||
|
//_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_AirDestructionStage2",_int, _t];
|
||||||
|
//processInitCommands; //ClearvehicleInit done at end of burn script
|
||||||
["AirDestructionStage2", _v, _int, _t] call BIS_Effects_globalEvent;
|
["AirDestructionStage2", _v, _int, _t] call BIS_Effects_globalEvent;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,57 +1,86 @@
|
|||||||
private ["_v","_pos", "_int","_t","_smoke","_fire","_dirt","_i","_xv","_yv","_zv","_dir","_Crater","_speed","_velz","_tv","_dr"];
|
private ["_dr","_pos","_xv","_yv","_dir","_Crater","_speed","_velz","_tv","_zv","_i","_smoke","_fire","_dirt","_v","_int","_t"];
|
||||||
_v = _this select 0;
|
_v = _this select 0;
|
||||||
_int = _this select 1;
|
_int = _this select 1;
|
||||||
_t=_this select 2;
|
_t=_this select 2;
|
||||||
_pos=getPosATL _v;
|
_pos=getPosATL _v;
|
||||||
if (!isDedicated) then {
|
// Particle effects
|
||||||
|
if (!isDedicated) then { //dw, particle stuff don't need run on dedicated
|
||||||
_smoke = "#particlesource" createVehicleLocal _pos;
|
_smoke = "#particlesource" createVehicleLocal _pos;
|
||||||
_smoke attachto [_v,[0,0,0],"destructionEffect1"];
|
_smoke attachto [_v,[0,0,0],"destructionEffect1"];
|
||||||
_smoke setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,7,48],"","Billboard",1,15,[0,0,0],[0,0,0],1,1.275,1,0,[8,14],[[0.1,0.1,0.1,1],[0.1,0.1,0.1,0]],[0.5],0.1,0.1,"","",_v];
|
_smoke setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,7,48],
|
||||||
|
"", "Billboard", 1, 15, [0, 0, 0], [0, 0, 0], 1, 1.275, 1, 0, [8,14],
|
||||||
|
[[0.1,0.1,0.1,1],[0.1,0.1,0.1,0]], [0.5], 0.1, 0.1, "", "", _v];
|
||||||
|
//_smoke setParticleCircle [2,[0,0,0]];
|
||||||
_smoke setParticleRandom [4, [2, 2, 2], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0];
|
_smoke setParticleRandom [4, [2, 2, 2], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0];
|
||||||
_smoke setDropInterval 0.02;
|
_smoke setDropInterval 0.02;
|
||||||
|
|
||||||
_fire = "#particlesource" createVehicleLocal _pos;
|
_fire = "#particlesource" createVehicleLocal _pos;
|
||||||
_fire attachto [_v,[0,0,0],"destructionEffect2"];
|
_fire attachto [_v,[0,0,0],"destructionEffect2"];
|
||||||
_fire setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,2,80],"","Billboard",1,2,[0,1,0],[0,0,0],1,1.275,1,0,[7,13],[[1,1,1,-1],[1,1,1,0]],[0.5],0.01,0.01,"","",_v,360];
|
/*_fire setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,2,32], "", "Billboard", 1, 1, [0, 1, 0], [0, 0, 0], 1, 1.275, 1, 0, [10,15],
|
||||||
|
[[1,1,1,-1],[1,1,1,0]], [0.5], 0.01, 0.01, "", "", _v,360]; */
|
||||||
|
_fire setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,2,80],
|
||||||
|
"", "Billboard", 1, 2, [0, 1, 0], [0, 0, 0], 1, 1.275, 1, 0, [7,13],
|
||||||
|
[[1,1,1,-1],[1,1,1,0]], [0.5], 0.01, 0.01, "", "", _v,360];
|
||||||
_fire setParticleRandom [0.5, [0.5, 0.5, 0.5], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0];
|
_fire setParticleRandom [0.5, [0.5, 0.5, 0.5], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0];
|
||||||
_fire setDropInterval 0.01;
|
_fire setDropInterval 0.01;
|
||||||
|
/*
|
||||||
|
_shards = "#particlesource" createVehicleLocal _pos;
|
||||||
|
//_shards attachto [_v,[0,0,0],"destructionEffect1"];
|
||||||
|
_shards setParticleParams [["\CA\Data\ParticleEffects\Shard\shard",1,0,1], "", "SpaceObject", 1, 60, [0, 0, 0], [0, 0, 0], 0, 1.275, 1, 0, [1,1],
|
||||||
|
[[1,1,1,1]], [0.5], 0, 0, "", "", _v];
|
||||||
|
_shards setParticleRandom [30, [1, 1, 0], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0];
|
||||||
|
_shards setParticleCircle [2,[0.001,0.001,-0.001]];
|
||||||
|
_shards setDropInterval 0.05;
|
||||||
|
*/
|
||||||
_dirt = "#particlesource" createVehicleLocal _pos;
|
_dirt = "#particlesource" createVehicleLocal _pos;
|
||||||
_dirt attachto [_v,[0,0,0],"destructionEffect1"];
|
_dirt attachto [_v,[0,0,0],"destructionEffect1"];
|
||||||
_dirt setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,12,9,0],"","Billboard",1,5,[0,0,0],[0,0,5],0,5,1,0,[10,20],[[0.1,0.1,0.1,1],[0.1,0.1,0.1,0.7],[0.1,0.1,0.1,0]],[1000],0,0,"","",_v,360];
|
_dirt setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,12,9,0], "", "Billboard", 1, 5, [0, 0, 0], [0, 0, 5], 0, 5, 1, 0, [10,20],
|
||||||
|
[[0.1,0.1,0.1,1],[0.1,0.1,0.1,0.7],[0.1,0.1,0.1,0]], [1000], 0, 0, "", "", _v,360];
|
||||||
_dirt setParticleRandom [0, [1, 1, 1], [1, 1, 2.5], 0, 0, [0, 0, 0, 0.5], 0, 0];
|
_dirt setParticleRandom [0, [1, 1, 1], [1, 1, 2.5], 0, 0, [0, 0, 0, 0.5], 0, 0];
|
||||||
_dirt setDropInterval 0.05;
|
_dirt setDropInterval 0.05;
|
||||||
|
|
||||||
|
//creating ground craters
|
||||||
_i=0;
|
_i=0;
|
||||||
while {(speed _v) > 0.1} do {
|
while {(speed _v) > 0.1} do
|
||||||
|
{
|
||||||
_pos=getPosATL _v;
|
_pos=getPosATL _v;
|
||||||
_xv=velocity _v select 0;
|
_xv=velocity _v select 0;
|
||||||
_yv=velocity _v select 1;
|
_yv=velocity _v select 1;
|
||||||
_zv=velocity _v select 2;
|
_zv=velocity _v select 2;
|
||||||
_dir = abs(_xv atan2 _yv);
|
_dir = abs(_xv atan2 _yv);
|
||||||
|
|
||||||
_Crater= "CraterLong" createvehiclelocal [_pos select 0, _pos select 1, 0];
|
_Crater= "CraterLong" createvehiclelocal [_pos select 0, _pos select 1, 0];
|
||||||
_Crater setdir (_dir + (180 * _i));
|
_Crater setdir (_dir + (180 * _i));
|
||||||
_Crater setpos [_pos select 0, _pos select 1, 0];
|
_Crater setpos [_pos select 0, _pos select 1, 0];
|
||||||
_Crater setPos [_pos select 0,_pos select 1,((0-_i)/13)];
|
_Crater setPos [_pos select 0, _pos select 1, ((0 - _i)/13)]; //all setpos commands so it is placed correctly on sloped terrain
|
||||||
_speed = (speed _v);
|
_speed = (speed _v);
|
||||||
_velz=velocity _v select 2;
|
_velz=velocity _v select 2;
|
||||||
if (_velz>1) then {
|
|
||||||
_v setvelocity [_xv/1.3,_yv/1.3,0]
|
if (_velz>1) then {_v setvelocity [_xv/1.3,_yv/1.3,0]}
|
||||||
}
|
else {_v setvelocity [_xv/1.2,_yv/1.2,velocity _v select 2]};
|
||||||
else{
|
|
||||||
_v setvelocity [_xv/1.2,_yv/1.2,velocity _v select 2]
|
|
||||||
};
|
|
||||||
_tv=abs(_xv)+abs(_yv)+abs(_zv);
|
_tv=abs(_xv)+abs(_yv)+abs(_zv);
|
||||||
_dr=if(_tv>2) then {1/_tv}else{1};
|
if (_tv>2) then {_dr=1/_tv} else {_dr=1};
|
||||||
_smoke setDropInterval _dr*1.5;
|
_smoke setDropInterval _dr*1.5;
|
||||||
_fire setDropInterval _dr*1.5;
|
_fire setDropInterval _dr*1.5;
|
||||||
_dirt setDropInterval _dr;
|
_dirt setDropInterval _dr;
|
||||||
|
//_shards setDropInterval _dr;
|
||||||
|
|
||||||
sleep (0.25 - (_speed / 1000));
|
sleep (0.25 - (_speed / 1000));
|
||||||
_i = _i + 1;
|
_i = _i + 1;
|
||||||
};
|
};
|
||||||
deleteVehicle _smoke;
|
deleteVehicle _smoke;
|
||||||
deleteVehicle _fire;
|
deleteVehicle _fire;
|
||||||
|
//deleteVehicle _shards;
|
||||||
deleteVehicle _dirt;
|
deleteVehicle _dirt;
|
||||||
};
|
|
||||||
|
}; // end of dedicated check
|
||||||
|
|
||||||
_v setvelocity [0,0,-0.1];
|
_v setvelocity [0,0,-0.1];
|
||||||
if (local _v) then {
|
if (local _v) then
|
||||||
|
{
|
||||||
|
//_v setVehicleInit format ["[this, %1, %2,false,true]spawn BIS_Effects_Burn",_int, _t];
|
||||||
|
//processInitCommands; //ClearvehicleInit done at end of burn script
|
||||||
["Burn", _v, _int, _t] call BIS_Effects_globalEvent;
|
["Burn", _v, _int, _t] call BIS_Effects_globalEvent;
|
||||||
[_v,_int,false] spawn BIS_Effects_Secondaries;
|
[_v,_int,false] spawn BIS_Effects_Secondaries;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[] spawn {
|
[] spawn {
|
||||||
while {true} do {
|
while {1 == 1} do {
|
||||||
waitUntil {((isNil "BIS_Effects_Rifle") OR {(count(toArray(str(BIS_Effects_Rifle)))!=7)})};
|
waitUntil {((isNil "BIS_Effects_Rifle") OR {(count(toArray(str(BIS_Effects_Rifle)))!=7)})};
|
||||||
diag_log "Res3tting B!S effects...";
|
diag_log "Res3tting B!S effects...";
|
||||||
/* BIS_Effects_* fixes from Dwarden */
|
/* BIS_Effects_* fixes from Dwarden */
|
||||||
|
|||||||
@@ -1,19 +1,34 @@
|
|||||||
private ["_v","_int","_t","_b"];
|
private ["_v","_int","_t","_b"];
|
||||||
|
|
||||||
_v=_this select 0;
|
_v=_this select 0;
|
||||||
if (_v isKindOf "Helicopter"||_v isKindOf "Plane") then {
|
if (_v iskindof "helicopter" || _v iskindof "plane")
|
||||||
|
then
|
||||||
|
{
|
||||||
|
//_v setVehicleInit "[this] spawn BIS_Effects_AirDestruction";
|
||||||
|
//processInitCommands; //ClearvehicleInit done at end of burn script
|
||||||
["AirDestruction", _v] call BIS_Effects_globalEvent;
|
["AirDestruction", _v] call BIS_Effects_globalEvent;
|
||||||
};
|
};
|
||||||
if (_v isKindOf "Tank") then {
|
if (_v iskindof "tank")
|
||||||
|
then
|
||||||
|
{
|
||||||
_int = (fuel _v)*(2+random 2);
|
_int = (fuel _v)*(2+random 2);
|
||||||
_t = time;
|
_t = time;
|
||||||
|
//_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_Burn",_int, _t]; - disabled to prepaire for move into engine
|
||||||
|
//processInitCommands; //ClearvehicleInit done at end of burn script
|
||||||
[_v,_int] spawn BIS_Effects_Secondaries;
|
[_v,_int] spawn BIS_Effects_Secondaries;
|
||||||
};
|
};
|
||||||
if (_v isKindOf "Car"||_v isKindOf "Ship") then {
|
if (_v iskindof "car" || _v iskindof "ship")
|
||||||
|
then
|
||||||
|
{
|
||||||
_int = (fuel _v)*(2 + random 1);
|
_int = (fuel _v)*(2 + random 1);
|
||||||
_t = time;
|
_t = time;
|
||||||
|
|
||||||
|
//_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_Burn; ",_int, _t]; - disabled to prepaire for move into engine
|
||||||
|
//processInitCommands; //ClearvehicleInit done at end of burn script
|
||||||
[_v,_int] spawn BIS_Effects_Secondaries;
|
[_v,_int] spawn BIS_Effects_Secondaries;
|
||||||
if ((random _int)>2.2) then {
|
|
||||||
|
//Possible initial explosion
|
||||||
|
if ((random _int)>2.2) then
|
||||||
|
{
|
||||||
_b = createVehicle ["SmallSecondary", (getPosATL _v), [], 0, "CAN_COLLIDE"];
|
_b = createVehicle ["SmallSecondary", (getPosATL _v), [], 0, "CAN_COLLIDE"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,20 +1,25 @@
|
|||||||
private ["_v","_int","_list","_lifecheck","_effect2pos","_t"];
|
//Small secondary fuel explosions
|
||||||
|
//By Maddmatt for ArmA 2
|
||||||
_v=_this select 0;
|
_v=_this select 0;
|
||||||
_int=_this select 1;
|
_int=_this select 1;
|
||||||
_list=[];
|
_list=[];
|
||||||
_lifecheck=true;
|
_lifecheck=true;
|
||||||
if (count _this > 2) then {
|
|
||||||
_lifecheck=_this select 2
|
//if true then script will only run while unit is 'dead'
|
||||||
};
|
if (count _this > 2) then {_lifecheck=_this select 2};
|
||||||
|
|
||||||
_int = _int min 3;
|
_int = _int min 3;
|
||||||
|
|
||||||
if (!((_v isKindOf "Air")OR{((_v isKindOf "LandVehicle")OR{(_v isKindOf "Ship")})})) exitWith {};
|
if (!((_v isKindOf "Air")OR{((_v isKindOf "LandVehicle")OR{(_v isKindOf "Ship")})})) exitWith {};
|
||||||
|
|
||||||
_effect2pos = _v selectionposition "destructionEffect2";
|
_effect2pos = _v selectionposition "destructionEffect2";
|
||||||
while {_int>1} do {
|
|
||||||
_int=_int-1;
|
//Generate intervals between explosions
|
||||||
_t=(random 45)+1;
|
while {_int>1} do
|
||||||
_list=_list+[_t];
|
{
|
||||||
|
_int=_int-1;_t=(random 45)+1;_list=_list+[_t];
|
||||||
};
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
sleep _x;
|
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{};
|
||||||
|
|||||||
Reference in New Issue
Block a user