bug fixes

This commit is contained in:
second_coming 2016-04-10 15:42:45 +01:00
parent 38b0279cc8
commit 90e2fa3e16
13 changed files with 206 additions and 98 deletions

View File

@ -7,10 +7,6 @@ http://www.exilemod.com/topic/61-dms-defents-mission-system/
Download the pbo version here: Download the pbo version here:
https://www.dropbox.com/s/dxy44l4mfu6ys53/a3_exile_occupation.pbo?dl=0 https://www.dropbox.com/s/dxy44l4mfu6ys53/a3_exile_occupation.pbo?dl=0
If you download the version from github, ensure that the folder you turn into a pbo is called:
a3_exile_occupation
any other name and you will get an error: 'initServer.sqf not found'
To install place the pbo into the @ExileServer/addons folder To install place the pbo into the @ExileServer/addons folder
For more info: For more info:

View File

@ -15,7 +15,7 @@
SC_debug = false; // set to true to turn on debug features (not for live servers) SC_debug = false; // set to true to turn on debug features (not for live servers)
SC_extendedLogging = true; // set to true for additional logging SC_extendedLogging = true; // set to true for additional logging
SC_infiSTAR_log = true; // true Use infiSTAR logging, false logs to server rpt SC_infiSTAR_log = false; // true Use infiSTAR logging, false logs to server rpt
SC_maxAIcount = 100; // the maximum amount of AI, if the AI count is above this then additional AI won't spawn SC_maxAIcount = 100; // the maximum amount of AI, if the AI count is above this then additional AI won't spawn
SC_mapMarkers = false; // Place map markers at the occupied areas (occupyPlaces and occupyMilitary only) true/false SC_mapMarkers = false; // Place map markers at the occupied areas (occupyPlaces and occupyMilitary only) true/false
@ -59,13 +59,13 @@ SC_occupyLootCratesMarkers = true; // true if you want to have markers on th
SC_occupyHeliCrashes = true; // true if you want to have Dayz style helicrashes SC_occupyHeliCrashes = true; // true if you want to have Dayz style helicrashes
SC_numberofHeliCrashes = 5; // if SC_occupyHeliCrashes = true spawn this many loot crates (overrided below for Namalsk) SC_numberofHeliCrashes = 5; // if SC_occupyHeliCrashes = true spawn this many loot crates (overrided below for Namalsk)
SC_statics = [ [[1178,2524,0],4,100,true] ]; //[[pos],ai count,radius,search buildings] SC_statics = [ [[1178,2524,0],8,250,true] ]; //[[pos],ai count,radius,search buildings]
// Settings for roaming ground vehicle AI // Settings for roaming ground vehicle AI
SC_maxNumberofVehicles = 3; SC_maxNumberofVehicles = 4;
SC_VehicleClassToUse = [ "Exile_Car_LandRover_Green","Exile_Car_UAZ_Open_Green","Exile_Car_Offroad_Guerilla03"]; SC_VehicleClassToUse = [ "Exile_Car_LandRover_Green","Exile_Bike_QuadBike_Black","Exile_Car_Octavius_White"];
// Settings for roaming airborne AI (non armed helis will just fly around) // Settings for roaming airborne AI (non armed helis will just fly around)
SC_maxNumberofHelis = 1; SC_maxNumberofHelis = 1;
@ -73,7 +73,7 @@ SC_HeliClassToUse = [ "Exile_Chopper_Huey_Armed_Green"];
// Settings for roaming seaborne AI (non armed boats will just sail around) // Settings for roaming seaborne AI (non armed boats will just sail around)
SC_maxNumberofBoats = 1; SC_maxNumberofBoats = 1;
SC_BoatClassToUse = [ "B_Boat_Armed_01_minigun_F","I_Boat_Armed_01_minigun_F","O_Boat_Transport_01_F","O_G_Boat_Transport_01_F" ]; SC_BoatClassToUse = [ "B_Boat_Armed_01_minigun_F","I_Boat_Armed_01_minigun_F","O_Boat_Transport_01_F","Exile_Boat_MotorBoat_Police" ];
// AI Custom Loadouts // AI Custom Loadouts

View File

@ -2,7 +2,7 @@
// //
// Server Occupation script by second_coming // Server Occupation script by second_coming
// //
SC_occupationVersion = "v7 (08-04-2016)"; SC_occupationVersion = "v8 (09-04-2016)";
// //
// http://www.exilemod.com/profile/60-second_coming/ // http://www.exilemod.com/profile/60-second_coming/
// //
@ -19,35 +19,37 @@ SC_occupationVersion = "v7 (08-04-2016)";
// second_coming 2016 // second_coming 2016
// //
//////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////
[] spawn {
[] spawn
{
waitUntil { !(isNil "DMS_MinMax_Y_Coords") }; waitUntil { !(isNil "DMS_MinMax_Y_Coords") };
diag_log format ["[OCCUPATION MOD]:: Occupation %2 Initialised at %1",time,SC_occupationVersion]; diag_log format ["[OCCUPATION MOD]:: Occupation %2 Loading Config at %1",time,SC_occupationVersion];
// Get the config for Occupation // Get the config for Occupation
call compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\config.sqf"; call compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\config.sqf";
// Select the log style depending on config settings // Select the log style depending on config settings
SC_fnc_log = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\occupationLog.sqf"; SC_fnc_log = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\occupationLog.sqf";
// EventHandlers for AI reactions // EventHandlers for AI reactions
SC_fnc_repairVehicle = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\repairVehicle.sqf"; SC_fnc_repairVehicle = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\repairVehicle.sqf";
SC_fnc_vehicleDestroyed = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\vehicleDestroyed.sqf"; SC_fnc_vehicleDestroyed = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\vehicleDestroyed.sqf";
SC_fnc_reactUnit = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\reactUnit.sqf"; SC_fnc_reactUnit = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\reactUnit.sqf";
SC_fnc_driverKilled = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\driverKilled.sqf"; SC_fnc_driverKilled = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\driverKilled.sqf";
SC_fnc_airHit = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\airHit.sqf"; SC_fnc_airHit = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\airHit.sqf";
SC_fnc_boatHit = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\boatHit.sqf"; SC_fnc_boatHit = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\boatHit.sqf";
SC_fnc_getIn = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\getIn.sqf"; SC_fnc_getIn = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\getIn.sqf";
SC_fnc_refuel = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\refuel.sqf"; SC_fnc_refuel = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\refuel.sqf";
SC_comeUnstuck = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\comeUnstuck.sqf"; SC_fnc_comeUnstuck = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\comeUnstuck.sqf";
_logDetail = "============================================================================================================="; _logDetail = "=============================================================================================================";
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
_logDetail = format ["[OCCUPATION MOD]:: Occupation %2 Initialised at %1",time,SC_occupationVersion]; _logDetail = format ["[OCCUPATION MOD]:: Occupation %2 Initialised at %1",time,SC_occupationVersion];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
_logDetail = "============================================================================================================="; _logDetail = "=============================================================================================================";
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
// Start Occupation // Start Occupation
[] execVM "\x\addons\a3_exile_occupation\scripts\startOccupation.sqf"; [] execVM "\x\addons\a3_exile_occupation\scripts\startOccupation.sqf";
}; };

View File

@ -42,8 +42,9 @@ for [{_i = 0},{_i < (count _buildings)},{_i =_i + 1}] do
_logDetail = format ["[OCCUPATION Military]:: scanning buildings around %2 started at %1",time,_areaToScan]; _logDetail = format ["[OCCUPATION Military]:: scanning buildings around %2 started at %1",time,_areaToScan];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
_building = _areaToScan nearObjects [_buildings select _i, 750]; _currentBuilding = _buildings select _i;
_currentBuilding = _buildings select _i; _building = _areaToScan nearObjects [_currentBuilding, 750];
_logDetail = format ["[OCCUPATION Military]:: scan for %2 building finished at %1",time,_currentBuilding]; _logDetail = format ["[OCCUPATION Military]:: scan for %2 building finished at %1",time,_currentBuilding];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
@ -151,23 +152,6 @@ for [{_i = 0},{_i < (count _buildings)},{_i =_i + 1}] do
else else
{ {
_buildingPositions = [_foundBuilding, 5] call BIS_fnc_buildingPositions;
if(count _buildingPositions > 0) then
{
// Find Highest Point
_highest = [0,0,0];
{
if(_x select 2 > _highest select 2) then
{
_highest = _x;
};
} foreach _buildingPositions;
_spawnPosition = _highest;
};
DMS_ai_use_launchers = false; DMS_ai_use_launchers = false;
_group = [_spawnPosition, _aiCount, _difficulty, "random", _side] call DMS_fnc_SpawnAIGroup; _group = [_spawnPosition, _aiCount, _difficulty, "random", _side] call DMS_fnc_SpawnAIGroup;
DMS_ai_use_launchers = true; DMS_ai_use_launchers = true;
@ -179,6 +163,7 @@ for [{_i = 0},{_i < (count _buildings)},{_i =_i + 1}] do
_buildingPositions = [_x, 10] call BIS_fnc_buildingPositions; _buildingPositions = [_x, 10] call BIS_fnc_buildingPositions;
if(count _buildingPositions > 0) then if(count _buildingPositions > 0) then
{ {
_y = _x;
// Find Highest Point // Find Highest Point
_highest = [0,0,0]; _highest = [0,0,0];
@ -194,12 +179,12 @@ for [{_i = 0},{_i < (count _buildings)},{_i =_i + 1}] do
_i = _buildingPositions find _spawnPosition; _i = _buildingPositions find _spawnPosition;
_wp = _group addWaypoint [_spawnPosition, 0] ; _wp = _group addWaypoint [_spawnPosition, 0] ;
_wp setWaypointFormation "Column"; _wp setWaypointFormation "Column";
_wp setWaypointBehaviour "SAD"; _wp setWaypointBehaviour "AWARE";
_wp setWaypointCombatMode "RED"; _wp setWaypointCombatMode "RED";
_wp setWaypointCompletionRadius 1; _wp setWaypointCompletionRadius 1;
_wp waypointAttachObject _x; _wp waypointAttachObject _y;
_wp setwaypointHousePosition _i; _wp setwaypointHousePosition _i;
_wp setWaypointType "MOVE"; _wp setWaypointType "SAD";
}; };
} foreach _buildings; } foreach _buildings;

View File

@ -12,7 +12,7 @@ _logDetail = format ["[OCCUPATION:Unstick]:: Initialised at %1",time];
_logDetail = format ["[OCCUPATION:Unstick]:: Land: %1 is active",_x]; _logDetail = format ["[OCCUPATION:Unstick]:: Land: %1 is active",_x];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
_x setFuel 1; _x setFuel 1;
[_x] call SC_comeUnstuck; [_x] call SC_fnc_comeUnstuck;
sleep 5; sleep 5;
}forEach SC_liveVehiclesArray; }forEach SC_liveVehiclesArray;
@ -20,7 +20,7 @@ _logDetail = format ["[OCCUPATION:Unstick]:: Initialised at %1",time];
_logDetail = format ["[OCCUPATION:Unstick]:: Sea: %1 is active",_x]; _logDetail = format ["[OCCUPATION:Unstick]:: Sea: %1 is active",_x];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
_x setFuel 1; _x setFuel 1;
[_x] call SC_comeUnstuck; [_x] call SC_fnc_comeUnstuck;
sleep 5; sleep 5;
}forEach SC_liveBoatsArray; }forEach SC_liveBoatsArray;

View File

@ -16,7 +16,7 @@ private["_wp","_wp2","_wp3"];
if (!isServer) exitWith {}; if (!isServer) exitWith {};
_logDetail = format ["[OCCUPATION]:: Starting Occupation Monitor"]; _logDetail = format ["[OCCUPATION]:: Starting Occupation Monitor @ %1",time];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
_middle = worldSize/2; _middle = worldSize/2;
@ -38,15 +38,21 @@ if(_currentPlayerCount > _scaleAI) then
// Don't spawn additional AI if the server fps is below _minFPS // Don't spawn additional AI if the server fps is below _minFPS
if(diag_fps < _minFPS) exitWith if(diag_fps < _minFPS) exitWith
{ {
_logDetail = format ["[OCCUPATION:Places]:: Held off spawning more AI as the server FPS is only %1",diag_fps]; if(SC_extendedLogging) then
[_logDetail] call SC_fnc_log; {
_logDetail = format ["[OCCUPATION:Places]:: Held off spawning more AI as the server FPS is only %1",diag_fps];
[_logDetail] call SC_fnc_log;
};
}; };
_aiActive = {alive _x && side _x == EAST} count allUnits; _aiActive = {alive _x && side _x == EAST} count allUnits;
if(_aiActive > _maxAIcount) exitWith if(_aiActive > _maxAIcount) exitWith
{ {
_logDetail = format ["[OCCUPATION:Places]:: %1 active AI, so not spawning AI this time",_aiActive]; if(SC_extendedLogging) then
[_logDetail] call SC_fnc_log; {
_logDetail = format ["[OCCUPATION:Places]:: %1 active AI, so not spawning AI this time",_aiActive];
[_logDetail] call SC_fnc_log;
};
}; };
_locations = (nearestLocations [_spawnCenter, ["NameVillage","NameCity", "NameCityCapital"], _maxDistance]); _locations = (nearestLocations [_spawnCenter, ["NameVillage","NameCity", "NameCityCapital"], _maxDistance]);
@ -167,6 +173,8 @@ _locations = (nearestLocations [_spawnCenter, ["NameVillage","NameCity", "NameCi
if(_isEnterable) then if(_isEnterable) then
{ {
_buildingPositions = [_x, 10] call BIS_fnc_buildingPositions; _buildingPositions = [_x, 10] call BIS_fnc_buildingPositions;
_y = _x;
// Find Highest Point // Find Highest Point
_highest = [0,0,0]; _highest = [0,0,0];
{ {
@ -176,15 +184,14 @@ _locations = (nearestLocations [_spawnCenter, ["NameVillage","NameCity", "NameCi
}; };
} foreach _buildingPositions; } foreach _buildingPositions;
_spawnPosition = _highest; _wpPosition = _highest;
_i = _buildingPositions find _spawnPosition; _i = _buildingPositions find _wpPosition;
_wp = _group addWaypoint [_spawnPosition, 0] ; _wp = _group addWaypoint [_wpPosition, 0] ;
_wp setWaypointFormation "Column";
_wp setWaypointBehaviour "COMBAT"; _wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED"; _wp setWaypointCombatMode "RED";
_wp setWaypointCompletionRadius 1; _wp setWaypointCompletionRadius 1;
_wp waypointAttachObject _x; _wp waypointAttachObject _y;
_wp setwaypointHousePosition _i; _wp setwaypointHousePosition _i;
_wp setWaypointType "SAD"; _wp setWaypointType "SAD";

View File

@ -45,7 +45,6 @@ for [{_i = 0},{_i < (count _statics)},{_i =_i + 1}] do
_aiCount = _currentStatic select 1; _aiCount = _currentStatic select 1;
_radius = _currentStatic select 2; _radius = _currentStatic select 2;
_staticSearch = _currentStatic select 3; _staticSearch = _currentStatic select 3;
_underground = _currentStatic select 4;
_logDetail = format ["[OCCUPATION Static]:: Checking static spawn @ %1",_spawnPosition,_aiCount]; _logDetail = format ["[OCCUPATION Static]:: Checking static spawn @ %1",_spawnPosition,_aiCount];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
@ -89,7 +88,7 @@ for [{_i = 0},{_i < (count _statics)},{_i =_i + 1}] do
_side = "bandit"; _side = "bandit";
DMS_ai_use_launchers = false; DMS_ai_use_launchers = false;
_group = [_spawnPosition, _aiCount, _difficulty, "random", _side] call DMS_fnc_SpawnAIGroup; _group = [_spawnPosition, _aiCount, _difficulty, "assault", _side] call DMS_fnc_SpawnAIGroup;
[ _group,_spawnPosition,_difficulty,"AWARE" ] call DMS_fnc_SetGroupBehavior; [ _group,_spawnPosition,_difficulty,"AWARE" ] call DMS_fnc_SetGroupBehavior;
DMS_ai_use_launchers = true; DMS_ai_use_launchers = true;
@ -107,46 +106,42 @@ for [{_i = 0},{_i < (count _statics)},{_i =_i + 1}] do
} }
else else
{ {
_buildings = _spawnPosition nearObjects ["building", _groupRadius]; _buildings = _spawnPosition nearObjects ["building", _groupRadius];
{ {
_buildingPositions = [_x, 10] call BIS_fnc_buildingPositions; _isEnterable = [_x] call BIS_fnc_isBuildingEnterable;
if(count _buildingPositions > 0) then
{
if(_isEnterable) then
{
_buildingPositions = [_x, 10] call BIS_fnc_buildingPositions;
_y = _x;
// Find Highest Point // Find Highest Point
_highest = [0,0,0]; _highest = [0,0,0];
{ {
if(_x select 2 > _highest select 2) then if(_x select 2 > _highest select 2) then
{ {
_highest = _x; _highest = _x;
}; };
} foreach _buildingPositions; } foreach _buildingPositions;
_spawnPosition = _highest; _wpPosition = _highest;
//diag_log format ["Static Patrol %3 waypoint added - building: %1 position: %2",_y,_highest,_group];
_i = _buildingPositions find _spawnPosition; _i = _buildingPositions find _wpPosition;
_wp = _group addWaypoint [_spawnPosition, 0] ; _wp = _group addWaypoint [_wpPosition, 0] ;
_wp setWaypointFormation "Column"; _wp setWaypointBehaviour "AWARE";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED"; _wp setWaypointCombatMode "RED";
_wp setWaypointCompletionRadius 1; _wp setWaypointCompletionRadius 1;
_wp waypointAttachObject _x; _wp waypointAttachObject _y;
_wp setwaypointHousePosition _i; _wp setwaypointHousePosition _i;
_wp setWaypointType "SAD"; _wp setWaypointType "SAD";
}; };
} foreach _buildings; } foreach _buildings;
if(count _buildings > 0 ) then if(count _buildings > 0 && !isNil "_wp") then
{ {
_wp setWaypointType "CYCLE"; _wp setWaypointType "CYCLE";
}; };
}; };
////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
_logDetail = format ["[OCCUPATION Static]:: Spawning %1 AI in at %2 to patrol",_aiCount,_spawnPosition]; _logDetail = format ["[OCCUPATION Static]:: Spawning %1 AI in at %2 to patrol",_aiCount,_spawnPosition];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;

View File

@ -166,8 +166,6 @@ if(_vehiclesToSpawn >= 1) then
}; };
} forEach _vehicleRoles; } forEach _vehicleRoles;
_group setBehaviour "CARELESS";
_group setCombatMode "BLUE";
// Get the AI to shut the fuck up :) // Get the AI to shut the fuck up :)
enableSentences false; enableSentences false;

View File

@ -24,7 +24,7 @@ _damagedEssentials = 0;
{ {
if ((_heli getHitPointDamage _x) > 0) then if ((_heli getHitPointDamage _x) > 0) then
{ {
if(_x == "HitFuel") then if(_x == "HitFuel" && _heliDamage < 1) then
{ {
_heli setHitPointDamage ["HitFuel", 0]; _heli setHitPointDamage ["HitFuel", 0];
_heli setFuel 1; _heli setFuel 1;

View File

@ -0,0 +1,123 @@
_boat = _this select 0;
_boat removeAllMPEventHandlers "mphit";
_boatDamage = getDammage _boat;
_boatPosition = getPosASL _boat;
_boatHeight = getPosASL _boat select 2;
_crewEjected = _boat getVariable "SC_crewEjected";
_damageLimit = 0.2;
_engineDamage = false;
_fueltankDamage = false;
if(SC_extendedLogging) then
{
_logDetail = format ["[OCCUPATION:Sea]:: Sea unit %2 hit by %3 at %1 (damage: %4)",time,_this select 0,_this select 1,_boatDamage];
[_logDetail] call SC_fnc_log;
};
_ejectChance = round (random 100) + (_boatDamage * 100);
_essentials = [ "HitAvionics","HitEngine1","HitEngine2","HitEngine","HitHRotor","HitVRotor","HitTransmission",
"HitHydraulics","HitGear","HitHStabilizerL1","HitHStabilizerR1","HitVStabilizer1","HitFuel"];
_damagedEssentials = 0;
{
if ((_boat getHitPointDamage _x) > 0) then
{
if(_x == "HitFuel") then
{
_boat setHitPointDamage ["HitFuel", 0];
_boat setFuel 1;
};
_damage = _boat getHitPointDamage _x;
if(SC_extendedLogging) then
{
_logDetail = format ["[OCCUPATION:Sea]:: Boat %1 checking part %2 (damage: %4) @ %3",_boat, _x, time,_damage];
[_logDetail] call SC_fnc_log;
};
if(_damage > 0) then { _damagedEssentials = _damagedEssentials + 1; };
};
} forEach _essentials;
if(_boatDamage > 0.2 && _damagedEssentials > 0 && !_crewEjected && _ejectChance > 80) then
{
[_boat ] spawn
{
_veh = _this select 0;
if(SC_extendedLogging) then
{
_boatPosition = getPosATL _veh;
_logDetail = format ["[OCCUPATION:Sea]:: Sea unit %2 ejecting passengers at %3 (time: %1)",time,_veh,_boatPosition];
[_logDetail] call SC_fnc_log;
};
{
_unit = _x select 0;
if (!(_unit == gunner _veh) && !(_unit == driver _veh)) then
{
_unit action ["EJECT", _veh];
};
} forEach (fullCrew _veh);
};
_boat setVariable ["SC_crewEjected", true,true];
_target = _this select 1;
_pilot = driver _boat;
_group = group _boat;
_group reveal [_target,1.5];
_destination = getPos _target;
_group allowFleeing 0;
_wp = _group addWaypoint [_destination, 0] ;
_wp setWaypointFormation "Column";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointCompletionRadius 1;
_wp setWaypointType "SAD";
[_group, _destination, 250] call bis_fnc_taskPatrol;
_group allowFleeing 0;
_group setBehaviour "AWARE";
_group setCombatMode "RED";
_boat addMPEventHandler ["mphit", "_this call SC_fnc_airHit;"];
};
if(_boatDamage > 0.7 && _damagedEssentials > 0) then
{
if(SC_extendedLogging) then
{
_logDetail = format ["[OCCUPATION:Sky]:: Air unit %2 damaged and force landing at %3 (time: %1)",time,_this select 0,_this select 1,_boatPosition];
[_logDetail] call SC_fnc_log;
};
[_boat] call SC_fnc_vehicleDestroyed;
_currentHeliPos = getPos _boat;
_destination = [_currentHeliPos, 1, 150, 10, 0, 20, 0] call BIS_fnc_findSafePos;
_boat setVehicleLock "UNLOCKED";
_target = _this select 1;
_group = group _boat;
_group reveal [_target,2.5];
_destination = position _target;
_boat land "LAND";
_group2 = createGroup east;
{
_x join _group2;
} forEach (fullCrew _boat);
_group2 allowFleeing 0;
_wp = _group2 addWaypoint [_destination, 0] ;
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointCompletionRadius 10;
_wp setWaypointType "GETOUT";
[_group2, _destination, 250] call bis_fnc_taskPatrol;
_group2 setBehaviour "COMBAT";
_group2 setCombatMode "RED";
};

View File

@ -5,6 +5,8 @@
private["_vehicle","_curPos","_oldvehPos","_engineTime","_newPos"]; private["_vehicle","_curPos","_oldvehPos","_engineTime","_newPos"];
_vehicle = _this select 0; _vehicle = _this select 0;
if(isNil "_vehicle") exitWith{};
if(count(crew _vehicle) > 0)then if(count(crew _vehicle) > 0)then
{ {
_curPos = position _vehicle; _curPos = position _vehicle;

View File

@ -1,7 +1,7 @@
_logDetail = format ["[OCCUPATION]:: Occupation v%2 Giving the server time to start before starting [OCCUPATION] (%1)",time,SC_occupationVersion]; _logDetail = format ["[OCCUPATION]:: Occupation %2 Giving the server time to start before starting [OCCUPATION] (%1)",time,SC_occupationVersion];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
uiSleep 60; uiSleep 60;
_logDetail = format ["[OCCUPATION]:: Occupation v%2 Initialised at %1",time,SC_occupationVersion]; _logDetail = format ["[OCCUPATION]:: Occupation %2 Initialised at %1",time,SC_occupationVersion];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;