I've been trying to get a larger amount of crashed choppers spawning so people don't camp the airfields non stop and have more organic fights out in the country instead of snipe/get sniped at airfield.
To that end, I was pointed to this in the server.pbo under server_monitor.
I changed it from "1 to 5" to the above. It seems to do nothing.
I also found this in server_functions:
A couple months back, I had 18 repairable hueys on the server. It seemed then the amount of chopper crashes was huge. Did that have anything to do with it? Frankly, I'm not sure, I was on Anti-rocket back then, and who knows.
Does anyone have a definitive answer about how to increase chopper crash numbers?
To that end, I was pointed to this in the server.pbo under server_monitor.
//Spawn crashed helos
for "_x" from 10 to 12 do {
_id = [] spawn spawn_heliCrash;
//waitUntil{scriptDone _id};
};
I changed it from "1 to 5" to the above. It seems to do nothing.
I also found this in server_functions:
I changed _num = round(random 10) + 3; where 10 was 1. Also nothing seems to have changed.spawn_heliCrash = {
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;
_veh = createVehicle ["UH1Wreck_DZ",_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 10) + 3;
_config = configFile >> "CfgBuildingLoot" >> "HeliCrash";
_itemType = [] + getArray (_config >> "itemType");
//diag_log ("DW_DEBUG: _itemType: " + str(_itemType));
_itemChance = [] + getArray (_config >> "itemChance");
//diag_log ("DW_DEBUG: _itemChance: " + str(_itemChance));
//diag_log ("DW_DEBUG: (isnil fnc_buildWeightedArray): " + str(isnil "fnc_buildWeightedArray"));
waituntil {!isnil "fnc_buildWeightedArray"};
_weights = [];
_weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
//diag_log ("DW_DEBUG: _weights: " + str(_weights));
for "_x" from 1 to _num do {
//create loot
_index = _weights call BIS_fnc_selectRandom;
sleep 1;
if (count _itemType > _index) then {
//diag_log ("DW_DEBUG: " + str(count (_itemType)) + " select " + str(_index));
_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;
};
};
};
};
A couple months back, I had 18 repairable hueys on the server. It seemed then the amount of chopper crashes was huge. Did that have anything to do with it? Frankly, I'm not sure, I was on Anti-rocket back then, and who knows.
Does anyone have a definitive answer about how to increase chopper crash numbers?