Custom Heli Crash script spawning Helis without smoke/fire

Daniel Kagarise

New Member
So im using this script found below to spawn in my heli crashes the old school way, everything spwans in correctly ingame except for the fact there is no smoke/fire on the wrecks. Would anyone know how to fix this? No that isnt the entire loot table, shortened it to shorten the post.

private["_position","_veh","_num","_config","_itemType","_itemChance","_weights","_index","_iArray"];

waitUntil{!isNil "BIS_fnc_selectRandom"};
if (isDedicated) then {
_position = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;

_randomvehicle = ["UH1Wreck_DZ"] call BIS_fnc_selectRandom;
_vehicleloottype = ["HeliCrash"] call BIS_fnc_selectRandom;

_veh = createVehicle [_randomvehicle,_position, [], 0, "CAN_COLLIDE"];
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_veh];
_veh setVariable ["ObjectID",1,true];

dayzFire = [_veh,2,time,false,false];
publicVariable "dayzFire";
if (isServer) then {
nul=dayzFire spawn BIS_Effects_Burn;
};

_num = round(random 5) + 3;

if (_randomvehicle == "UH1Wreck_DZ") then { _num = round(random 3) + 4; };

switch (_vehicleloottype) do {
case "HeliCrash": {
_itemType = [["Skin_Sniper1_DZ","magazine"], ["Skin_Soldier1_DZ", "magazine"], ["DZ_Backpack_EP1","object"]];
_itemChance = [0.01, 0.01, 0.015];
};
};

diag_log("DEBUG: Spawning a " + str (_randomvehicle) + " at " + str(_position) + " with loot type " + str(_vehicleloottype) + " With total loot drops = " + str(_num));

waituntil {!isnil "fnc_buildWeightedArray"};

_weights = [];
_weights =[_itemType,_itemChance] call fnc_buildWeightedArray;
for "_x" from 1 to _num do {
_index = _weights call BIS_fnc_selectRandom;
sleep 1;
if (count _itemType > _index) then {
_iArray = _itemType select _index;
_iArray set [2,_position];
_iArray set [3,5];
_iArray call spawn_loot;
_nearby = _position nearObjects ["WeaponHolder",20];
{
_x setVariable ["permaLoot",true];
} forEach _nearBy;
};
};
};

its a modifed version of the carepackage or wreck drops
 
Back
Top