Merge remote-tracking branch 'refs/remotes/origin/development'
This commit is contained in:
commit
9a23f920d5
@ -1,3 +1,8 @@
|
||||
=================================================================================
|
||||
V32 (29-04-2016)
|
||||
=================================================================================
|
||||
Added checks for valide vehicles in Sky, Sea and Vehicle modules
|
||||
|
||||
=================================================================================
|
||||
V28-V31 (27-04-2016)
|
||||
=================================================================================
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Server Occupation script by second_coming
|
||||
//
|
||||
SC_occupationVersion = "v31 (27-04-2016)";
|
||||
SC_occupationVersion = "v32 (29-04-2016)";
|
||||
//
|
||||
// http://www.exilemod.com/profile/60-second_coming/
|
||||
//
|
||||
|
14
readme.txt
14
readme.txt
@ -1,14 +0,0 @@
|
||||
V28-V31 (27-04-2016)
|
||||
Altereed a few eventhandlers
|
||||
Fixed multiple static spawns so they are independent of each other
|
||||
|
||||
|
||||
V27 (26-04-2016) Development Update
|
||||
|
||||
Added the option fully control the gear assigned to bandit and survivor units
|
||||
|
||||
Added the option for helicopters as public transport, the heli travels between traders and lands for about 60 seconds. Setting SC_occupyTransportClass to a helicopter classname will switch it over to using a helicopter, if you want to continue using the land vehicle set SC_occupyTransportClass to a land vehicle.
|
||||
|
||||
Added the option to set the maximum crew (crew count will be a random number between the max and min). The applies for all AI vehicles.
|
||||
|
||||
Added a separate SC_VehicleClassToUseRare list of vehicles which spawn 10% of the time in place of the standard SC_VehicleClassToUse list.
|
@ -44,153 +44,162 @@ for "_i" from 1 to _vehiclesToSpawn do
|
||||
{
|
||||
private["_group"];
|
||||
_spawnLocation = [ 250, 0, 1, 1000, 1000, 1000, 1000, 1000, true, true ] call DMS_fnc_findSafePos;
|
||||
_group = createGroup SC_BanditSide;
|
||||
|
||||
_VehicleClassToUse = SC_BoatClassToUse call BIS_fnc_selectRandom;
|
||||
_vehicle = createVehicle [_VehicleClassToUse, _spawnLocation, [], 0, "NONE"];
|
||||
_vehicle setPosASL _spawnLocation;
|
||||
_vehicle setVariable["vehPos",_spawnLocation,true];
|
||||
_vehicle setVariable["vehClass",_VehicleClassToUse,true];
|
||||
_vehicle setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true];
|
||||
|
||||
// Remove the overpowered weapons from boats
|
||||
_vehicle removeWeaponTurret ["HMG_01",[0]];
|
||||
_vehicle removeWeaponTurret ["GMG_40mm",[0]];
|
||||
|
||||
SC_liveBoats = SC_liveBoats + 1;
|
||||
SC_liveBoatsArray = SC_liveBoatsArray + [_vehicle];
|
||||
|
||||
_vehicle setVehiclePosition [_spawnLocation, [], 0, "NONE"];
|
||||
_vehicle setVariable ["vehicleID", _spawnLocation, true];
|
||||
_vehicle setFuel 1;
|
||||
_vehicle setDamage 0;
|
||||
_vehicle engineOn true;
|
||||
_vehicle lock 0;
|
||||
_vehicle setVehicleLock "UNLOCKED";
|
||||
_vehicle setVariable ["ExileIsLocked", 0, true];
|
||||
_vehicle action ["LightOn", _vehicle];
|
||||
sleep 0.2;
|
||||
_group addVehicle _vehicle;
|
||||
|
||||
// Calculate the number of seats in the vehicle and fill the required amount
|
||||
_crewRequired = SC_minimumCrewAmount;
|
||||
if(SC_maximumCrewAmount > SC_minimumCrewAmount) then
|
||||
{
|
||||
_crewRequired = floor(random[SC_minimumCrewAmount,SC_maximumCrewAmount-SC_minimumCrewAmount,SC_maximumCrewAmount]);
|
||||
};
|
||||
_amountOfCrew = 0;
|
||||
_unitPlaced = false;
|
||||
_vehicleRoles = (typeOf _vehicle) call bis_fnc_vehicleRoles;
|
||||
if(!isNil "_vehicle") then
|
||||
{
|
||||
_unitPlaced = false;
|
||||
_vehicleRole = _x select 0;
|
||||
_vehicleSeat = _x select 1;
|
||||
if(_vehicleRole == "Driver") then
|
||||
{
|
||||
_unit = [_group,_spawnLocation,"assault","random","bandit","Vehicle"] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit assignAsDriver _vehicle;
|
||||
_unit moveInDriver _vehicle;
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(_vehicleRole == "Turret") then
|
||||
{
|
||||
_unit = [_group,_spawnLocation,"assault","random","bandit","Vehicle"] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit moveInTurret [_vehicle, _vehicleSeat];
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(_vehicleRole == "CARGO" && _amountOfCrew < _crewRequired) then
|
||||
{
|
||||
_unit = [_group,_spawnLocation,"assault","random","bandit","Vehicle"] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit assignAsCargo _vehicle;
|
||||
_unit moveInCargo _vehicle;
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
_unitPlaced = true;
|
||||
};
|
||||
_group = createGroup SC_BanditSide;
|
||||
_vehicle setPosASL _spawnLocation;
|
||||
_vehicle setVariable["vehPos",_spawnLocation,true];
|
||||
_vehicle setVariable["vehClass",_VehicleClassToUse,true];
|
||||
_vehicle setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true];
|
||||
|
||||
// Remove the overpowered weapons from boats
|
||||
_vehicle removeWeaponTurret ["HMG_01",[0]];
|
||||
_vehicle removeWeaponTurret ["GMG_40mm",[0]];
|
||||
|
||||
if(SC_extendedLogging && _unitPlaced) then
|
||||
SC_liveBoats = SC_liveBoats + 1;
|
||||
SC_liveBoatsArray = SC_liveBoatsArray + [_vehicle];
|
||||
|
||||
_vehicle setVehiclePosition [_spawnLocation, [], 0, "NONE"];
|
||||
_vehicle setVariable ["vehicleID", _spawnLocation, true];
|
||||
_vehicle setFuel 1;
|
||||
_vehicle setDamage 0;
|
||||
_vehicle engineOn true;
|
||||
_vehicle lock 0;
|
||||
_vehicle setVehicleLock "UNLOCKED";
|
||||
_vehicle setVariable ["ExileIsLocked", 0, true];
|
||||
_vehicle action ["LightOn", _vehicle];
|
||||
sleep 0.2;
|
||||
_group addVehicle _vehicle;
|
||||
|
||||
// Calculate the number of seats in the vehicle and fill the required amount
|
||||
_crewRequired = SC_minimumCrewAmount;
|
||||
if(SC_maximumCrewAmount > SC_minimumCrewAmount) then
|
||||
{
|
||||
_logDetail = format['[OCCUPATION:Sky] %1 added to %2',_vehicleRole,_vehicle];
|
||||
_crewRequired = floor(random[SC_minimumCrewAmount,SC_maximumCrewAmount-SC_minimumCrewAmount,SC_maximumCrewAmount]);
|
||||
};
|
||||
_amountOfCrew = 0;
|
||||
_unitPlaced = false;
|
||||
_vehicleRoles = (typeOf _vehicle) call bis_fnc_vehicleRoles;
|
||||
{
|
||||
_unitPlaced = false;
|
||||
_vehicleRole = _x select 0;
|
||||
_vehicleSeat = _x select 1;
|
||||
if(_vehicleRole == "Driver") then
|
||||
{
|
||||
_unit = [_group,_spawnLocation,"assault","random","bandit","Vehicle"] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit assignAsDriver _vehicle;
|
||||
_unit moveInDriver _vehicle;
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(_vehicleRole == "Turret") then
|
||||
{
|
||||
_unit = [_group,_spawnLocation,"assault","random","bandit","Vehicle"] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit moveInTurret [_vehicle, _vehicleSeat];
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(_vehicleRole == "CARGO" && _amountOfCrew < _crewRequired) then
|
||||
{
|
||||
_unit = [_group,_spawnLocation,"assault","random","bandit","Vehicle"] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit assignAsCargo _vehicle;
|
||||
_unit moveInCargo _vehicle;
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
_unitPlaced = true;
|
||||
};
|
||||
|
||||
if(SC_extendedLogging && _unitPlaced) then
|
||||
{
|
||||
_logDetail = format['[OCCUPATION:Sky] %1 added to %2',_vehicleRole,_vehicle];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
};
|
||||
} forEach _vehicleRoles;
|
||||
|
||||
{
|
||||
_unit = _x;
|
||||
[_unit] joinSilent grpNull;
|
||||
[_unit] joinSilent _group;
|
||||
}foreach units _group;
|
||||
|
||||
if(SC_infiSTAR_log) then
|
||||
{
|
||||
_logDetail = format['[OCCUPATION:Sea] %1 spawned @ %2',_VehicleClassToUse,_spawnLocation];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
};
|
||||
} forEach _vehicleRoles;
|
||||
|
||||
{
|
||||
_unit = _x;
|
||||
[_unit] joinSilent grpNull;
|
||||
[_unit] joinSilent _group;
|
||||
}foreach units _group;
|
||||
};
|
||||
|
||||
if(SC_infiSTAR_log) then
|
||||
{
|
||||
_logDetail = format['[OCCUPATION:Sea] %1 spawned @ %2',_VehicleClassToUse,_spawnLocation];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
};
|
||||
|
||||
clearMagazineCargoGlobal _vehicle;
|
||||
clearWeaponCargoGlobal _vehicle;
|
||||
clearItemCargoGlobal _vehicle;
|
||||
|
||||
|
||||
clearMagazineCargoGlobal _vehicle;
|
||||
clearWeaponCargoGlobal _vehicle;
|
||||
clearItemCargoGlobal _vehicle;
|
||||
_vehicle addMagazineCargoGlobal ["HandGrenade", (random 2)];
|
||||
_vehicle addItemCargoGlobal ["ItemGPS", (random 1)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_InstaDoc", (random 1)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_PlasticBottleFreshWater", 2 + (random 2)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_EMRE", 2 + (random 2)];
|
||||
|
||||
// Add weapons with ammo to the vehicle
|
||||
_possibleWeapons =
|
||||
[
|
||||
"arifle_MXM_Black_F",
|
||||
"arifle_MXM_F",
|
||||
"srifle_DMR_01_F",
|
||||
"srifle_DMR_02_camo_F",
|
||||
"srifle_DMR_02_F",
|
||||
"srifle_DMR_02_sniper_F",
|
||||
"srifle_DMR_03_F",
|
||||
"srifle_DMR_03_khaki_F",
|
||||
"srifle_DMR_03_multicam_F",
|
||||
"srifle_DMR_03_tan_F",
|
||||
"srifle_DMR_03_woodland_F",
|
||||
"srifle_DMR_04_F",
|
||||
"srifle_DMR_04_Tan_F",
|
||||
"srifle_DMR_05_blk_F",
|
||||
"srifle_DMR_05_hex_F",
|
||||
"srifle_DMR_05_tan_f",
|
||||
"srifle_DMR_06_camo_F",
|
||||
"srifle_DMR_06_olive_F",
|
||||
"srifle_EBR_F",
|
||||
"srifle_GM6_camo_F",
|
||||
"srifle_GM6_F",
|
||||
"srifle_LRR_camo_F",
|
||||
"srifle_LRR_F"
|
||||
];
|
||||
_amountOfWeapons = 1 + (random 3);
|
||||
|
||||
for "_i" from 1 to _amountOfWeapons do
|
||||
{
|
||||
_weaponToAdd = _possibleWeapons call BIS_fnc_selectRandom;
|
||||
_vehicle addWeaponCargoGlobal [_weaponToAdd,1];
|
||||
|
||||
_magazinesToAdd = getArray (configFile >> "CfgWeapons" >> _weaponToAdd >> "magazines");
|
||||
_vehicle addMagazineCargoGlobal [(_magazinesToAdd select 0),round random 3];
|
||||
};
|
||||
|
||||
_vehicle addMagazineCargoGlobal ["HandGrenade", (random 2)];
|
||||
_vehicle addItemCargoGlobal ["ItemGPS", (random 1)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_InstaDoc", (random 1)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_PlasticBottleFreshWater", 2 + (random 2)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_EMRE", 2 + (random 2)];
|
||||
|
||||
// Add weapons with ammo to the vehicle
|
||||
_possibleWeapons =
|
||||
[
|
||||
"arifle_MXM_Black_F",
|
||||
"arifle_MXM_F",
|
||||
"srifle_DMR_01_F",
|
||||
"srifle_DMR_02_camo_F",
|
||||
"srifle_DMR_02_F",
|
||||
"srifle_DMR_02_sniper_F",
|
||||
"srifle_DMR_03_F",
|
||||
"srifle_DMR_03_khaki_F",
|
||||
"srifle_DMR_03_multicam_F",
|
||||
"srifle_DMR_03_tan_F",
|
||||
"srifle_DMR_03_woodland_F",
|
||||
"srifle_DMR_04_F",
|
||||
"srifle_DMR_04_Tan_F",
|
||||
"srifle_DMR_05_blk_F",
|
||||
"srifle_DMR_05_hex_F",
|
||||
"srifle_DMR_05_tan_f",
|
||||
"srifle_DMR_06_camo_F",
|
||||
"srifle_DMR_06_olive_F",
|
||||
"srifle_EBR_F",
|
||||
"srifle_GM6_camo_F",
|
||||
"srifle_GM6_F",
|
||||
"srifle_LRR_camo_F",
|
||||
"srifle_LRR_F"
|
||||
];
|
||||
_amountOfWeapons = 1 + (random 3);
|
||||
|
||||
for "_i" from 1 to _amountOfWeapons do
|
||||
{
|
||||
_weaponToAdd = _possibleWeapons call BIS_fnc_selectRandom;
|
||||
_vehicle addWeaponCargoGlobal [_weaponToAdd,1];
|
||||
|
||||
_magazinesToAdd = getArray (configFile >> "CfgWeapons" >> _weaponToAdd >> "magazines");
|
||||
_vehicle addMagazineCargoGlobal [(_magazinesToAdd select 0),round random 3];
|
||||
};
|
||||
|
||||
|
||||
[_group, _spawnLocation, 4000] call bis_fnc_taskPatrol;
|
||||
_group setBehaviour "AWARE";
|
||||
_group setCombatMode "RED";
|
||||
_vehicle addEventHandler ["getin", "_this call SC_fnc_claimVehicle;"];
|
||||
_vehicle addMPEventHandler ["mpkilled", "_this call SC_fnc_vehicleDestroyed;"];
|
||||
_vehicle addMPEventHandler ["mphit", "_this call SC_fnc_boatHit;"];
|
||||
_vehicle setVariable ["SC_crewEjected", false,true];
|
||||
sleep 0.2;
|
||||
|
||||
|
||||
[_group, _spawnLocation, 4000] call bis_fnc_taskPatrol;
|
||||
_group setBehaviour "AWARE";
|
||||
_group setCombatMode "RED";
|
||||
_vehicle addEventHandler ["getin", "_this call SC_fnc_claimVehicle;"];
|
||||
_vehicle addMPEventHandler ["mpkilled", "_this call SC_fnc_vehicleDestroyed;"];
|
||||
_vehicle addMPEventHandler ["mphit", "_this call SC_fnc_boatHit;"];
|
||||
_vehicle setVariable ["SC_crewEjected", false,true];
|
||||
sleep 0.2;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
_logDetail = format['[OCCUPATION:Sea] Vehicle %1 failed to spawn @ %2',_VehicleClassToUse, _spawnLocation];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
_logDetail = format['[OCCUPATION:Sea] Running'];
|
||||
[_logDetail] call SC_fnc_log;
|
@ -68,155 +68,162 @@ for "_i" from 1 to _vehiclesToSpawn do
|
||||
_safePos = [_position,10,100,5,0,20,0] call BIS_fnc_findSafePos;
|
||||
_height = 350 + (round (random 200));
|
||||
_spawnLocation = [_safePos select 0, _safePos select 1, _height];
|
||||
|
||||
_group = createGroup SC_BanditSide;
|
||||
_VehicleClassToUse = SC_HeliClassToUse call BIS_fnc_selectRandom;
|
||||
|
||||
_vehicle = createVehicle [_VehicleClassToUse, _spawnLocation, [], 0, "NONE"];
|
||||
_group addVehicle _vehicle;
|
||||
_vehicle setVariable["vehPos",_spawnLocation,true];
|
||||
_vehicle setVariable["vehClass",_VehicleClassToUse,true];
|
||||
_vehicle setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true];
|
||||
|
||||
SC_liveHelis = SC_liveHelis + 1;
|
||||
SC_liveHelisArray = SC_liveHelisArray + [_vehicle];
|
||||
|
||||
_vehicle setVehiclePosition [_spawnLocation, [], 0, "FLY"];
|
||||
_vehicle setVariable ["vehicleID", _spawnLocation, true];
|
||||
_vehicle setFuel 1;
|
||||
_vehicle setDamage 0;
|
||||
_vehicle engineOn true;
|
||||
_vehicle flyInHeight 150;
|
||||
_vehicle lock 0;
|
||||
_vehicle setVehicleLock "UNLOCKED";
|
||||
_vehicle setVariable ["ExileIsLocked", 0, true];
|
||||
_vehicle action ["LightOn", _vehicle];
|
||||
|
||||
// Calculate the number of seats in the vehicle and fill the required amount
|
||||
_crewRequired = SC_minimumCrewAmount;
|
||||
if(SC_maximumCrewAmount > SC_minimumCrewAmount) then
|
||||
{
|
||||
_crewRequired = floor(random[SC_minimumCrewAmount,SC_maximumCrewAmount-SC_minimumCrewAmount,SC_maximumCrewAmount]);
|
||||
};
|
||||
_amountOfCrew = 0;
|
||||
_unitPlaced = false;
|
||||
_vehicleRoles = (typeOf _vehicle) call bis_fnc_vehicleRoles;
|
||||
{
|
||||
_unitPlaced = false;
|
||||
_vehicleRole = _x select 0;
|
||||
_vehicleSeat = _x select 1;
|
||||
if(_vehicleRole == "Driver") then
|
||||
{
|
||||
_loadOut = ["bandit"] call SC_fnc_selectGear;
|
||||
_unit = [_group,_spawnLocation,"custom","random","bandit","Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit assignAsDriver _vehicle;
|
||||
_unit moveInDriver _vehicle;
|
||||
//_vehicle lockDriver true;
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
removeBackpackGlobal _unit;
|
||||
_unit addBackpackGlobal "B_Parachute";
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(_vehicleRole == "Turret") then
|
||||
{
|
||||
_loadOut = ["bandit"] call SC_fnc_selectGear;
|
||||
_unit = [_group,_spawnLocation,"custom","random","bandit","Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit moveInTurret [_vehicle, _vehicleSeat];
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
removeBackpackGlobal _unit;
|
||||
_unit addBackpackGlobal "B_Parachute";
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(_vehicleRole == "CARGO" && _amountOfCrew < _crewRequired) then
|
||||
{
|
||||
_loadOut = ["bandit"] call SC_fnc_selectGear;
|
||||
_unit = [_group,_spawnLocation,"custom","random","bandit","Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit assignAsCargo _vehicle;
|
||||
_unit moveInCargo _vehicle;
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
removeBackpackGlobal _unit;
|
||||
_unit addBackpackGlobal "B_Parachute";
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(SC_extendedLogging) then
|
||||
{
|
||||
_logDetail = format['[OCCUPATION:Sky] %1 added to %2',_vehicleRole,_vehicle];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
};
|
||||
} forEach _vehicleRoles;
|
||||
|
||||
{
|
||||
_unit = _x;
|
||||
[_unit] joinSilent grpNull;
|
||||
[_unit] joinSilent _group;
|
||||
}foreach units _group;
|
||||
|
||||
if(SC_extendedLogging && _unitPlaced) then
|
||||
{
|
||||
_logDetail = format['[OCCUPATION:Sky] %1 spawned @ %2',_VehicleClassToUse,_spawnLocation];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
};
|
||||
|
||||
clearMagazineCargoGlobal _vehicle;
|
||||
clearWeaponCargoGlobal _vehicle;
|
||||
clearItemCargoGlobal _vehicle;
|
||||
|
||||
_vehicle addMagazineCargoGlobal ["HandGrenade", (random 2)];
|
||||
_vehicle addItemCargoGlobal ["ItemGPS", (random 1)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_InstaDoc", (random 1)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_PlasticBottleFreshWater", 2 + (random 2)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_EMRE", 2 + (random 2)];
|
||||
|
||||
// Add weapons with ammo to the vehicle
|
||||
_possibleWeapons =
|
||||
[
|
||||
"arifle_MXM_Black_F",
|
||||
"arifle_MXM_F",
|
||||
"srifle_DMR_01_F",
|
||||
"srifle_DMR_02_camo_F",
|
||||
"srifle_DMR_02_F",
|
||||
"srifle_DMR_02_sniper_F",
|
||||
"srifle_DMR_03_F",
|
||||
"srifle_DMR_03_khaki_F",
|
||||
"srifle_DMR_03_multicam_F",
|
||||
"srifle_DMR_03_tan_F",
|
||||
"srifle_DMR_03_woodland_F",
|
||||
"srifle_DMR_04_F",
|
||||
"srifle_DMR_04_Tan_F",
|
||||
"srifle_DMR_05_blk_F",
|
||||
"srifle_DMR_05_hex_F",
|
||||
"srifle_DMR_05_tan_f",
|
||||
"srifle_DMR_06_camo_F",
|
||||
"srifle_DMR_06_olive_F",
|
||||
"srifle_EBR_F",
|
||||
"srifle_GM6_camo_F",
|
||||
"srifle_GM6_F",
|
||||
"srifle_LRR_camo_F",
|
||||
"srifle_LRR_F"
|
||||
];
|
||||
_amountOfWeapons = 1 + (random 3);
|
||||
|
||||
for "_i" from 1 to _amountOfWeapons do
|
||||
if(!isNil "_vehicle") then
|
||||
{
|
||||
_weaponToAdd = _possibleWeapons call BIS_fnc_selectRandom;
|
||||
_vehicle addWeaponCargoGlobal [_weaponToAdd,1];
|
||||
|
||||
_magazinesToAdd = getArray (configFile >> "CfgWeapons" >> _weaponToAdd >> "magazines");
|
||||
_vehicle addMagazineCargoGlobal [(_magazinesToAdd select 0),round random 3];
|
||||
};
|
||||
_group = createGroup SC_BanditSide;
|
||||
_group addVehicle _vehicle;
|
||||
_vehicle setVariable["vehPos",_spawnLocation,true];
|
||||
_vehicle setVariable["vehClass",_VehicleClassToUse,true];
|
||||
_vehicle setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true];
|
||||
|
||||
|
||||
[_group, _spawnLocation, 2000] call bis_fnc_taskPatrol;
|
||||
_group setBehaviour "AWARE";
|
||||
_group setCombatMode "RED";
|
||||
_vehicle addEventHandler ["getin", "_this call SC_fnc_claimVehicle;"];
|
||||
_vehicle addMPEventHandler ["mpkilled", "_this call SC_fnc_vehicleDestroyed;"];
|
||||
_vehicle addMPEventHandler ["mphit", "_this call SC_fnc_airHit;"];
|
||||
_vehicle setVariable ["SC_crewEjected", false,true];
|
||||
sleep 0.2;
|
||||
|
||||
SC_liveHelis = SC_liveHelis + 1;
|
||||
SC_liveHelisArray = SC_liveHelisArray + [_vehicle];
|
||||
|
||||
_vehicle setVehiclePosition [_spawnLocation, [], 0, "FLY"];
|
||||
_vehicle setVariable ["vehicleID", _spawnLocation, true];
|
||||
_vehicle setFuel 1;
|
||||
_vehicle setDamage 0;
|
||||
_vehicle engineOn true;
|
||||
_vehicle flyInHeight 150;
|
||||
_vehicle lock 0;
|
||||
_vehicle setVehicleLock "UNLOCKED";
|
||||
_vehicle setVariable ["ExileIsLocked", 0, true];
|
||||
_vehicle action ["LightOn", _vehicle];
|
||||
|
||||
// Calculate the number of seats in the vehicle and fill the required amount
|
||||
_crewRequired = SC_minimumCrewAmount;
|
||||
if(SC_maximumCrewAmount > SC_minimumCrewAmount) then
|
||||
{
|
||||
_crewRequired = floor(random[SC_minimumCrewAmount,SC_maximumCrewAmount-SC_minimumCrewAmount,SC_maximumCrewAmount]);
|
||||
};
|
||||
_amountOfCrew = 0;
|
||||
_unitPlaced = false;
|
||||
_vehicleRoles = (typeOf _vehicle) call bis_fnc_vehicleRoles;
|
||||
{
|
||||
_unitPlaced = false;
|
||||
_vehicleRole = _x select 0;
|
||||
_vehicleSeat = _x select 1;
|
||||
if(_vehicleRole == "Driver") then
|
||||
{
|
||||
_loadOut = ["bandit"] call SC_fnc_selectGear;
|
||||
_unit = [_group,_spawnLocation,"custom","random","bandit","Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit assignAsDriver _vehicle;
|
||||
_unit moveInDriver _vehicle;
|
||||
//_vehicle lockDriver true;
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
removeBackpackGlobal _unit;
|
||||
_unit addBackpackGlobal "B_Parachute";
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(_vehicleRole == "Turret") then
|
||||
{
|
||||
_loadOut = ["bandit"] call SC_fnc_selectGear;
|
||||
_unit = [_group,_spawnLocation,"custom","random","bandit","Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit moveInTurret [_vehicle, _vehicleSeat];
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
removeBackpackGlobal _unit;
|
||||
_unit addBackpackGlobal "B_Parachute";
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(_vehicleRole == "CARGO" && _amountOfCrew < _crewRequired) then
|
||||
{
|
||||
_loadOut = ["bandit"] call SC_fnc_selectGear;
|
||||
_unit = [_group,_spawnLocation,"custom","random","bandit","Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit assignAsCargo _vehicle;
|
||||
_unit moveInCargo _vehicle;
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
removeBackpackGlobal _unit;
|
||||
_unit addBackpackGlobal "B_Parachute";
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(SC_extendedLogging) then
|
||||
{
|
||||
_logDetail = format['[OCCUPATION:Sky] %1 added to %2',_vehicleRole,_vehicle];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
};
|
||||
} forEach _vehicleRoles;
|
||||
|
||||
{
|
||||
_unit = _x;
|
||||
[_unit] joinSilent grpNull;
|
||||
[_unit] joinSilent _group;
|
||||
}foreach units _group;
|
||||
|
||||
if(SC_extendedLogging && _unitPlaced) then
|
||||
{
|
||||
_logDetail = format['[OCCUPATION:Sky] %1 spawned @ %2',_VehicleClassToUse,_spawnLocation];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
};
|
||||
|
||||
clearMagazineCargoGlobal _vehicle;
|
||||
clearWeaponCargoGlobal _vehicle;
|
||||
clearItemCargoGlobal _vehicle;
|
||||
|
||||
_vehicle addMagazineCargoGlobal ["HandGrenade", (random 2)];
|
||||
_vehicle addItemCargoGlobal ["ItemGPS", (random 1)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_InstaDoc", (random 1)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_PlasticBottleFreshWater", 2 + (random 2)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_EMRE", 2 + (random 2)];
|
||||
|
||||
// Add weapons with ammo to the vehicle
|
||||
_possibleWeapons =
|
||||
[
|
||||
"arifle_MXM_Black_F",
|
||||
"arifle_MXM_F",
|
||||
"srifle_DMR_01_F",
|
||||
"srifle_DMR_02_camo_F",
|
||||
"srifle_DMR_02_F",
|
||||
"srifle_DMR_02_sniper_F",
|
||||
"srifle_DMR_03_F",
|
||||
"srifle_DMR_03_khaki_F",
|
||||
"srifle_DMR_03_multicam_F",
|
||||
"srifle_DMR_03_tan_F",
|
||||
"srifle_DMR_03_woodland_F",
|
||||
"srifle_DMR_04_F",
|
||||
"srifle_DMR_04_Tan_F",
|
||||
"srifle_DMR_05_blk_F",
|
||||
"srifle_DMR_05_hex_F",
|
||||
"srifle_DMR_05_tan_f",
|
||||
"srifle_DMR_06_camo_F",
|
||||
"srifle_DMR_06_olive_F",
|
||||
"srifle_EBR_F",
|
||||
"srifle_GM6_camo_F",
|
||||
"srifle_GM6_F",
|
||||
"srifle_LRR_camo_F",
|
||||
"srifle_LRR_F"
|
||||
];
|
||||
_amountOfWeapons = 1 + (random 3);
|
||||
|
||||
for "_i" from 1 to _amountOfWeapons do
|
||||
{
|
||||
_weaponToAdd = _possibleWeapons call BIS_fnc_selectRandom;
|
||||
_vehicle addWeaponCargoGlobal [_weaponToAdd,1];
|
||||
|
||||
_magazinesToAdd = getArray (configFile >> "CfgWeapons" >> _weaponToAdd >> "magazines");
|
||||
_vehicle addMagazineCargoGlobal [(_magazinesToAdd select 0),round random 3];
|
||||
};
|
||||
|
||||
|
||||
[_group, _spawnLocation, 2000] call bis_fnc_taskPatrol;
|
||||
_group setBehaviour "AWARE";
|
||||
_group setCombatMode "RED";
|
||||
_vehicle addEventHandler ["getin", "_this call SC_fnc_claimVehicle;"];
|
||||
_vehicle addMPEventHandler ["mpkilled", "_this call SC_fnc_vehicleDestroyed;"];
|
||||
_vehicle addMPEventHandler ["mphit", "_this call SC_fnc_airHit;"];
|
||||
_vehicle setVariable ["SC_crewEjected", false,true];
|
||||
sleep 0.2;
|
||||
}
|
||||
else
|
||||
{
|
||||
_logDetail = format['[OCCUPATION:Sky] Vehicle %1 failed to spawn @ %2',_VehicleClassToUse, _spawnLocation];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
@ -103,22 +103,11 @@ if(_vehiclesToSpawn >= 1) then
|
||||
_pos = [_position,10,250,5,0,20,0] call BIS_fnc_findSafePos;
|
||||
|
||||
// Get position of nearest roads
|
||||
_nearRoads = _pos nearRoads 500;
|
||||
_nearRoads = _pos nearRoads 2000;
|
||||
_nearestRoad = _nearRoads select 0;
|
||||
_nearestRoad = position (_nearRoads select 0);
|
||||
_spawnLocation = [_nearestRoad select 0, _pos select 1, 0];
|
||||
|
||||
_group = createGroup SC_BanditSide;
|
||||
if(_side == "survivor") then
|
||||
{
|
||||
deleteGroup _group;
|
||||
_group = createGroup SC_SurvivorSide;
|
||||
};
|
||||
|
||||
_group setVariable ["DMS_LockLocality",nil];
|
||||
_group setVariable ["DMS_SpawnedGroup",true];
|
||||
_group setVariable ["DMS_Group_Side", _side];
|
||||
|
||||
_VehicleClassToUse = SC_VehicleClassToUse call BIS_fnc_selectRandom;
|
||||
|
||||
// Percentage chance to spawn a rare vehicle
|
||||
@ -130,154 +119,170 @@ if(_vehiclesToSpawn >= 1) then
|
||||
|
||||
|
||||
_vehicle = createVehicle [_VehicleClassToUse, _spawnLocation, [], 0, "NONE"];
|
||||
_group addVehicle _vehicle;
|
||||
|
||||
SC_liveVehicles = SC_liveVehicles + 1;
|
||||
SC_liveVehiclesArray = SC_liveVehiclesArray + [_vehicle];
|
||||
|
||||
_vehicle setVariable["vehPos",_spawnLocation,true];
|
||||
_vehicle setVariable["vehClass",_VehicleClassToUse,true];
|
||||
_vehicle setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true];
|
||||
_vehicle setFuel 1;
|
||||
_vehicle engineOn true;
|
||||
|
||||
if(SC_occupyVehiclesLocked) then
|
||||
if(!isNil "_vehicle") then
|
||||
{
|
||||
_vehicle lock 2;
|
||||
_vehicle setVehicleLock "LOCKED";
|
||||
_vehicle setVariable ["ExileIsLocked", 1, true];
|
||||
_group = createGroup SC_BanditSide;
|
||||
if(_side == "survivor") then
|
||||
{
|
||||
deleteGroup _group;
|
||||
_group = createGroup SC_SurvivorSide;
|
||||
};
|
||||
|
||||
_group setVariable ["DMS_LockLocality",nil];
|
||||
_group setVariable ["DMS_SpawnedGroup",true];
|
||||
_group setVariable ["DMS_Group_Side", _side];
|
||||
|
||||
_group addVehicle _vehicle;
|
||||
|
||||
SC_liveVehicles = SC_liveVehicles + 1;
|
||||
SC_liveVehiclesArray = SC_liveVehiclesArray + [_vehicle];
|
||||
|
||||
_vehicle setVariable["vehPos",_spawnLocation,true];
|
||||
_vehicle setVariable["vehClass",_VehicleClassToUse,true];
|
||||
_vehicle setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true];
|
||||
_vehicle setFuel 1;
|
||||
_vehicle engineOn true;
|
||||
|
||||
if(SC_occupyVehiclesLocked) then
|
||||
{
|
||||
_vehicle lock 2;
|
||||
_vehicle setVehicleLock "LOCKED";
|
||||
_vehicle setVariable ["ExileIsLocked", 1, true];
|
||||
}
|
||||
else
|
||||
{
|
||||
_vehicle lock 0;
|
||||
_vehicle setVehicleLock "UNLOCKED";
|
||||
_vehicle setVariable ["ExileIsLocked", 0, true];
|
||||
};
|
||||
|
||||
_vehicle setSpeedMode "LIMITED";
|
||||
_vehicle limitSpeed 60;
|
||||
_vehicle action ["LightOn", _vehicle];
|
||||
|
||||
// Calculate the number of seats in the vehicle and fill the required amount
|
||||
_crewRequired = SC_minimumCrewAmount;
|
||||
if(SC_maximumCrewAmount > SC_minimumCrewAmount) then
|
||||
{
|
||||
_crewRequired = floor(random[SC_minimumCrewAmount,SC_maximumCrewAmount-SC_minimumCrewAmount,SC_maximumCrewAmount]);
|
||||
};
|
||||
_amountOfCrew = 0;
|
||||
_unitPlaced = false;
|
||||
_vehicleRoles = (typeOf _vehicle) call bis_fnc_vehicleRoles;
|
||||
{
|
||||
_unitPlaced = false;
|
||||
_vehicleRole = _x select 0;
|
||||
_vehicleSeat = _x select 1;
|
||||
if(_vehicleRole == "Driver") then
|
||||
{
|
||||
_loadOut = [_side] call SC_fnc_selectGear;
|
||||
_unit = [_group,_spawnLocation,"custom","random",_side,"Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit disableAI "FSM";
|
||||
[_side,_unit] call SC_fnc_addMarker;
|
||||
_unit removeAllMPEventHandlers "mphit";
|
||||
_unit removeAllMPEventHandlers "mpkilled";
|
||||
_unit disableAI "TARGET";
|
||||
_unit disableAI "AUTOTARGET";
|
||||
_unit disableAI "AUTOCOMBAT";
|
||||
_unit disableAI "COVER";
|
||||
_unit disableAI "SUPPRESSION";
|
||||
_unit assignAsDriver _vehicle;
|
||||
_unit moveInDriver _vehicle;
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
_unit setVariable ["SC_drivenVehicle", _vehicle,true];
|
||||
_unit addMPEventHandler ["mpkilled", "_this call SC_fnc_driverKilled;"];
|
||||
_vehicle setVariable ["SC_assignedDriver", _unit,true];
|
||||
_vehicle addEventHandler ["getin", "_this call SC_fnc_getIn;"];
|
||||
_vehicle addEventHandler ["getout", "_this call SC_fnc_getOut;"];
|
||||
_vehicle addMPEventHandler ["mpkilled", "_this call SC_fnc_vehicleDestroyed;"];
|
||||
_vehicle addMPEventHandler ["mphit", "_this call SC_fnc_repairVehicle;"];
|
||||
};
|
||||
if(_vehicleRole == "Turret" && _amountOfCrew < _crewRequired) then
|
||||
{
|
||||
_loadOut = [_side] call SC_fnc_selectGear;
|
||||
_unit = [_group,_spawnLocation,"custom","random",_side,"Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
[_side,_unit] call SC_fnc_addMarker;
|
||||
_unit moveInTurret [_vehicle, _vehicleSeat];
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
_unit addMPEventHandler ["mpkilled", "_this call SC_fnc_unitMPKilled;"];
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(_vehicleRole == "CARGO" && _amountOfCrew < _crewRequired) then
|
||||
{
|
||||
_loadOut = [_side] call SC_fnc_selectGear;
|
||||
_unit = [_group,_spawnLocation,"custom","random",_side,"Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
[_side,_unit] call SC_fnc_addMarker;
|
||||
_unit assignAsCargo _vehicle;
|
||||
_unit moveInCargo _vehicle;
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
_unit addMPEventHandler ["mpkilled", "_this call SC_fnc_unitMPKilled;"];
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(SC_extendedLogging && _unitPlaced) then
|
||||
{
|
||||
_logDetail = format['[OCCUPATION:Vehicle] %1 %2 added to vehicle %3',_side,_vehicleRole,_vehicle];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
};
|
||||
if(_amountOfCrew == _crewRequired) exitWith{};
|
||||
} forEach _vehicleRoles;
|
||||
|
||||
// Get the AI to shut the fuck up :)
|
||||
enableSentences false;
|
||||
enableRadio false;
|
||||
|
||||
_logDetail = format['[OCCUPATION:Vehicle] %3 vehicle %1 spawned @ %2',_VehicleClassToUse,_spawnLocation,_side];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
sleep 15;
|
||||
|
||||
{
|
||||
_x enableAI "FSM";
|
||||
}forEach units _group;
|
||||
|
||||
[_group, _spawnLocation, 2000] call bis_fnc_taskPatrol;
|
||||
_group setBehaviour "SAFE";
|
||||
_group setCombatMode "RED";
|
||||
sleep 0.2;
|
||||
|
||||
clearMagazineCargoGlobal _vehicle;
|
||||
clearWeaponCargoGlobal _vehicle;
|
||||
clearItemCargoGlobal _vehicle;
|
||||
|
||||
_vehicle addMagazineCargoGlobal ["HandGrenade", (random 2)];
|
||||
_vehicle addItemCargoGlobal ["ItemGPS", (random 1)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_InstaDoc", (random 1)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_PlasticBottleFreshWater", 2 + (random 2)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_EMRE", 2 + (random 2)];
|
||||
|
||||
// Add weapons with ammo to the vehicle
|
||||
_possibleWeapons =
|
||||
[
|
||||
"arifle_MXM_Black_F",
|
||||
"arifle_MXM_F",
|
||||
"arifle_MX_SW_Black_F",
|
||||
"arifle_MX_SW_F",
|
||||
"LMG_Mk200_F",
|
||||
"LMG_Zafir_F"
|
||||
];
|
||||
_amountOfWeapons = 1 + (random 3);
|
||||
|
||||
for "_i" from 1 to _amountOfWeapons do
|
||||
{
|
||||
_weaponToAdd = _possibleWeapons call BIS_fnc_selectRandom;
|
||||
_vehicle addWeaponCargoGlobal [_weaponToAdd,1];
|
||||
|
||||
_magazinesToAdd = getArray (configFile >> "CfgWeapons" >> _weaponToAdd >> "magazines");
|
||||
_vehicle addMagazineCargoGlobal [(_magazinesToAdd select 0),round random 3];
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
_vehicle lock 0;
|
||||
_vehicle setVehicleLock "UNLOCKED";
|
||||
_vehicle setVariable ["ExileIsLocked", 0, true];
|
||||
_logDetail = format['[OCCUPATION:Vehicle] Vehicle %1 failed to spawn @ %2',_VehicleClassToUse, _spawnLocation];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
};
|
||||
|
||||
_vehicle setSpeedMode "LIMITED";
|
||||
_vehicle limitSpeed 60;
|
||||
_vehicle action ["LightOn", _vehicle];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Calculate the number of seats in the vehicle and fill the required amount
|
||||
_crewRequired = SC_minimumCrewAmount;
|
||||
if(SC_maximumCrewAmount > SC_minimumCrewAmount) then
|
||||
{
|
||||
_crewRequired = floor(random[SC_minimumCrewAmount,SC_maximumCrewAmount-SC_minimumCrewAmount,SC_maximumCrewAmount]);
|
||||
};
|
||||
_amountOfCrew = 0;
|
||||
_unitPlaced = false;
|
||||
_vehicleRoles = (typeOf _vehicle) call bis_fnc_vehicleRoles;
|
||||
{
|
||||
_unitPlaced = false;
|
||||
_vehicleRole = _x select 0;
|
||||
_vehicleSeat = _x select 1;
|
||||
if(_vehicleRole == "Driver") then
|
||||
{
|
||||
_loadOut = [_side] call SC_fnc_selectGear;
|
||||
_unit = [_group,_spawnLocation,"custom","random",_side,"Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
_unit disableAI "FSM";
|
||||
[_side,_unit] call SC_fnc_addMarker;
|
||||
_unit removeAllMPEventHandlers "mphit";
|
||||
_unit removeAllMPEventHandlers "mpkilled";
|
||||
_unit disableAI "TARGET";
|
||||
_unit disableAI "AUTOTARGET";
|
||||
_unit disableAI "AUTOCOMBAT";
|
||||
_unit disableAI "COVER";
|
||||
_unit disableAI "SUPPRESSION";
|
||||
_unit assignAsDriver _vehicle;
|
||||
_unit moveInDriver _vehicle;
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
_unit setVariable ["SC_drivenVehicle", _vehicle,true];
|
||||
_unit addMPEventHandler ["mpkilled", "_this call SC_fnc_driverKilled;"];
|
||||
_vehicle setVariable ["SC_assignedDriver", _unit,true];
|
||||
_vehicle addEventHandler ["getin", "_this call SC_fnc_getIn;"];
|
||||
_vehicle addEventHandler ["getout", "_this call SC_fnc_getOut;"];
|
||||
_vehicle addMPEventHandler ["mpkilled", "_this call SC_fnc_vehicleDestroyed;"];
|
||||
_vehicle addMPEventHandler ["mphit", "_this call SC_fnc_repairVehicle;"];
|
||||
};
|
||||
if(_vehicleRole == "Turret" && _amountOfCrew < _crewRequired) then
|
||||
{
|
||||
_loadOut = [_side] call SC_fnc_selectGear;
|
||||
_unit = [_group,_spawnLocation,"custom","random",_side,"Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
[_side,_unit] call SC_fnc_addMarker;
|
||||
_unit moveInTurret [_vehicle, _vehicleSeat];
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
_unit addMPEventHandler ["mpkilled", "_this call SC_fnc_unitMPKilled;"];
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(_vehicleRole == "CARGO" && _amountOfCrew < _crewRequired) then
|
||||
{
|
||||
_loadOut = [_side] call SC_fnc_selectGear;
|
||||
_unit = [_group,_spawnLocation,"custom","random",_side,"Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
|
||||
_amountOfCrew = _amountOfCrew + 1;
|
||||
[_side,_unit] call SC_fnc_addMarker;
|
||||
_unit assignAsCargo _vehicle;
|
||||
_unit moveInCargo _vehicle;
|
||||
_unit setVariable ["DMS_AssignedVeh",_vehicle];
|
||||
_unit addMPEventHandler ["mpkilled", "_this call SC_fnc_unitMPKilled;"];
|
||||
_unitPlaced = true;
|
||||
};
|
||||
if(SC_extendedLogging && _unitPlaced) then
|
||||
{
|
||||
_logDetail = format['[OCCUPATION:Vehicle] %1 %2 added to vehicle %3',_side,_vehicleRole,_vehicle];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
};
|
||||
if(_amountOfCrew == _crewRequired) exitWith{};
|
||||
} forEach _vehicleRoles;
|
||||
|
||||
// Get the AI to shut the fuck up :)
|
||||
enableSentences false;
|
||||
enableRadio false;
|
||||
|
||||
_logDetail = format['[OCCUPATION:Vehicle] %3 vehicle %1 spawned @ %2',_VehicleClassToUse,_spawnLocation,_side];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
sleep 15;
|
||||
|
||||
{
|
||||
_x enableAI "FSM";
|
||||
}forEach units _group;
|
||||
|
||||
[_group, _spawnLocation, 2000] call bis_fnc_taskPatrol;
|
||||
_group setBehaviour "SAFE";
|
||||
_group setCombatMode "RED";
|
||||
sleep 0.2;
|
||||
|
||||
clearMagazineCargoGlobal _vehicle;
|
||||
clearWeaponCargoGlobal _vehicle;
|
||||
clearItemCargoGlobal _vehicle;
|
||||
|
||||
_vehicle addMagazineCargoGlobal ["HandGrenade", (random 2)];
|
||||
_vehicle addItemCargoGlobal ["ItemGPS", (random 1)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_InstaDoc", (random 1)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_PlasticBottleFreshWater", 2 + (random 2)];
|
||||
_vehicle addItemCargoGlobal ["Exile_Item_EMRE", 2 + (random 2)];
|
||||
|
||||
// Add weapons with ammo to the vehicle
|
||||
_possibleWeapons =
|
||||
[
|
||||
"arifle_MXM_Black_F",
|
||||
"arifle_MXM_F",
|
||||
"arifle_MX_SW_Black_F",
|
||||
"arifle_MX_SW_F",
|
||||
"LMG_Mk200_F",
|
||||
"LMG_Zafir_F"
|
||||
];
|
||||
_amountOfWeapons = 1 + (random 3);
|
||||
|
||||
for "_i" from 1 to _amountOfWeapons do
|
||||
{
|
||||
_weaponToAdd = _possibleWeapons call BIS_fnc_selectRandom;
|
||||
_vehicle addWeaponCargoGlobal [_weaponToAdd,1];
|
||||
|
||||
_magazinesToAdd = getArray (configFile >> "CfgWeapons" >> _weaponToAdd >> "magazines");
|
||||
_vehicle addMagazineCargoGlobal [(_magazinesToAdd select 0),round random 3];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -48,35 +48,35 @@ if(SC_occupyStatic) then
|
||||
|
||||
if(SC_occupySky) then
|
||||
{
|
||||
uiSleep 15; // delay the start
|
||||
uiSleep 30; // delay the start
|
||||
fnc_occupationSky = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\occupationSky.sqf";
|
||||
[SC_refreshTime, fnc_occupationSky, [], true] call ExileServer_system_thread_addTask;
|
||||
};
|
||||
|
||||
if(SC_occupySea) then
|
||||
{
|
||||
uiSleep 15; // delay the start
|
||||
uiSleep 30; // delay the start
|
||||
fnc_occupationSea = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\occupationSea.sqf";
|
||||
[SC_refreshTime, fnc_occupationSea, [], true] call ExileServer_system_thread_addTask;
|
||||
};
|
||||
|
||||
if(SC_occupyVehicle) then
|
||||
{
|
||||
uiSleep 15; // delay the start
|
||||
uiSleep 30; // delay the start
|
||||
fnc_occupationVehicle = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\occupationVehicle.sqf";
|
||||
[SC_refreshTime, fnc_occupationVehicle, [], true] call ExileServer_system_thread_addTask;
|
||||
};
|
||||
|
||||
if(SC_occupyPlaces) then
|
||||
{
|
||||
uiSleep 15; // delay the start
|
||||
uiSleep 30; // delay the start
|
||||
fnc_occupationPlaces = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\occupationPlaces.sqf";
|
||||
[SC_refreshTime, fnc_occupationPlaces, [], true] call ExileServer_system_thread_addTask;
|
||||
};
|
||||
|
||||
if(SC_occupyMilitary) then
|
||||
{
|
||||
uiSleep 15; // delay the start
|
||||
uiSleep 30; // delay the start
|
||||
fnc_occupationMilitary = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\occupationMilitary.sqf";
|
||||
[SC_refreshTime, fnc_occupationMilitary, [], true] call ExileServer_system_thread_addTask;
|
||||
};
|
||||
@ -86,7 +86,7 @@ if(SC_occupyTransport) then
|
||||
[] execVM "\x\addons\a3_exile_occupation\scripts\occupationTransport.sqf";
|
||||
};
|
||||
|
||||
uiSleep 15; // delay the start
|
||||
uiSleep 30; // delay the start
|
||||
fnc_occupationMonitor = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\occupationMonitor.sqf";
|
||||
[SC_refreshTime, fnc_occupationMonitor, [], true] call ExileServer_system_thread_addTask;
|
||||
|
||||
|
@ -1,63 +0,0 @@
|
||||
private ["_obj"];
|
||||
|
||||
_obj = [
|
||||
["Flag_Green_F",[6784.61,2234.17,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_LampHalogen_F",[6781.62,2236.18,4.76837e-007],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_BagBunker_Tower_F",[6785.5,2236.32,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall_corridor_F",[6792.26,2215.3,0],90.8969,[[0.999877,-0.0156535,0],[0,-0,1]],true],
|
||||
["Land_HBarrierWall_corner_F",[6787.26,2218.83,0],180,[[-8.74228e-008,-1,0],[-0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6802.85,2219.04,0],181.56,[[-0.0272239,-0.999629,0],[-0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6808.37,2219.03,0],181.56,[[-0.0272239,-0.999629,0],[-0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6786.7,2223.28,0],271.56,[[-0.999629,0.027224,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6797.38,2219.01,0],181.56,[[-0.0272239,-0.999629,0],[-0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6786.6,2228.88,0],271.56,[[-0.999629,0.027224,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6813.69,2219.18,0],181.56,[[-0.0272239,-0.999629,0],[-0,0,1]],true],
|
||||
["Land_BagBunker_Small_F",[6797.94,2212.17,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["WaterPump_01_forest_F",[6812.35,2222.43,0.0008564],0.00101824,[[1.75769e-005,1,0],[0,0,1]],true],
|
||||
["Land_Pipes_large_F",[6802.52,2223.54,0],180,[0,0,1],true],
|
||||
["Land_Pipes_large_F",[6802.98,2225.14,0],180,[0,0,1],true],
|
||||
["Land_Pipes_large_F",[6802.32,2221.82,0],180,[0,0,1],true],
|
||||
["Land_WaterTank_F",[6809.06,2221.62,-4.76837e-006],359.999,[0,0,1],true],
|
||||
["Land_Pallets_F",[6784.61,2234.17,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_Sign_WarningMilitaryArea_F",[6787.54,2212.37,0],8.19623e-005,[[1.5979e-006,1,0],[0,0,1]],true],
|
||||
["Land_BagFence_Round_F",[6786.37,2238.76,2.78],220,[[-0.642788,-0.766044,0],[-0,0,1]],true],
|
||||
["Land_BagFence_Round_F",[6784.2,2238.49,2.78],125,[[0.819152,-0.573576,0],[0,-0,1]],true],
|
||||
["Land_Pallet_F",[6784.56,2235.6,0.0981288],3.03364,[[0.0529221,0.998599,0],[0,0,1]],true],
|
||||
["Land_Pallet_F",[6784.55,2236.99,0.0814247],356.286,[[-0.0647757,0.9979,0],[0,0,1]],true],
|
||||
["Land_Pallet_F",[6784.54,2238.55,-4.76837e-007],360,[[1.74846e-007,1,0],[0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6794.19,2226.73,0],320,[[-0.642787,0.766045,0],[0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6791.38,2226.37,0],255,[[-0.965926,-0.258819,0],[-0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6793.82,2224.24,0],280,[[-0.984808,0.173649,0],[0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6791.46,2224.07,0],90,[[1,-4.37114e-008,0],[0,-0,1]],true],
|
||||
["Land_LampHalogen_F",[6802.4,2215.7,4.76837e-007],270,[[-1,4.88762e-007,0],[0,0,1]],true],
|
||||
["Land_HBarrierTower_F",[6787.46,2256.03,0],140,[[0.642787,-0.766045,0],[0,-0,1]],true],
|
||||
["Land_HBarrierWall6_F",[6786.93,2244.97,0],270,[[-1,4.88762e-007,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall6_F",[6794.56,2256.56,0],3.15003,[[0.0549506,0.998489,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall_corridor_F",[6811.83,2260.33,0],90.8969,[[0.999877,-0.0156535,0],[0,-0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6806.85,2256.56,0],1.56032,[[0.0272296,0.999629,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6786.79,2250.58,0],271.56,[[-0.999629,0.027224,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6801.41,2256.53,0],1.56,[[0.0272237,0.999629,0],[0,0,1]],true],
|
||||
["Land_BagBunker_Small_F",[6805.37,2261.99,0],180,[[-8.74228e-008,-1,0],[-0,0,1]],true],
|
||||
["Land_FieldToilet_F",[6806.4,2242.7,4.24385e-005],270,[[-1,4.88762e-007,0],[0,0,1]],true],
|
||||
["Land_Pallet_MilBoxes_F",[6811.32,2247.61,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_PaperBox_open_full_F",[6806.73,2251.91,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_PaperBox_open_full_F",[6809.12,2247.42,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_PaperBox_open_empty_F",[6809.19,2251.86,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6809.15,2249.86,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6806.56,2247.15,0],255,[[-0.965926,-0.258819,0],[-0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6806.51,2249.71,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_Pallets_stack_F",[6808.97,2245.2,-4.76837e-007],360,[[1.74846e-007,1,0],[0,0,1]],true],
|
||||
["Land_Pallet_vertical_F",[6808.94,2246.27,0.000220776],0.000954998,[[1.65116e-005,1,0],[0,0,1]],true],
|
||||
["Land_LampHalogen_F",[6800.11,2260.46,4.76837e-007],90,[[1,-4.37114e-008,0],[0,-0,1]],true],
|
||||
["Land_BagBunker_Large_F",[6821.33,2237.75,0],270,[[-1,4.88762e-007,0],[0,0,1]],true],
|
||||
["Land_HBarrierTower_F",[6817.26,2219.4,0],315,[[-0.707107,0.707107,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6817,2224.9,0],91.5603,[[0.999629,-0.0272291,0],[0,-0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6816.92,2230.47,0],91.5603,[[0.999629,-0.0272291,0],[0,-0,1]],true],
|
||||
["Land_LampHalogen_F",[6819.85,2232.55,4.76837e-007],180,[[-8.74228e-008,-1,0],[-0,0,1]],true],
|
||||
["Land_HBarrierWall_corner_F",[6816.66,2256.74,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6817.16,2252.26,0],91.5603,[[0.999629,-0.0272291,0],[0,-0,1]],true],
|
||||
["Land_Sign_WarningMilitaryArea_F",[6816.03,2262.96,0],180,[[-8.74228e-008,-1,0],[-0,0,1]],true],
|
||||
["Land_HBarrierWall6_F",[6817.3,2246.33,0],90,[[1,-4.37114e-008,0],[0,-0,1]],true]
|
||||
];
|
||||
|
||||
_obj
|
Loading…
Reference in New Issue
Block a user