Updated Event Handling

Tried to fix case where a nunit ejects because of death or disabled vehicle not prmpting ejection of the body and processing for possible case of empty vehicle.
This commit is contained in:
Chris Cardozo 2019-09-16 14:13:24 -04:00
parent 8acb9b1283
commit 3855c7b976
56 changed files with 1060 additions and 148 deletions

View File

@ -68,4 +68,4 @@ diag_log format[
};
};
};
} forEach _groups;
} forEach _groups;

View File

@ -0,0 +1,15 @@
/*
blck_fnc_findRandomLocationWithinCircle
Params["_center","_min","_max"];
_center = center of the circle
_min = minimum distance from center of the position
_max = radius of the circle
private _pos
Return: _pos, the position generated
*/
params["_center","_min","_max"];
private _vector = random(359);
private _radius = _min + (_min + random(_max - _min));
private _pos = _center getPos[_radius,_vector];
_pos

View File

@ -75,7 +75,7 @@ while {true} do
{
if (_x select 2 /* isRunning */) then
{
diag_log format["script name %1",_x select 0];
//diag_log format["script name %1",_x select 0];
};
} forEach diag_activeSQFScripts;
#endif

View File

@ -74,4 +74,4 @@ else
};
#endif
false
};
};

View File

@ -0,0 +1,98 @@
// Changes type of waypont0 for the specified group to "MOVE" and updates time stamps, WP postion and Timout parameters accordinglyD.
/*
for ghostridergaming
By Ghostrider [GRG]
Copyright 2016
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
// TODO: used for 'unstuck' cases
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#ifdef blck_debugMode
//diag_log "_fnc_changeToMoveWaypoint: blck_debugMode enabled";
#endif
private["_group","_wp","_wpPos","_dis","_arc","_dir","_newPos","_marker","_center","_minDis","_maxDis"];
_group = group _this;
_group setcombatmode "YELLOW";
_group setBehaviour "COMBAT";
_group setVariable["timeStamp",diag_tickTime];
_wp = [_group, 0];
_wpPos = getPos ((units _group) select 0);
_dir = _group getVariable["wpDir",0];
_center = _group getVariable ["patrolCenter",_wpPos];
if (_group getVariable["wpMode","random"] isEqualTo "random") then
{
_dir = random(360);
} else {
_dir = (_group getVariable["wpDir",0]) + 70;
_group setVariable["wpDir",_dir];
};
_minDis = _group getVariable["minDis",25];
_maxDis = _group getVariable["maxDis",30];
_dis = (_minDis) + random( (_maxDis) - (_minDis) );
_newPos = (_center) getPos[_dis,_dir];
_wp setWPPos [_newPos select 0, _newPos select 1];
_wp setWaypointCompletionRadius (_group getVariable["wpRadius",0]);
_wp setWaypointType "MOVE";
_wp setWaypointName "move";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [10,15,20];
_wp setWaypointLoiterRadius (_group getVariable["wpRadius",30]);
_wp setWaypointLoiterType "CIRCLE";
_wp setWaypointSpeed "LIMITED";
_group setCurrentWaypoint _wp;
diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new Waypoint position is %2",_group, getWPPos _wp];
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_changeToMoveWaypoint (4/25/17): _this = %1", _this];
diag_log format["_fnc_changeToMoveWaypoint: typeName _this = %1", typeName _this];
diag_log format["_fnc_changeToMoveWaypoint:_group = %1",_group];
diag_log format["_fnc_changeToMoveWaypoint:_group timestamp updated to %1", _group getVariable "timeStamp"];
diag_log format["_fnc_changeToMoveWaypoint:: -- >> wpMode %1 _dir %2 _dis %3 _center %4",_group getVariable["wpMode","random"], _dir, _dis,_center];
diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new position is %2",_group, _newPos];
diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new Waypoint position is %2",_group, getWPPos _wp];
diag_log format["_fnc_changeToMoveWaypoint:_group %1 basic waypoint parameters updates", _group getVariable "timeStamp"];
_marker =_group getVariable["wpMarker",""];
_marker setMarkerColor "ColorBlue";
diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"];
};
#endif
if (_group getVariable["wpPatrolMode",""] isEqualTo "SAD") then
{
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SAD Mode",_group];
};
_wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SAD Waypoint',group this];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint;"];
#endif
};
if (_group getVariable["wpPatrolMode",""] isEqualTo "SENTRY") then
{
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SENTRY Mode",_group];
};
_wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SENTRY Waypoint',group this];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint;"];
#endif
};
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp];
};
#endif

View File

@ -10,6 +10,8 @@
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
// TODO: used for 'unstuck' cases
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#ifdef blck_debugMode
@ -47,6 +49,7 @@ _wp setWaypointLoiterRadius (_group getVariable["wpRadius",30]);
_wp setWaypointLoiterType "CIRCLE";
_wp setWaypointSpeed "LIMITED";
_group setCurrentWaypoint _wp;
diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new Waypoint position is %2",_group, getWPPos _wp];
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{

View File

@ -10,6 +10,8 @@
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
// TODO: Still needed?
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
@ -30,7 +32,7 @@ _wp setWaypointName "sad";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [10,15,20];
diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"]};
#else

View File

@ -1,5 +1,5 @@
// Sets the WP type for WP for the specified group and updates other atributes accordingly.
// TODO: Not used? How to use this?
// TODO: Not used?
// Keep in for now.
/*
for ghostridergaming

View File

@ -29,4 +29,4 @@ _groupSpawned allowfleeing 0;
_groupSpawned setspeedmode "FULL";
_groupSpawned setFormation blck_groupFormation;
_groupSpawned setVariable ["blck_group",true];
_groupSpawned
_groupSpawned

View File

@ -36,23 +36,47 @@ private _arc = _group getVariable "wpArc"; // Increment in degrees to be use
//_group getVariable "soldierType"; // infantry, vehicle, air or emplaced. Note that there is no need to have more than one waypoint for emplaced units.
private _wp = [_group,0];
private _nearestEnemy = _leader findNearestEnemy (getPosATL _leader);
private _maxTime = _group getVariable["maxTime",300];
if (isNull _nearestEnemy) then
{
// Use standard waypoint algorythms
// Extricate stuck group.
if (diag_tickTime > (_group getVariable "timeStamp") + _maxTime) exitWith
{ // try to get unit to move and do antiStuck actions
_group setBehaviour "CARELESS"; // We need them to forget about enemies and move
_group setCombatMode "BLUE"; // We need them to disengage and move
private _vector = _wpDir + _arc + 180; // this should force units to cross back and forth across the zone being patrolled
_group setVariable["wpDir",_vector,true];
private _newWPPos = _pos getPos[_patrolRadius,_vector];
_wp setWaypointPosition [_newWPPos,0];
_group setBehaviour "SAFE"; // no enemies detected so lets put the group in a relaxed mode
_wp setWaypointBehaviour "SAFE";
_wp setWaypointCompletionRadius 0;
_wp setWaypointTimeout _wpTimeout;
_wp setWaypointType "MOVE";
_group setCurrentWaypoint _wp;
//diag_log format["_fnc_setNextWaypoint[antiSticking]: _group = %1 | _newPos = %2 | waypointStatements = %3",_group,_newWPPos,waypointStatements _wp];
};
// Move when no enemies are nearby
if (isNull _nearestEnemy) then
{
// Use standard waypoint algorythms
/*
Have groups zig-zag back and forth their patrol area
Setting more relaxed criteria for movement and rules of engagement
*/
private _vector = _wpDir + _arc + 180; // this should force units to cross back and forth across the zone being patrolled
_group setVariable["wpDir",_vector,true];
_group setCombatMode "YELLOW";
private _newWPPos = _pos getPos[_patrolRadius,_vector];
_wp setWaypointPosition [_newWPPos,0];
_group setBehaviour "SAFE"; // no enemies detected so lets put the group in a relaxed mode
_wp setWaypointBehaviour "SAFE";
_wp setWaypointCombatMode "YELLOW";
_wp setWaypointCompletionRadius 0;
_wp setWaypointTimeout _wpTimeout;
_group setCurrentWaypoint _wp;
//diag_log format["_fnc_setNextWaypoin[no enemies]t: _group = %1 | _newPos = %2 | waypointStatements = %3",_group,_newWPPos,waypointStatements _wp];
//diag_log format["_fnc_setNextWaypoint[no enemies]: _group = %1 | _newPos = %2 | waypointStatements = %3",_group,_newWPPos,waypointStatements _wp];
} else {
// move toward that enemy using hunting logic
// possibly along patrol perimeter
// move toward nearest enemy using hunting logic
// set mode to SAD / COMBAT
/*
_vector set to relative direction from leader to enemy +/- random adjustment of up to 33 degrees
@ -61,7 +85,7 @@ if (isNull _nearestEnemy) then
when coupled with SAD behavior should cause interesting behaviors
*/
// [point1, point2] call BIS_fnc_relativeDirTo
private _vector = ([(leader _group),_nearestEnemy] call BIS_fnc_relativeDirTo) + (random(33)*selectRandom[-1,1]);
private _vector = ([_leader,_nearestEnemy] call BIS_fnc_relativeDirTo) + (random(33)*selectRandom[-1,1]);
_group setVariable["wpDir",_vector];
private ["_huntDistance"];
@ -81,13 +105,13 @@ if (isNull _nearestEnemy) then
//diag_log format["_fnc_setextWaypoint: _pos = %1 | _patrolRadius = %5 | _newWPPos = %2 | _huntDistance = %3 | _vector = %4",_pos,_newWPPos,_huntDistance,_vector,_patrolRadius];
_wp setWaypointPosition [_newWPPos,0];
_wp setWaypointBehaviour "SAD";
_group setBehaviour "AWARE";
_group setBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout[30,45,60];
_wp setWaypointCompletionRadius 0;
_group setCurrentWaypoint _wp;
// Assume the same waypoint statement will be available
diag_log format["_fnc_setNextWaypoin[enemies]t: _group = %1 | _newPos = %2 | _nearestEnemy = 54 | waypointStatements = %3",_group,_newWPPos,waypointStatements _wp,_nearestEnemy];
//diag_log format["_fnc_setNextWaypoint[enemies]t: _group = %1 | _newPos = %2 | _nearestEnemy = 54 | waypointStatements = %3",_group,_newWPPos,waypointStatements _wp,_nearestEnemy];
};

View File

@ -62,4 +62,4 @@ switch (toLower(blck_modType)) do
};
} forEach blck_deadAI;
// TODO: Add check for dead AI.
// TODO: Can this be run less often, say every 5 sec?
// TODO: Can this be run less often, say every 5 sec?

View File

@ -13,7 +13,7 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
private["_numbertospawn","_safepos","_launcherType","_infantryType"];
params[["_group","Error"],"_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",30], ["_maxDist",45],["_configureWaypoints",true], ["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_scuba",false]];
params[["_group","Error"],"_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",30], ["_maxDist",45],["_configureWaypoints",true], ["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_scuba",false],["_patrolRadius",30]];
#ifdef blck_debugMode
if (blck_debugLevel > 3) then
@ -57,8 +57,11 @@ if !(isNull _group) then
} else {
_launcherType = "none";
};
private _unitPos = [_pos,3,6] call blck_fnc_findRandomLocationWithinCircle;
//params["_pos","_aiGroup",_skillLevel,_uniforms, _headGear,_vests,_backpacks,_Launcher,_weaponList,_sideArms,_scuba];
[_pos,_group,_skillLevel,_uniforms,_headGear,_vests,_backpacks,_launcherType, _weaponList, _sideArms, _scuba] call blck_fnc_spawnUnit;
[_unitPos,_group,_skillLevel,_uniforms,_headGear,_vests,_backpacks,_launcherType, _weaponList, _sideArms, _scuba] call blck_fnc_spawnUnit;
//private _unit = [_unitPos,_group,_skillLevel,_uniforms,_headGear,_vests,_backpacks,_launcherType, _weaponList, _sideArms, _scuba] call blck_fnc_spawnUnit;
//diag_log format["_fnc_spawnGroup: _unit %1 spawned at %2 at a distance from the group center of %3 and _vector of %4",_unit,_unitPos,_unitPos distance _pos,_pos getRelDir _unitPos];
};
_group selectLeader ((units _group) select 0);
// params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]];
@ -68,7 +71,7 @@ if !(isNull _group) then
// params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAFE"],["_soldierType","null"],["_patrolRadius",30],["_wpTimeout",[5.0,7.5,10]]];
#define infantryPatrolRadius 30
#define infantryWaypointTimeout [5,7.5,10]
[_pos,_minDist,_maxDist,_group,"random","SAD",_infantryType,infantryPatrolRadius,infantryWaypointTimeout] spawn blck_fnc_setupWaypoints;
[_pos,_minDist,_maxDist,_group,"random","SAD",_infantryType,_patrolRadius,infantryWaypointTimeout] spawn blck_fnc_setupWaypoints;
};
} else
{

View File

@ -18,4 +18,4 @@ _group = _this select 0;
_tempEH = _unit addEventHandler ["Reloaded", {_this call blck_EH_unitWeaponReloaded;}]; //Fires locally so add this again.
diag_log format["blckHC:: reloaded EH added to unit %1 after transfer to HC %2",_x,clientOwner];
}forEach (units _group);
diag_log format["blckHC:: group %1 transferred to HC %2",_group,clientOwner];
diag_log format["blckHC:: group %1 transferred to HC %2",_group,clientOwner];

View File

@ -133,4 +133,4 @@ _fn_missionCleanup = {
diag_log format["_fnc_endMission: after to running mission end functions -> blck_missionsRunning = %1 | blck_dynamicUMS_MissionsRuning = %2",blck_missionsRunning,blck_dynamicUMS_MissionsRuning];
#endif
//diag_log format["_fnc_endMission (138): after to running mission end functions -> blck_missionsRunning = %1 | blck_dynamicUMS_MissionsRuning = %2",blck_missionsRunning,blck_dynamicUMS_MissionsRuning];
_endCondition
_endCondition

View File

@ -312,8 +312,9 @@ if (blck_debugLevel > 2) then {diag_log "_fnc_missionSpawner (309) emplaced weap
_vehToSpawn = [_noVehiclePatrols] call blck_fnc_getNumberFromRange;
if (blck_useVehiclePatrols && ((_vehToSpawn > 0) || count _missionPatrolVehicles > 0)) then
{
//diag_log format["_missionSpawner(315): _vehToSpawn = %1 | _missionPatrolVehicles = %2",_vehToSpawn,_missionPatrolVehicles];
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_missionPatrolVehicles,useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false,_vehicleCrewCount] call blck_fnc_spawnMissionVehiclePatrols;
//diag_log format["_missionSpawner(317): _temp = %1",_temp];
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;

View File

@ -111,4 +111,4 @@ for "_i" from 0 to (count blck_sm_Infantry) do
};
};
};
};
};

View File

@ -8,6 +8,8 @@
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
TODO: Still used? Questionable.
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
diag_log format["_fnc_sm_spawnAirPatrols: _this = %1",_this];

View File

@ -35,15 +35,18 @@ if (_airPatrols isEqualTo []) then
_headGear = _this select 4;
_helis = _this select 5;
*/
// params["_coords","_skillAI","_helis",["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]],["_Launcher","none"],["_crewCount",4]];
[_center,_difficulty,_weapons,_uniforms,_headGear,_heliTypes,0] call blck_fnc_spawnMissionHeli;
};
} else {
{
/*
/*[aircraft classname, position, difficulty(blue, red etc)]*/
_aircraft = _x select 0;
_pos = _x select 1;
_difficulty = _x select 2;
_x params["_aircraft","_pos","_difficulty"];
//_aircraft = _x select 0;
//_pos = _x select 1;
//_difficulty = _x select 2;
//params["_coords","_skillAI","_helis",["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]],["_Launcher","none"],["_crewCount",4]];
[_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnMissionHeli;
}forEach _airPatrols;
};

View File

@ -8,4 +8,4 @@ if !(isNull _group) then
// ["_building","_group","_noStatics","_typesStatics","_noUnits",["_aiDifficultyLevel","Red"],
[_building,_group,_noStatics,[],_noUnits,_skillLevel] call blck_fnc_spawnGarrisonInsideBuilding_relPos;
};
_group
_group

View File

@ -1,4 +1,6 @@
/*
GMS_fnc_sm_spawnInfantryPatrols
by Ghostrider [GRG]
for ghostridergaming
12/5/17
@ -12,29 +14,35 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
// TODO: Used?
// params["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]];
params["_patrols","_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_weapons",blck_WeaponList_Orange],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]];
//diag_log format["_sm_spawnInfantryPatrols:: _this = %1",_this];
//diag_log format["_sm_spawnInfantryPatrols:: patrols = %1",_patrols];
params["_patrols","_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"]];
private ["_weaponList","_sideArms","_uniforms","_headgear","_vests","_backpacks"];
_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout;
_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms;
_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms;
_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear;
_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests;
_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks;
if (_patrols isEqualTo []) then
{
// Use the random spawn logic from the regular dyanmic mission system.
//params[_coords,"_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weapons,sideArms,_isScubaGroup];
[_coords,_minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI
[_coords,_minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sidearms,false] call blck_fnc_spawnMissionAI;
} else {
{
//diag_log format["_sm_spawnInfantryPatrols.sqf:: _x = %1",_x];
// Use the pre-defined spawn positions and other parameters for each group.
// [[22819.4,16929.5,5.33892],"red",4, 75]
private["_pos","_difficulty","_noAI","_patrolRadius"];
_pos = _x select 0; // Position at which to spawn the group
_difficulty = _x select 1; // AI difficulty setting (blue, green etc)
_noAI = _x select 2; // Number of AI to spawn with the group
_patrolRadius = _x select 3; // Radius within which AI should patrol
_x params ["_pos","_difficulty","_noAI","_patrolRadius"];
private _group = [blck_AI_Side,true] call blck_fnc_createGroup;
// params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true] ];
// params[["_group","Error"],"_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",30], ["_maxDist",45],["_configureWaypoints",true], ["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],
// ["_weaponList",[]],["_sideArms",[]], ["_scuba",false],["_patrolRadius",30]];
#define setupWaypoints true
if !(isNull _group) then
{
[_group,_pos,_pos,_noAI,_noAI,_difficulty,_patrolRadius,_patrolRadius,true,_uniforms,_headGear] call blck_fnc_spawnGroup;
[_group,_pos,_pos,_noAI,_noAI,_difficulty,_patrolRadius - 2,_patrolRadius,setupWaypoints,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,_scuba,_patrolRadius] call blck_fnc_spawnGroup;
blck_monitoredMissionAIGroups pushback _group;
};
}forEach _patrols;
};

View File

@ -11,38 +11,45 @@
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_coords","_noVehiclePatrols","_vehiclePatrolSpawns","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]];
params["_coords","_noVehiclePatrols","_vehiclePatrolSpawns","_aiDifficultyLevel"];
//diag_log format["_sm_spawnVehiclePatrols:: _vehiclePatrolSpawns = %1",_vehiclePatrolSpawns];
private["_vehGroup","_patrolVehicle","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_randomVehicle","_return","_abort"];
//if (count _weapons isEqualTo 0) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
private ["_weaponList","_sideArms","_uniforms","_headgear","_vests","_backpacks"];
if (_vehiclePatrolSpawns isEqualTo []) then
{
private["_spawnPoints","_vehType"];
_spawnPoints = [_coords,_noVehiclePatrols,75,100] call blck_fnc_findPositionsAlongARadius;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red", 600],
_vehType = selectRandom blck_AIPatrolVehicles;
_vehiclePatrolSpawns pushBack [_vehType, _x, _aiDifficultyLevel, 150];
// ["Vehicle Class Name", position[x,y,z], AI Skill [blue, red, green, orange],patrol radius [0 for static units], respawn time [seconds]]
#define vehiclePatrolRadius 150
#define vehicleRespawnTime 900
_vehType = selectRandom blck_AIPatrolVehicles;
_vehiclePatrolSpawns pushBack [_vehType, _x, _aiDifficultyLevel, vehiclePatrolRadius,vehicleRespawnTime];
} forEach _spawnPoints;
};
{
private _patrolVehicle = objNull;
_x params["_vehicle","_spawnPos","_difficulty","_patrolRadius"];
diag_log format["_fnc_sm_spawnVehiclePatrols:"];
//_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
_x params["_vehicle","_spawnPos","_aiDifficultyLevel","_patrolRadius","_respawnTime"];
private _vehGroup = [blck_AI_Side,true] call blck_fnc_createGroup;
_vehGroup setVariable["soldierType","vehicle"];
if !(isNull _vehGroup) then
{
[_vehGroup,_spawnPos,_spawnPos,3,3,_difficulty,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup;
_vehGroup setVariable["soldierType","vehicle"];
_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout;
_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms;
_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms;
_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear;
_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests;
_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks;
[_vehGroup,_spawnPos,_spawnPos,3,3,_difficulty,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup;
blck_monitoredMissionAIGroups pushback _vehGroup;
#define useWaypoints true
// params[["_group","Error"],"_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",30], ["_maxDist",45],["_configureWaypoints",true],
// ["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_scuba",false],["_patrolRadius",30]];
_patrolVehicle = [_spawnPos,_spawnPos,_vehicle,_patrolRadius,_patrolRadius,_vehGroup,useWaypoints,[difficulty] call blck_fnc_selectVehicleCrewCount,_patrolRadius] call blck_fnc_spawnVehiclePatrol; // Check whether we should pass the group; looks like we should.
//params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]];
_patrolVehicle = [_spawnPos,_spawnPos,_vehicle,_patrolRadius,_patrolRadius,_vehGroup] call blck_fnc_spawnVehiclePatrol; // Check whether we should pass the group; looks like we should.
//if !(isNull _patrolVehicle) then
//{
//_patrolVehicle setVariable["vehicleGroup",_vehGroup];
//};
};
} forEach _vehiclePatrolSpawns;

View File

@ -15,9 +15,9 @@ params["_coords","_missionLootVehicles",["_loadCrateTiming","atMissionSpawn"],["
if (count _coords == 2) then {_coords pushBack 0};
private _vehs = [];
{
diag_log format["spawnMissionCVehicles.sqf _x = %1",_x];
//diag_log format["spawnMissionCVehicles.sqf _x = %1",_x];
_x params["_vehType","_vehOffset","_lootArray","_lootCounts",["_dir",0]];
diag_log format["spawnMissionCVehicles: _vehType = %1 | _vehOffset = %2 | _lootArray = %3 | _lootCounts = %4",_vehType,_vehOffset,_lootArray,_lootCounts];
//diag_log format["spawnMissionCVehicles: _vehType = %1 | _vehOffset = %2 | _lootArray = %3 | _lootCounts = %4",_vehType,_vehOffset,_lootArray,_lootCounts];
_pos = _coords vectorAdd _vehOffset;
_veh = [_vehType, _pos] call blck_fnc_spawnVehicle;
_veh setDir _dir;

View File

@ -12,9 +12,9 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
// params["_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",20], ["_maxDist",35],["_configureWaypoints",true], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_scuba",false] ];
params["_coords","_noVehiclePatrols","_skillAI","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_isScubaGroup",false],["_crewCount",4]];
//diag_log format["_fnc_spawnMissionVehiclePatrols: _this = %1",_this];
if (_uniforms isEqualTo []) then {_uniforms = [_skillAI] call blck_fnc_selectAIUniforms};
if (_headGear isEqualTo []) then {_headGear = [_skillAI] call blck_fnc_selectAIHeadgear};
if (_vests isEqualTo []) then {_vests = [_skillAI] call blck_fnc_selectAIVests};
@ -22,10 +22,11 @@ if (_backpacks isEqualTo []) then {_backpacks = [_skillAI] call blck_fnc_sele
if (_weaponList isEqualTo []) then {_weaponList = [_skillAI] call blck_fnc_selectAILoadout};
if (_sideArms isEqualTo []) then {[_skillAI] call blck_fnc_selectAISidearms};
private["_vehGroup","_patrolVehicle","_vehiclePatrolSpawns","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_vehicle","_return","_abort","_spawnPos","_v"];
private["_vehGroup","_vehiclePatrolSpawns","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_vehicle","_return","_abort","_spawnPos","_v"];
_vehicles = [];
_missionAI = [];
_abort = false;
//diag_log format["fnc_spawnMissionVehiclePatrols(29): _missionPatrolVehicles = %1",_missionPatrolVehicles];
if (_missionPatrolVehicles isEqualTo []) then
{
_useRelativePos = false;
@ -34,16 +35,10 @@ if (_missionPatrolVehicles isEqualTo []) then
_v = [_skillAI] call blck_fnc_selectPatrolVehicle;
_missionPatrolVehicles pushBack [_v, _x];
}forEach _vehiclePatrolSpawns;
//diag_log format["fnc_spawnMissionVehiclePatrols(38): _missionPatrolVehicles updated to %1",_missionPatrolVehicles];
};
#define configureWaypoints false
{
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionVehiclePatrols:: _x = %1 and _coords = %2",_x,_coords];
};
#endif
if (_useRelativePos) then
{
_spawnPos = _coords vectorAdd (_x select 1)
@ -51,10 +46,9 @@ if (_missionPatrolVehicles isEqualTo []) then
_spawnPos = _x select 1;
};
_vehicle = _x select 0;
_vehGroup = [blck_AI_Side,true] call blck_fnc_createGroup;
_patrolVehicle = objNull;
diag_log format["fnc_spawnMissionVehiclePatrols(50): _vehicle = %1 | _spawnPos = %2 | _vehGroup = %3",_vehicle,_spawnPos,_vehGroup];
//diag_log format["fnc_spawnMissionVehiclePatrols(50): _vehicle = %1 | _spawnPos = %2 | _vehGroup = %3",_vehicle,_spawnPos,_vehGroup];
if !(isNull _vehGroup) then
{
_vehGroup setVariable["soldierType","vehicle"];
@ -62,14 +56,21 @@ if (_missionPatrolVehicles isEqualTo []) then
_missionAI append (units _vehGroup);
blck_monitoredMissionAIGroups pushBack _vehGroup;
//params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",40],["_maxDis",60],["_group",grpNull],["_setWaypoints",true],["_crewCount",4]];
_patrolVehicle = [_coords,_spawnPos,_vehicle,40,60,_vehGroup,true,_crewCount] call blck_fnc_spawnVehiclePatrol;
//diag_log format["fnc_spawnMissionVehiclePatrols(59): _vehicle = %1 | _vehGroup = %2 | units _vehGroup",_vehicle,_vehGroup, units _vehGroup];
#define useWaypoints true
_patrolVehicle = [_coords,_spawnPos,_vehicle,40,60,_vehGroup,useWaypoints,_crewCount] call blck_fnc_spawnVehiclePatrol;
/*
if (isNil "_patrolVehicle") then
{
diag_log format["_fnc_spawnMissionVehiclePatrols: nil value returned for _patrolVehicle"];
_patrolVehicle = objNull;
};
*/
//diag_log format["fnc_spawnMissionVehiclePatrols(68): _vehGroup = %1 | units _vehGroup = %2",_vehGroup, units _vehGroup];
if !(isNull _patrolVehicle) then
{
//_patrolVehicle setVariable["vehicleGroup",_vehGroup];
_vehicles pushback _patrolVehicle;
//blck_monitoredVehicles pushBack _patrolVehicle;
_missionAI append (units _vehGroup);
};
};
} forEach _missionPatrolVehicles;

View File

@ -21,4 +21,4 @@ if !(isNull _group) then
_diveDepth = 0.5 * [_pos] call blck_fnc_findWaterDepth;
(driver _vehicle) swiminDepth (_diveDepth select 2);
};
_group
_group

View File

@ -0,0 +1,17 @@
/*
by Ghostrider [GRG]
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
//diag_log format["_sm_addAircraft: _this = %5",_this];
params["_aircraftPatrol"];
//diag_log format["_sm_addAircraft: _aircraftPatrol = %1",_aircraftPatrol];
blck_sm_Aircraft pushBack [_aircraftPatrol,grpNull,0];
//diag_log format["_sm_addAircraft: updated blck_sm_Aircraft = %1",blck_sm_Aircraft];
true

View File

@ -0,0 +1,16 @@
/*
by Ghostrider [GRG]
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_emplacedWeapon"];
blck_sm_Emplaced pushBack [_emplacedWeapon,grpNull,0];
diag_log format["_sm_AddEmplaced::-> _emplacedWeapon = %1, blck_sm_Emplaced = %2",_emplacedWeapon,blck_sm_Emplaced];
true

View File

@ -0,0 +1,16 @@
/*
by Ghostrider [GRG]
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_group"];
blck_sm_Groups pushBack [_group,grpNull,0];
diag_log format["_sm_AddGroup:: blck_sm_Groups = %1",blck_sm_Groups];
true

View File

@ -0,0 +1,16 @@
/*
by Ghostrider [GRG]
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_vehicle"];
blck_sm_Vehicles pushBack [_vehicle,grpNull,0];
//diag_log format["_fnc_sm_AddVehicle: _vehicle = %1",_vehicle];
true

View File

@ -0,0 +1,31 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
diag_log format["_fnc_sm_spawnAirPatrols: _this = %1",_this];
params["_airPatrols"];
private["_aircraft","_pos","_difficulty","_uniforms","_headGear"];
_aircraft = _x select 0;
_pos = _x select 1;
_difficulty = _x select 2;
_uniforms = blck_SkinList;
_headGear = blck_headgearList;
switch (_difficulty) do
{
case "blue": {_weapons = blck_WeaponList_Blue;};
case "red": {_weapons = blck_WeaponList_Red};
case "green": {_weapons = blck_WeaponList_Green};
case "orange": {_weapons = blck_WeaponList_Orange};
};
_return = [_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnMissionHeli;
_group = group (_return select 1 select 0);
_group

View File

@ -0,0 +1,50 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
/*
_coords = _this select 0;
_skillAI = _this select 1;
_weapons = _this select 2;
_uniforms = _this select 3;
_headGear = _this select 4;
_helis = _this select 5;
*/
params["_airPatrols","_noAirPatrols","_heliTypes","_center","_difficulty","_uniforms","_headGear","_weapons"];
diag_log format["_sm_spawnAirPatrols:: _this = %1",_this];
diag_log format["_sm_spawnAirPatrols:: _airPatrols = %1",_airPatrols];
if (_airPatrols isEqualTo []) then
{
for "_i" from 1 to _noAirPatrols do
{
/*
_coords = _this select 0;
_skillAI = _this select 1;
_weapons = _this select 2;
_uniforms = _this select 3;
_headGear = _this select 4;
_helis = _this select 5;
*/
[_center,_difficulty,_weapons,_uniforms,_headGear,_heliTypes,0] call blck_fnc_spawnMissionHeli;
};
} else {
{
/*
/*[aircraft classname, position, difficulty(blue, red etc)]*/
_aircraft = _x select 0;
_pos = _x select 1;
_difficulty = _x select 2;
[_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnMissionHeli;
}forEach _airPatrols;
};

View File

@ -0,0 +1,62 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"];
private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner","_abort","_pos","_mode"];
_emplacedWeps = [];
_emplacedAI = [];
_units = [];
_abort = false;
_pos = [];
//diag_log format["_sm_spawnEmplaced <Line 26>:: _missionEmplacedWeapons = %1",_missionEmplacedWeapons];
// Define _missionEmplacedWeapons if not already configured.
if (_missionEmplacedWeapons isEqualTo []) then
{
_missionEmplacedWeaponPositions = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius;
{
_static = selectRandom blck_staticWeapons;
//diag_log format["_fnc_spawnEmplacedWeaponArray: creating spawn element [%1,%2]",_static,_x];
_missionEmplacedWeapons pushback [_static,_coords vectorAdd _x,_aiDifficultyLevel];
//diag_log format["_fnc_spawnEmplacedWeaponArray: _mi updated to %1",_missionEmplacedWeapons];
} forEach _missionEmplacedWeaponPositions;
};
//diag_log format["_sm_spawnEmplaced<Line 38>:: _missionEmplacedWeapons = %1",_missionEmplacedWeapons];
{
_wepnClassName = _x select 0;
_pos = _x select 1;
_difficulty = _x select 2;
// params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear] ];
private _empGroup = [] call blck_fnc_createGroup;
if !(_empGroup) then
{
[_empGroup,_pos,1,1,_difficulty,_pos,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup;
_empGroup setcombatmode "RED";
_empGroup setBehaviour "COMBAT";
[_pos,0.01,0.02,_empGroup,"random","SAD","emplaced"] spawn blck_fnc_setupWaypoints;
//if (isNull _empGroup) exitWith {_abort = _true};
_wep = [_wepnClassName,[0,0,0],false] call blck_fnc_spawnVehicle;
//_empGroup setVariable["groupVehicle",_wep];
_wep setVariable["vehicleGroup",_empGroup];
_wep setVariable["GRG_vehType","emplaced"];
_wep setPosATL _pos;
[_wep,false] call blck_fnc_configureMissionVehicle;
_units = units _empGroup;
_gunner = _units select 0;
_gunner moveingunner _wep;
};
} forEach _missionEmplacedWeapons;
blck_monitoredVehicles append _emplacedWeps;
true

View File

@ -0,0 +1,58 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"];
private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner","_abort","_pos","_mode"];
_emplacedWeps = [];
_emplacedAI = [];
_units = [];
_abort = false;
_pos = [];
//diag_log format["_sm_spawnEmplaced <Line 26>:: _missionEmplacedWeapons = %1",_missionEmplacedWeapons];
// Define _missionEmplacedWeapons if not already configured.
if (_missionEmplacedWeapons isEqualTo []) then
{
_missionEmplacedWeaponPositions = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius;
{
_static = selectRandom blck_staticWeapons;
//diag_log format["_fnc_spawnEmplacedWeaponArray: creating spawn element [%1,%2]",_static,_x];
_missionEmplacedWeapons pushback [_static,_coords vectorAdd _x,_aiDifficultyLevel];
//diag_log format["_fnc_spawnEmplacedWeaponArray: _mi updated to %1",_missionEmplacedWeapons];
} forEach _missionEmplacedWeaponPositions;
};
//diag_log format["_sm_spawnEmplaced<Line 38>:: _missionEmplacedWeapons = %1",_missionEmplacedWeapons];
{
_wepnClassName = _x select 0;
_pos = _x select 1;
_difficulty = _x select 2;
/// params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
__empGroup = [_pos,_pos,1,1,_difficulty,1,2,false,_uniforms,_headGear] call blck_fnc_spawnGroup;
_empGroup setcombatmode "RED";
_empGroup setBehaviour "COMBAT";
[_pos,0.01,0.02,_empGroup,"random","SAD","emplaced"] spawn blck_fnc_setupWaypoints;
//if (isNull _empGroup) exitWith {_abort = _true};
_wep = [_wepnClassName,[0,0,0],false] call blck_fnc_spawnVehicle;
//_empGroup setVariable["groupVehicle",_wep];
_wep setVariable["vehicleGroup",_empGroup];
_wep setVariable["GRG_vehType","emplaced"];
_wep setPosATL _pos;
[_wep,false] call blck_fnc_configureMissionVehicle;
_units = units _empGroup;
_gunner = _units select 0;
_gunner moveingunner _wep;
} forEach _missionEmplacedWeapons;
blck_monitoredVehicles append _emplacedWeps;
true

View File

@ -0,0 +1,41 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
// TODO: Used?
// params["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]];
params["_patrols","_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_weapons",blck_WeaponList_Orange],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]];
//diag_log format["_sm_spawnInfantryPatrols:: _this = %1",_this];
//diag_log format["_sm_spawnInfantryPatrols:: patrols = %1",_patrols];
if (_patrols isEqualTo []) then
{
// Use the random spawn logic from the regular dyanmic mission system.
//params[_coords,"_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weapons,sideArms,_isScubaGroup];
[_coords,_minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI
} else {
{
//diag_log format["_sm_spawnInfantryPatrols.sqf:: _x = %1",_x];
// Use the pre-defined spawn positions and other parameters for each group.
// [[22819.4,16929.5,5.33892],"red",4, 75]
private["_pos","_difficulty","_noAI","_patrolRadius"];
_pos = _x select 0; // Position at which to spawn the group
_difficulty = _x select 1; // AI difficulty setting (blue, green etc)
_noAI = _x select 2; // Number of AI to spawn with the group
_patrolRadius = _x select 3; // Radius within which AI should patrol
private _group = [] call blck_fnc_createGroup;
// params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true] ];
if !(isNull _group) then
{
[_group,_pos,_pos,_noAI,_noAI,_difficulty,_patrolRadius,_patrolRadius,true,_uniforms,_headGear] call blck_fnc_spawnGroup;
};
}forEach _patrols;
};

View File

@ -0,0 +1,51 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_mission"];
// Spawn landscape
// params["_objects"];
[_missionLandscape] call blck_fnc_sm_spawnObjects;
uiSleep 10; // Let the objects 'settle' before placing anything on or around them.
// Spawn Air Patrols
// params["_airPatrols","_noAirPatrols","_heliTypes","_center","_difficulty","_uniforms","_headGear"];
[_airPatrols,_noAirPatrols,_aircraftTypes,_missionCenter,_difficulty,_uniforms,_headgear,_weapons] call blck_fnc_sm_spawnAirPatrols;
//uiSleep 1;
// Spawn Vehicle Patrols
// params["_coords","_noVehiclePatrols","_vehiclePatrolSpawns","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]];
[_missionCenter,_noVehiclePatrols,_vehiclePatrolParameters,_difficulty,_uniforms,_headGear] call blck_fnc_sm_spawnVehiclePatrols;
//uiSleep 1;
// spawn infantry
// params["_patrols","_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_weapons",blck_WeaponList_Orange],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]];
[_aiGroupParameters, _missionCenter,_minNoAI,_maxNoAI,_difficulty,_weapons,_uniforms,_headGear] call blck_fnc_sm_spawnInfantryPatrols;
//uiSleep 1;
// spawn loot vehicles
// params["_objects","_coords","_loot","_lootCounts"];
[_missionLootVehicles,_missionCenter,_crateLoot,_lootCounts] call blck_fnc_sm_spawnLootContainers;
// Spawn static weapons
// params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"];
[_missionEmplacedWeapons,_noEmplacedWeapons,_difficulty,_missionCenter,_uniforms,_headGear] call blck_fnc_sm_spawnEmplaceds;
// spawn loot chests
[_missionLootBoxes,_missionCenter,_crateLoot,_lootCounts] call blck_fnc_sm_spawnLootContainers;
_blck_localMissionMarker = ["",_missionCenter,"","",_markerColor,_markerType];
[_blck_localMissionMarker] call blck_fnc_spawnMarker;
diag_log format["[blckeagls] Static Mission Spawner: Mission %1 spawned",_mission];

View File

@ -0,0 +1,56 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_coords","_noVehiclePatrols","_vehiclePatrolSpawns","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]];
//diag_log format["_sm_spawnVehiclePatrols:: _vehiclePatrolSpawns = %1",_vehiclePatrolSpawns];
private["_vehGroup","_patrolVehicle","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_randomVehicle","_return","_abort"];
//if (count _weapons isEqualTo 0) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (_vehiclePatrolSpawns isEqualTo []) then
{
private["_spawnPoints","_vehType"];
_spawnPoints = [_coords,_noVehiclePatrols,75,100] call blck_fnc_findPositionsAlongARadius;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red", 600],
_vehType = selectRandom blck_AIPatrolVehicles;
_vehiclePatrolSpawns pushBack [_vehType, _x, _aiDifficultyLevel, 150];
} forEach _spawnPoints;
};
{
private ["_vehicle","_spawnPos","_difficulty","_patrolRadius"];
_vehicle = _x select 0;
_spawnPos = _x select 1;
_difficulty = _x select 2;
_patrolRadius = _x select 3;
//_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
private _vehGroup = [] call blck_fnc_createGroup;
_vehGroup setVariable["soldierType","vehicle"];
if !(isNull _vehGroup) then
{
[_vehGroup,_spawnPos,_spawnPos,3,3,_difficulty,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup;
//params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]];
_patrolVehicle = [_spawnPos,_spawnPos,_vehicle,_patrolRadius,_patrolRadius,_vehGroup] call blck_fnc_spawnVehiclePatrol; // Check whether we should pass the group; looks like we should.
// Nope, not necessary
//_vehGroup setVariable["groupVehicle",_vehicle];
if !(isNull _patrolVehicle) then
{
_patrolVehicle setVariable["vehicleGroup",_vehGroup];
};
};
} forEach _vehiclePatrolSpawns;
true

View File

@ -50,3 +50,4 @@ setTimeMultiplier blck_timeAccelerationDusk;
//diag_log format["DUSK ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime];

View File

@ -11,4 +11,6 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
//#include "\q\addons\custom_server\Configs\blck_defines.hpp";
if (isServer) then {_this remoteExec ["blck_fnc_processAIKill",2]};
#define unit _this select 0
if (isServer) then {_this call blck_fnc_processAIKill};
if (local (unit)) then {_this call blck_fnc_processAIKill};

View File

@ -0,0 +1,33 @@
/*
blck_EH_AIfiredNear
firedNear event handler for _units
By Ghostrider-GRG-
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
See https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#FiredNear for details on this event handler.
this addEventHandler ["FiredNear", {
params ["_unit", "_firer", "_distance", "_weapon", "_muzzle", "_mode", "_ammo", "_gunner"];
}];
unit: Object - Object the event handler is assigned to
firer: Object - Object which fires a weapon near the unit
distance: Number - Distance in meters between the unit and firer (max. distance ~69m)
weapon: String - Fired weapon
muzzle: String - Muzzle that was used
mode: String - Current mode of the fired weapon
ammo: String - Ammo used
Introduced with Arma 3 version 1.65
gunner: Object - gunner, whose weapons are fired
*/
//#include "\q\addons\custom_server\Configs\blck_defines.hpp";
//if (isServer) then {_this remoteExec ["blck_fnc_processAIKill",2]};
//if (local (_this select 0)) then {_this call blck_fnc_processAIFiredNear};
_this call blck_fnc_processAIFiredNear

View File

@ -6,16 +6,9 @@
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/Reloaded
The EH returns array in _this variable of the following format [entity, weapon, muzzle, newMagazine, (oldMagazine)], where:
entity: Object - unit or vehicle to which EH is assigned
weapon: String - weapon that got reloaded
muzzle: String - weapons muzzle that got reloaded
newMagazine: Array - new magazine info in format [magazineClass, ammoCount, magazineID, magazineCreator], where:
magazineClass: String - class name of the magazine
ammoCount: Number - amount of ammo in magazine
magazineID: Number - global magazine id
magazineCreator: Number - owner of the magazine creator
this addEventHandler ["Reloaded", {
params ["_unit", "_weapon", "_muzzle", "_newMagazine", "_oldMagazine"];
}];
--------------------------
License
@ -25,8 +18,9 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
(_this select 0) addMagazine (_this select 3 select 0);
#define unit _this select 0
#define newMagazine _this select 3 select 0
(unit) addMagazine (newMagazine);
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {
//diag_log format["_EH_unitWeaponReloaded:: unit %1 reloaded weapon %2 with magazine %3",_this select 0, (_this select 3 select 0)];

View File

@ -15,8 +15,7 @@ if !(isServer) exitWith {};
private ["_unit","_instigator","_group","_wp"];
_unit = _this select 0 select 0;
_instigator = _this select 0 select 3;
//diag_log format["_fnc_processAIHit:(19): _units = %1 and _instigator = %2 units damage is %3",_unit,_instigator, damage _unit];
//if (true) exitWith {};
diag_log format["_fnc_processAIHit:(19): _units = %1 and _instigator = %2 units damage is %3",_unit,_instigator, damage _unit];
//diag_log format["_fnc_processAIHit: evaluating case of ai not alive"];
if (!(alive _unit)) exitWith {

View File

@ -12,8 +12,22 @@
// TODO: check that emplaced weapons that should be deleted are added to the scheduler.
// assumptions: this is always and only run on the server regardless if th event is triggered on an HC or other client.
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
if !(isServer) exitWith {};
params["_unit","_killer","_instigator"];
if (hasInterface || !(hasInterface || isDedicated)) exitWith // Only run this on HC or clients
{
if (local _unit) then
{
// soldierOne action ["Eject", vehicle soldierOne];
if !((vehicle _unit) isKindOf "Man") then
{
_unit action["Eject", vehicle _unit];
[vehicle _unit] call blck_fnc_checkForEmptyVehicle;
};
};
};
//diag_log format["_fnc_processAIKill: _unit = %1 | _killer = %2",_unit,_killer];
if (_unit getVariable["blck_cleanupAt",-1] > 0) exitWith {}; // this is here so that the script is not accidently run more than once for each MPKilled occurrence.
_unit setVariable ["blck_cleanupAt", (diag_tickTime) + blck_bodyCleanUpTimer];
@ -21,15 +35,20 @@ _unit disableAI "ALL";
{
_unit removeAllMPEventHandlers _x;
}forEach["MPHit","MPKilled"];
{
_unit removeAllEventHandlers _x;
}forEach["FiredNear","Reloaded"];
blck_deadAI pushback _unit;
if (count(units (group _unit)) isEqualTo 0) then
{
deleteGroup _group;
};
[_unit] joinSilent grpNull;
if !(_unit isKindOf "Man") then
//diag_log format["_fnc_processAIKill: unit linked to crew of vehicle %1 | typeOf (vehicle _unit = %2)",vehicle _unit,typeOf (vehicle _unit)];
if !((vehicle _unit) isKindOf "Man") then
{
//diag_log format["_fnc_processAIKill: unit linked to crew of vehicle %1 | typeOf (vehicle _unit = %2)",vehicle _unit,typeOf (vehicle _unit)];
[_unit, ["Eject", vehicle _unit]] remoteExec ["action",(owner _unit)];
};
@ -52,4 +71,4 @@ if (blck_showCountAliveAI) then
if ([_unit,_killer] call blck_fnc_processIlleagalAIKills) then {
[_unit,_killer] call GMS_fnc_handlePlayerUpdates;
};
};

View File

@ -0,0 +1,38 @@
/*
blck_fnc_processAIfiredNear
firedNear event handler for _units
By Ghostrider-GRG-
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
See https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#FiredNear for details on this event handler.
this addEventHandler ["FiredNear", {
params ["_unit", "_firer", "_distance", "_weapon", "_muzzle", "_mode", "_ammo", "_gunner"];
}];
unit: Object - Object the event handler is assigned to
firer: Object - Object which fires a weapon near the unit
distance: Number - Distance in meters between the unit and firer (max. distance ~69m)
weapon: String - Fired weapon
muzzle: String - Muzzle that was used
mode: String - Current mode of the fired weapon
ammo: String - Ammo used
Introduced with Arma 3 version 1.65
gunner: Object - gunner, whose weapons are fired
*/
//#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_unit","_firedBy"];
//if ((side _unit) isEqualTo (side _firedBy) exitWith {}; // nearyby friendly fire
(group _unit) setBehaviour "COMBAT";
(group _unit) setCombatMode "RED";
diag_log format["_fnc_processAIfiredNear: _unit %1 knows %2 about _firedBy %3",_unit, _unit knowsAbout _firedBy,_firedBy];
diag_log format["_fnc_processAIfiredNear: owner _unit = %1 | local _unit = %2",owner _unit, local _unit];

View File

@ -200,6 +200,7 @@ if (blck_debugLevel > 2) then
};
#endif
_unit addEventHandler ["FiredNear",{_this call blck_EH_AIfiredNear;}];
_unit addEventHandler ["Reloaded", {_this call blck_EH_unitWeaponReloaded;}];
_unit addMPEventHandler ["MPKilled", {[(_this select 0), (_this select 1)] call blck_EH_AIKilled;}];
_unit addMPEventHandler ["MPHit",{[_this] call blck_EH_AIHit;}];

View File

@ -10,7 +10,7 @@
*/
if !(isServer) exitWith {};
params["_veh"];
//diag_log format["_fnc_checkForEmptyVehicle: _veh = %1 | typeOf _veh = %2 | count (crew _veh) = %3",_veh, typeOf _veh, count(crew _veh)];
//diag_log format["_fnc_checkForEmptyVehicle: _veh = %1 | typeOf _veh = %2 | count (crew _veh) = %3 | alive crew = %4",_veh, typeOf _veh, count(crew _veh),{alive _x} count crew _veh];
if (crew(_veh) isEqualTo []) then
{
[_veh] call blck_fnc_handleEmptyVehicle;

View File

@ -18,18 +18,22 @@ params["_veh",["_locked",0]];
private["_unit"];
//_veh setVehicleLock "LOCKEDPLAYER";
_veh lock _locked;
_veh addMPEventHandler["MPHit",{ _this call blck_EH_AIVehicle_HandleHit}];
_veh addMPEventHandler["MPKilled",{_this call blck_EH_vehicleKilled}];
_veh addEventHandler["GetOut",{_this remoteExec["blck_EH_vehicleGetOut",2]}];
//_veh addEventHandler["Local", {if (isServer) then {_this call blck_EH_changeLocality}}];
_veh addMPEventHandler["MPHit",{if (isServer) then {_this call blck_fnc_AIVehicle_HandleHit}}];
_veh addMPEventHandler["MPKilled",{if (isServer) then {_this call blck_fnc_processAIVehicleKill}}];
#define vehicleAffected _this select 0
_veh addEventHandler["GetOut",{if (isServer || local (vehicleAffected)) then {_this call blck_fnc_handleVehicleGetOut}}];
//_veh addEventHandler["Local", {if (isServer) then {_this call blck_EH_changeLocality}}]; // Not used at present
blck_monitoredVehicles pushBackUnique _veh;
if (blck_modType isEqualTo "Epoch") then
{
// Adds compatability with Halv's black market traders
if (blck_allowSalesAtBlackMktTraders) then {_veh setVariable["HSHALFPRICE",1,true]};
};
if (blck_modType isEqualTo "Exile") then
{
// Adds compatability with claim vehicle scripts
if (blck_allowClaimVehicle) then
{
_veh setVariable ["ExileIsPersistent", false];

View File

@ -12,36 +12,39 @@
//diag_log format["_fnc_handleEmptyVehicle: _this = %1",_this];
params["_veh"];
//diag_log format["_fnc_handleEmptyVehicle: vehicle %1 | count(crew _veh) = %2 | typoeOf _veh = %3 | description _veh = %4",_veh,count(crew _veh),typeOf _veh,gettext(configFile >> 'cfgWeapons' >> typeOf _veh >> 'displayName')];
if ({alive _x} count (crew _veh) == 0 || crew(_veh) isEqualTo []) then
{
//diag_log format["_fnc_handleEmptyVehicle: no units alive in vehicle %1",_veh, typeOf _veh,gettext (configFile >> 'cfgWeapons' >> typeOf _veh >> 'displayName')];
// TODO: Make sure this variable is properly set on all vehicles.
if (_veh getVariable["GRG_vehType","none"] isEqualTo "emplaced") then
{
//diag_log format["_fnc_handleEmptyVehicle: emplaced weapon %1 being handled",_veh];
if (blck_killEmptyStaticWeapons) then
if (isServer) then
{
if ({alive _x} count (crew _veh) == 0 || crew(_veh) isEqualTo []) then
{
diag_log format["_fnc_handleEmptyVehicle: no units alive in vehicle %1",_veh, typeOf _veh,gettext (configFile >> 'cfgWeapons' >> typeOf _veh >> 'displayName')];
// TODO: Make sure this variable is properly set on all vehicles.
if (_veh getVariable["GRG_vehType","none"] isEqualTo "emplaced") then
{
//diag_log format["_fnc_handleEmptyVehicle: disabling static %1 and setting its delete time",_veh];
_veh setDamage 1;
_veh setVariable["blck_deleteAtTime",diag_tickTime + 60,true];
}else {
//diag_log format["_fnc_handleEmptyVehicle: releasing static %1 to players and setting a default delete timer",_veh];
[_veh] call blck_fnc_releaseVehicleToPlayers; //Call this from _processAIKill
_veh setVariable["blck_deleteAtTime",diag_tickTime + blck_vehicleDeleteTimer,true];
};
} else {
if (blck_killEmptyAIVehicles) then
{
//diag_log format["_fnc_handleEmptyVehicle: disabling vehicle %1 and setting a delete time",_veh];
_veh setDamage 0.7;
_veh setFuel 0;
_veh setVariable["blck_deleteAtTime",diag_tickTime + 60];
//diag_log format["_fnc_handleEmptyVehicle: emplaced weapon %1 being handled",_veh];
if (blck_killEmptyStaticWeapons) then
{
//diag_log format["_fnc_handleEmptyVehicle: disabling static %1 and setting its delete time",_veh];
_veh setDamage 1;
_veh setVariable["blck_deleteAtTime",diag_tickTime + 60,true];
}else {
//diag_log format["_fnc_handleEmptyVehicle: releasing static %1 to players and setting a default delete timer",_veh];
[_veh] call blck_fnc_releaseVehicleToPlayers; //Call this from _processAIKill
_veh setVariable["blck_deleteAtTime",diag_tickTime + blck_vehicleDeleteTimer,true];
};
} else {
//diag_log format["_fnc_handleEmptyVehicle: releasing vehicle %1 to players and setting a default delete timer",_veh];
_veh setVariable["blck_deleteAtTime",diag_tickTime + blck_vehicleDeleteTimer,true];
[_veh] call blck_fnc_releaseVehicleToPlayers;
if (blck_killEmptyAIVehicles) then
{
//diag_log format["_fnc_handleEmptyVehicle: disabling vehicle %1 and setting a delete time",_veh];
_veh setDamage 0.7;
_veh setFuel 0;
_veh setVariable["blck_deleteAtTime",diag_tickTime + 60];
} else {
//diag_log format["_fnc_handleEmptyVehicle: releasing vehicle %1 to players and setting a default delete timer",_veh];
_veh setVariable["blck_deleteAtTime",diag_tickTime + blck_vehicleDeleteTimer,true];
[_veh] call blck_fnc_releaseVehicleToPlayers;
};
};
};
};
};

View File

@ -21,7 +21,6 @@ this addEventHandler ["GetOut", {
turret: Array - turret path
*/
//diag_log format["_fnc_handleAIgetOut: _this = %1",_this];
private _veh = _this select 0;
//private _unit = _this select 2;
[_veh] call blck_fnc_checkForEmptyVehicle;
diag_log format["_fnc_handleAIgetOut: _this = %1",_this];
#define veh _this select 0
if ((isServer) || local (veh)) then {[veh] call blck_fnc_checkForEmptyVehicle};

View File

@ -14,7 +14,7 @@
params["_veh"];
//diag_log format["_fnc_releaseVehicleToPlayers: _veh = %1",_veh];
[_veh] call GMS_fnc_unlockServerVehicle;
[_veh] call blck_fnc_unlockVehicle;
{
_veh removealleventhandlers _x;
} forEach ["Local","GetIn","GetOut","fired","hit","hitpart","reloaded","dammaged","HandleDamage"];

View File

@ -11,13 +11,16 @@
*/
// assumptions: there are no crew in vehicle. there are no players in vehicle. thus we can just be sure the owner is the server then set the lock locally
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_vehicle"];
params["_veh"];
if (local _vehicle) then
if (local _veh) then
{
_vehicle lock 1;
//diag_log format["blck_fnc_unlockVehicle: handling case of local vehicle %2 that is local to owner %1",owner _veh, _veh];
_veh lock 1;
}
else
{
[_vehicle, 1] remoteExecCall ["lock", _vehicle];
//diag_log format["blck_fnc_unlockVehicle: handling case of non-local vehicle %2 that is local to owner %1",owner _veh, _veh];
[_veh, 1] remoteExecCall ["lock", _veh];
};
///diag_log format["blck_fnc_unlockVehicle: _vehcle %1 of typeOf %3 locked set to %2",_veh, locked _veh,typeOf _veh];

View File

@ -11,6 +11,7 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
//#include "\q\addons\custom_server\Configs\blck_defines.hpp";
// TODO: No longer needed; move this to old code folder
if (isServer) then {_this call blck_fnc_HandleAIVehicleHit};

View File

@ -2,7 +2,7 @@
_EH_vehicleGetOut
By Ghostrider [GRG]
Handles the case where a unit gets out of a vehiclet.
// TODO: Not presently used
--------------------------
License
--------------------------
@ -11,10 +11,9 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
//diag_log format["_EH_vehicleGetOut: _this = %1",_this];
if (isServer) then
{
_this call blck_fnc_handleVehicleGetOut
};
// params ["_vehicle", "_role", "_unit", "_turret"];
#define affectedvehicle (_this select 0)
if (isServer || local affectedvehicle) then {affectedvehicle call blck_fnc_handleVehicleGetOut};

View File

@ -12,8 +12,9 @@ this addEventHandler ["GetOutMan", {
*/
//diag_log format["EH_vehicleManGetOut: _this = %1",_this];
params["_unit","_role","_veh"];
[_veh,_unit] remoteExec["blck_fnc_handleAIgetOut",2];
//params["_unit","_role","_veh"];
#define veh _this select 3
[veh] call blck_fnc_handleAIgetOut;

View File

@ -44,6 +44,7 @@ private _functions = [
["blck_fnc_findWaterDepth","q\addons\custom_server\Compiles\Functions\GMS_UMS_fnc_findWaterDepth.sqf"],
["blck_fnc_setAILocality","\q\addons\custom_server\Compiles\Functions\GMS_fnc_setAILocality.sqf"],
["blck_fnc_ai_offloadToClients","\q\addons\custom_server\Compiles\Functions\GMS_fnc_ai_offloadToClients.sqf"],
["blck_fnc_findRandomLocationWithinCircle","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findRandomLocationWithinCircle.sqf"],
// Player-related functions
["GMS_fnc_handlePlayerUpdates","\q\addons\custom_server\Compiles\Units\GMS_fnc_handlePlayerUpdates.sqf"],
@ -148,10 +149,10 @@ private _functions = [
["blck_fnc_vehicleMonitor","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_vehicleMonitor.sqf"],
["blck_fnc_spawnMissionReinforcements","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionReinforcements.sqf"],
["blck_fnc_spawnMissionHeli","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionHeli.sqf"],
["blck_EH_AIVehicle_HandleHit","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_AIVehicle_Hit.sqf"],
//["blck_EH_AIVehicle_HandleHit","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_AIVehicle_Hit.sqf"], // Not needed, we can just call the function directly from the EH
["blck_fnc_HandleAIVehicleHit","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_HandleAIVehicleHit.sqf"],
["blck_EH_VehicleKilled","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_VehicleKilled.sqf"],
["blck_EH_changeLocality","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_changeLocality.sqf"],
// ["blck_EH_VehicleKilled","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_VehicleKilled.sqf"], // Not needed, we can just call the function directly from the EH
// ["blck_EH_changeLocality","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_changeLocality.sqf"], // Not used at present
["blck_fnc_processAIVehicleKill","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_processAIVehicleKill.sqf"],
["blck_fnc_selectPatrolVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_selectPatrolVehicle.sqf"],
["blck_fnc_releaseVehicleToPlayers","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_releaseVehicleToPlayers.sqf"],
@ -160,11 +161,11 @@ private _functions = [
["blck_fnc_reloadVehicleAmmo","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_reloadVehicleAmmo.sqf"],
["blck_fnc_scanForPlayersNearVehicles","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_scanForPlayersNearVehicles.sqf"],
["blck_fnc_revealNearbyPlayers","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_revealNearbyPlayers.sqf"],
["GMS_fnc_unlockServerVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_unlockServerVehicle.sqf"],
["blck_fnc_unlockVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_unlockVehicle.sqf"],
["GMS_fnc_applyVehicleDamagePenalty","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_applyVehicleDamagePenalty.sqf"],
["GMS_fnc_revealVehicleToUnits","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_revealVehicleToUnits.sqf"],
//["GMS_fnc_handleEmptyStaticWeapon","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleEmptyStaticWeapon.sqf"],
["blck_EH_vehicleGetOut","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_vehicleGetOut.sqf"],
//["blck_EH_vehicleGetOut","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_vehicleGetOut.sqf"], // Just call the function directly
["blck_fnc_handleVehicleGetOut","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleVehicleGetOut.sqf"],
["blck_fnc_checkForEmptyVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_checkForEmptyVehicle.sqf"],
["blck_fnc_handleEmptyVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleEmptyVehicle.sqf"],
@ -177,6 +178,7 @@ private _functions = [
["blck_EH_AIKilled","\q\addons\custom_server\Compiles\Units\GMS_EH_AIKilled.sqf"], // Event handler to process AI deaths
["blck_EH_AIHit","\q\addons\custom_server\Compiles\Units\GMS_EH_AIHit.sqf"],
["blck_EH_unitWeaponReloaded","\q\addons\custom_server\Compiles\Units\GMS_EH_unitWeaponReloaded.sqf"],
["blck_EH_AIfiredNear","\q\addons\custom_server\Compiles\Units\GMS_EH_AIfiredNear.sqf"],
//["blck_EH_animDone","\q\addons\custom_server\Compiles\Units\GMS_EH_animDone.sqf"],
["blck_fnc_processAIKill","\q\addons\custom_server\Compiles\Units\GMS_fnc_processAIKill.sqf"],
["blck_fnc_removeLaunchers","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeLaunchers.sqf"],
@ -211,7 +213,11 @@ private _functions = [
missionnamespace setvariable [_name,compileFinal preprocessFileLineNumbers _path];
} foreach _functions;
#ifdef GRGserver
if (isServer) then {blck_fnc_broadcastServerFPS = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_broadcastServerFPS.sqf";};
diag_log "blck_functions loaded using GRGserver settings ---- >>>> ";
#endif
//onPlayerDisconnected {[_name,_owner] call blck_fnc_onPlayerDisconnected;};

View File

@ -0,0 +1,228 @@
/*
AI Mission for Epoch Mod for Arma 3
By Ghostrider
Functions and global variables used by the mission system.
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
private _functions = [
// General functions
/*
["blck_fnc_waitTimer","\q\addons\custom_server\Compiles\Functions\GMS_fnc_waitTimer.sqf"],
["blck_fnc_timedOut","\q\addons\custom_server\Compiles\Functions\GMS_fnc_timedOut.sqf"],
["blck_fnc_FindSafePosn","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findSafePosn.sqf"],
["blck_fnc_randomPosition","\q\addons\custom_server\Compiles\Functions\GMS_fnc_randomPosn.sqf"], // find a randomPosn. see script for details.
["blck_fnc_findPositionsAlongARadius","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findPositionsAlongARadius.sqf"],
["blck_fnc_giveTakeCrypto","\q\addons\custom_server\Compiles\Functions\GMS_fnc_giveTakeCrypto.sqf"],
["blck_fnc_timeAcceleration","\q\addons\custom_server\Compiles\TimeAccel\GMS_fnc_Time.sqf"],
["blck_fnc_groupsOnAISide","\q\addons\custom_server\Compiles\Functions\GMS_fnc_GroupsOnAISide.sqf"], // Returns the number of groups on the side used by AI
["blck_fnc_emptyObject","\q\addons\custom_server\Compiles\Functions\GMS_fnc_emptyObject.sqf"],
["blck_fnc_playerInRange","\q\addons\custom_server\Compiles\Functions\GMS_fnc_playerInRange.sqf"],
["blck_fnc_playerInRangeArray","\q\addons\custom_server\Compiles\Functions\GMS_fnc_playerInRangeArray.sqf"],
["blck_fnc_mainThread","\q\addons\custom_server\Compiles\Functions\GMS_fnc_mainThread.sqf"],
["blck_fnc_allPlayers","\q\addons\custom_server\Compiles\Functions\GMS_fnc_allPlayers.sqf"],
["blck_fnc_addItemToCrate","\q\addons\custom_server\Compiles\Functions\GMS_fnc_addItemToCrate.sqf"],
["blck_fnc_loadLootItemsFromArray","\q\addons\custom_server\Compiles\Functions\GMS_fnc_loadLootItemsFromArray.sqf"],
["blck_fnc_getNumberFromRange","\q\addons\custom_server\Compiles\Functions\GMS_fnc_getNumberFromRange.sqf"],
["blck_fnc_spawnMarker","\q\addons\custom_server\Compiles\Functions\GMS_fnc_spawnMarker.sqf"],
["blck_fnc_missionCompleteMarker","\q\addons\custom_server\Compiles\Functions\GMS_fnc_missionCompleteMarker.sqf"],
["blck_fnc_deleteMarker","\q\addons\custom_server\Compiles\Functions\GMS_fnc_deleteMarker.sqf"],
["blck_fnc_updateMarkerAliveCount","\q\addons\custom_server\Compiles\Functions\GMS_fnc_updateMarkerAliveCount.sqf"],
["blck_fnc_addMoneyToObject","\q\addons\custom_server\Compiles\Functions\GMS_fnc_addMoneyToObject.sqf"],
["blck_fnc_nearestPlayers","\q\addons\custom_server\Compiles\Functions\GMS_fnc_nearestPlayers.sqf"],
["GMS_fnc_msgIED","\q\addons\custom_server\Compiles\Functions\GMS_fnc_msgIED.sqf"],
["GMS_fnc_cleanupTemporaryMarkers","\q\addons\custom_server\Compiles\Functions\GMS_fnc_cleanupTemporaryMarkers.sqf"],
["GMS_fnc_updateCrateSignals","\q\addons\custom_server\Compiles\Functions\GMS_fnc_updateCrateSignals.sqf"],
["GMS_fnc_isClass","\q\addons\custom_server\Compiles\Functions\GMS_fnc_isClass.sqf"],
["blck_fnc_findShoreLocation","q\addons\custom_server\Compiles\Functions\GMS_UMS_fnc_findShoreLocation.sqf"],
["blck_fnc_findWaterDepth","q\addons\custom_server\Compiles\Functions\GMS_UMS_fnc_findWaterDepth.sqf"],
["blck_fnc_setAILocality","\q\addons\custom_server\Compiles\Functions\GMS_fnc_setAILocality.sqf"],
["blck_fnc_ai_offloadToClients","\q\addons\custom_server\Compiles\Functions\GMS_fnc_ai_offloadToClients.sqf"],
// Player-related functions
["GMS_fnc_handlePlayerUpdates","\q\addons\custom_server\Compiles\Units\GMS_fnc_handlePlayerUpdates.sqf"],
["blck_fnc_MessagePlayers","\q\addons\custom_server\Compiles\Functions\GMS_fnc_AIM.sqf"], // Send messages to players regarding Missions
// Mission-related functions
["blck_fnc_selectAILoadout","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAILoadout.sqf"],
["blck_fnc_selectAISidearms","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAISidearms.sqf"],
["blck_fnc_selectAIUniforms","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAIUniforms.sqf"],
["blck_fnc_selectAIHeadgear","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAIHeadgear.sqf"],
["blck_fnc_selectAIVests","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAIVests.sqf"],
["blck_fnc_selectAIBackpacks","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAIBackpacks.sqf"],
["blck_fnc_selectChanceHeliPatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectChanceHeliPatrol.sqf"],
["blck_fnc_selectMissionHelis","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectMissionHelis.sqf"],
["blck_fnc_selectNumberAirPatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectNumberAirPatrols.sqf"],
["blck_fnc_selectNumberParatroops","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectNumberParatroops.sqf"],
["blck_fnc_selectChanceParatroops","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selecctChanceParatroops.sqf"],
["blck_fnc_addMissionToQue","\q\addons\custom_server\Compiles\Missions\GMS_fnc_addMissionToQue.sqf"],
["blck_fnc_updateMissionQue","\q\addons\custom_server\Compiles\Missions\GMS_fnc_updateMissionQue.sqf"],
["blck_fnc_spawnPendingMissions","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnPendingMissions.sqf"],
["blck_fnc_addLiveAItoQue","\q\addons\custom_server\Compiles\Missions\GMS_fnc_addLiveAItoQue.sqf"],
["blck_fnc_addObjToQue","\q\addons\custom_server\Compiles\Missions\GMS_fnc_addObjToQue.sqf"],
["blck_fnc_spawnCrate","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnCrate.sqf"], // Simply spawns a crate of a specified type at a specific position.
["blck_fnc_spawnMissionCrates","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionCrates.sqf"],
["blck_fnc_cleanupObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_cleanUpObjects.sqf"],
["blck_fnc_spawnCompositionObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnBaseObjects.sqf"],
["blck_fnc_spawnRandomLandscape","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnRandomLandscape.sqf"],
["blck_fnc_spawnMissionVehiclePatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionVehiclePatrols.sqf"],
["blck_fnc_spawnEmplacedWeaponArray","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnEmplacedWeaponArray.sqf"],
["blck_fnc_spawnMissionAI","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionAI.sqf"],
["blck_fnc_spawnMissionLootVehicles","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionLootVehicles.sqf"],
["blck_fnc_fillBoxes","\q\addons\custom_server\Compiles\Missions\GMS_fnc_fillBoxes.sqf"], // Adds items to an object according to passed parameters. See the script for details.
["blck_fnc_smokeAtCrates","\q\addons\custom_server\Compiles\Missions\GMS_fnc_smokeAtCrates.sqf"], // Spawns a wreck and adds smoke to it
["blck_fnc_spawnMines","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMines.sqf"], // Deploys mines at random locations around the mission center
["blck_fnc_clearMines","\q\addons\custom_server\Compiles\Missions\GMS_fnc_clearMines.sqf"], // clears mines in an array passed as a parameter
["blck_fnc_signalEnd","\q\addons\custom_server\Compiles\Missions\GMS_fnc_signalEnd.sqf"], // deploy smoke grenades at loot crates at the end of the mission.
["blck_fnc_endMission","\q\addons\custom_server\Compiles\Missions\GMS_fnc_endMission.sqf"],
["blck_fnc_paraDropObject","\q\addons\custom_server\Compiles\Missions\GMS_fnc_paraDropObject.sqf"],
["blck_fnc_loadMissionCrate","\q\addons\custom_server\Compiles\Missions\GMS_fnc_loadMissionCrate.sqf"],
["blck_fnc_crateMoved","\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMoved.sqf"],
["blck_fnc_crateMarker","\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMarker.sqf"],
["blck_fnc_garrisonBuilding_RelPosSystem","\q\addons\custom_server\Compiles\Missions\GMS_fnc_garrisonBuilding_relPosSystem.sqf"],
["blck_fnc_garrisonBuilding_ATLsystem","\q\addons\custom_server\Compiles\Missions\GMS_fnc_garrisonBuilding_ATLsystem.sqf"],
["blck_fnc_spawnGarrisonInsideBuilding_ATL","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf"],
["blck_fnc_spawnGarrisonInsideBuilding_relPos","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf"],
["GMS_fnc_selectVehicleCrewCount","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectVehicleCrewCount.sqf"],
["blck_fnc_addDyanamicUMS_Mission","q\addons\custom_server\Compiles\Missions\GMS_fnc_addDynamicUMS_Mission.sqf"],
["blck_fnc_sm_monitorInfantry","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorInfantry.sqf"],
["blck_fnc_sm_monitorScuba","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorScuba.sqf"],
["blck_fnc_sm_monitorVehicles","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorVehicles.sqf"],
["blck_fnc_sm_monitorAircraft","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorAircraft.sqf"],
["blck_fnc_sm_monitorShips","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorShips.sqf"],
["blck_fnc_sm_monitorSubs","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorSubs.sqf"],
["blck_fnc_sm_monitorEmplaced","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorEmplaced.sqf"],
["blck_fnc_sm_monitorGarrisonsASL","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorGarrisonsASL.sqf"],
["blck_fnc_sm_monitorGarrisons_relPos","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorGarrisons_relPos.sqf"],
//["blck_fnc_sm_spawnVehiclePatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnVehiclePatrol.sqf"],
["blck_fnc_sm_spawnAirPatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnAirPatrol.sqf"],
["blck_fnc_sm_spawnEmplaced","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnEmplaced.sqf"],
// ["blck_fnc_sm_spawnInfantryPatrol","\q\addons\custom_server\Compiles\Missions\GMS_sm_spawnInfantryPatrol.sqf"],
["blck_fnc_sm_staticPatrolMonitor","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_staticPatrolMonitor.sqf"],
// ["blck_fnc_sm_checkForPlayerNearMission","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_checkForPlayerNearMission.sqf"],
["blck_fnc_sm_spawnAirPatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnAirPatrols.sqf"],
//["blck_fnc_sm_spawnEmplaceds","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnEmplaced.sqf"],
["blck_fnc_sm_spawnInfantryPatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnInfantryPatrols.sqf"],
["blck_fnc_sm_spawnLootContainers","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnLootContainers.sqf"],
["blck_fnc_sm_spawnObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnObjects.sqf"],
["blck_fnc_sm_spawnVehiclePatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnVehiclePatrols.sqf"],
["blck_fnc_sm_spawnBuildingGarrison_ASL","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnBuildingGarrisonASL.sqf"],
["blck_fnc_sm_spawnBuildingGarrison_relPos","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf"],
["blck_fnc_sm_spawnObjectASLVectorDirUp","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf"],
["blck_fnc_spawnScubaGroup","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnScubaGroup.sqf"],
["blck_fnc_spawnSDVPatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnSDVPatrol.sqf"],
["blck_fnc_spawnSurfacePatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnSurfacePatrol.sqf"],
//["blck_fnc_sm_AddScubaGroup","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_AddScubaGroup.sqf"],
//["blck_fnc_sm_AddSurfaceVehicle","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_AddSurfaceVehicle.sqf"],
["blck_fnc_sm_AddSDVVehicle","\q\addons\custom_server\Compiles\Missions\GMS_sm_AddSDVVehicle.sqf"],
["blck_fnc_sm_AddGroupToArray", "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddGroupToArray.sqf"],
*/
// Group-related functions
//["blck_fnc_spawnGroup","\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"], // Spawn a single group and populate it with AI units]
//["blck_fnc_setupWaypoints","\q\addons\custom_server\Compiles\Groups\GMS_fnc_setupWaypoints.sqf"], // Set default waypoints for a group
// 7/29/19 script mission; presume another function handles this now.
//["blck_fnc_missionGroupMonitor","\q\addons\custom_server\Compiles\Groups\GMS_fnc_missionGroupMonitor.sqf"], // Monitors active groups for those that are stuck in an SAD waypoint but not in combat
//["blck_fnc_changeToSADWaypoint","\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToSADWaypoint.sqf"],
//["blck_fnc_changeToMoveWaypoint","\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToMoveWaypoint.sqf"],
//["blck_fnc_changeToSentryWaypoint","\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToSentryWaypoint.sqf"],
["blck_fnc_setNextWaypoint","\q\addons\custom_server\Compiles\Groups\GMS_fnc_setNextWaypoint.sqf"],
//["blck_fnc_cleanEmptyGroups","\q\addons\custom_server\Compiles\Groups\GMS_fnc_cleanEmptyGroups.sqf"], // GMS_fnc_cleanEmptyGroups
//["blck_fnc_findNearestInfantryGroup","\q\addons\custom_server\Compiles\Groups\GMS_fnc_findNearestInfantryGroup.sqf"],
//["blck_fnc_createGroup","\q\addons\custom_server\Compiles\Groups\GMS_fnc_create_AI_Group.sqf"], // create a group for which other functions spawn AI.
//["blck_fnc_simulationManager","\q\addons\custom_server\Compiles\Groups\GMS_fnc_simulationMonitor.sqf"],
//["blck_fnc_groupWaypointMonitor","\q\addons\custom_server\Compiles\Groups\GMS_fnc_groupWaypointMonitor.sqf"],
//["blck_fnc_checkgroupwaypointstatus","\q\addons\custom_server\Compiles\Groups\GMS_fnc_checkgroupwaypointstatus.sqf"],
// blck_fnc_checkgroupwaypointstatus
/*
// Functions specific to vehicles, whether wheeled, aircraft or static
["blck_fnc_spawnVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehicle.sqf"],
["blck_fnc_spawnVehiclePatrol","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehiclePatrol.sqf"],
["blck_fnc_protectVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_protectVehicle.sqf"],
["blck_fnc_configureMissionVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_configureMissionVehicle.sqf"],
["blck_fnc_vehicleMonitor","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_vehicleMonitor.sqf"],
["blck_fnc_spawnMissionReinforcements","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionReinforcements.sqf"],
["blck_fnc_spawnMissionHeli","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionHeli.sqf"],
["blck_EH_AIVehicle_HandleHit","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_AIVehicle_Hit.sqf"],
["blck_fnc_HandleAIVehicleHit","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_HandleAIVehicleHit.sqf"],
["blck_EH_VehicleKilled","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_VehicleKilled.sqf"],
["blck_EH_changeLocality","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_changeLocality.sqf"],
["blck_fnc_processAIVehicleKill","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_processAIVehicleKill.sqf"],
["blck_fnc_selectPatrolVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_selectPatrolVehicle.sqf"],
["blck_fnc_releaseVehicleToPlayers","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_releaseVehicleToPlayers.sqf"],
["blck_fnc_deleteAIVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_deleteAIVehicle.sqf"],
["blck_fnc_destroyVehicleAndCrew","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_destroyVehicleAndCrew.sqf"],
["blck_fnc_reloadVehicleAmmo","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_reloadVehicleAmmo.sqf"],
["blck_fnc_scanForPlayersNearVehicles","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_scanForPlayersNearVehicles.sqf"],
["blck_fnc_revealNearbyPlayers","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_revealNearbyPlayers.sqf"],
["GMS_fnc_unlockServerVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_unlockServerVehicle.sqf"],
["GMS_fnc_applyVehicleDamagePenalty","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_applyVehicleDamagePenalty.sqf"],
["GMS_fnc_revealVehicleToUnits","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_revealVehicleToUnits.sqf"],
//["GMS_fnc_handleEmptyStaticWeapon","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleEmptyStaticWeapon.sqf"],
*/
["blck_EH_vehicleGetOut","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_vehicleGetOut.sqf"],
["blck_fnc_handleVehicleGetOut","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleVehicleGetOut.sqf"],
/*
["blck_fnc_checkForEmptyVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_checkForEmptyVehicle.sqf"],
["blck_fnc_handleEmptyVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleEmptyVehicle.sqf"],
["blck_fnc_loadVehicleCrew","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_loadVehicleCrew.sqf"],
*/
// functions to support Units
//["blck_fnc_removeGear","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeGear.sqf"], // Strip an AI unit of all gear.
//["blck_fnc_spawnUnit","\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnUnit.sqf"], // spawn individual AI
["blck_EH_AIKilled","\q\addons\custom_server\Compiles\Units\GMS_EH_AIKilled.sqf"], // Event handler to process AI deaths
//["blck_EH_AIHit","\q\addons\custom_server\Compiles\Units\GMS_EH_AIHit.sqf"],
["blck_EH_unitWeaponReloaded","\q\addons\custom_server\Compiles\Units\GMS_EH_unitWeaponReloaded.sqf"],
["blck_EH_AIfiredNear","\q\addons\custom_server\Compiles\Units\GMS_EH_AIfiredNear.sqf"],
["blck_fnc_processAIfiredNear","\q\addons\custom_server\Compiles\Units\GMS_fnc_processAIFiredNear.sqf"],
//["blck_EH_animDone","\q\addons\custom_server\Compiles\Units\GMS_EH_animDone.sqf"],
["blck_fnc_processAIKill","\q\addons\custom_server\Compiles\Units\GMS_fnc_processAIKill.sqf"],
/*
["blck_fnc_removeLaunchers","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeLaunchers.sqf"],
["blck_fnc_removeNVG","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeNVG.sqf"],
["blck_fnc_alertNearbyUnits","\q\addons\custom_server\Compiles\Units\GMS_fnc_alertNearbyUnits.sqf"],
["blck_fnc_alertGroupUnits","\q\addons\custom_server\Compiles\Units\GMS_fnc_alertGroupUnits.sqf"],
["GMS_fnc_alertNearbyGroups","\q\addons\custom_server\Compiles\Units\GMS_fnc_alertNearbyGroups.sqf"],
["blck_fnc_alertNearbyVehicles","\q\addons\custom_server\Compiles\Units\GMS_fnc_alertNearbyVehicles.sqf"],
["blck_fnc_processIlleagalAIKills","\q\addons\custom_server\Compiles\Units\GMS_fnc_processIlleagalAIKills.sqf"],
["blck_fnc_cleanupDeadAI","\q\addons\custom_server\Compiles\Units\GMS_fnc_cleanupDeadAI.sqf"], // handles deletion of AI bodies and gear when it is time.
["blck_fnc_setSkill","\q\addons\custom_server\Compiles\Units\GMS_fnc_setSkill.sqf"],
["blck_fnc_cleanupAliveAI","\q\addons\custom_server\Compiles\Units\GMS_fnc_cleanupAliveAI.sqf"],
["blck_fnc_deleteAI","\q\addons\custom_server\Compiles\Units\GMS_fnc_deleteAI.sqf"],
["blck_fnc_processAIHit","\q\addons\custom_server\Compiles\Units\GMS_fnc_processAIHit.sqf"],
["blck_fnc_spawnHostage","\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnHostage.sqf"],
["blck_fnc_spawnLeader","\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnLeader.sqf"],
["blck_fnc_spawnCharacter","\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnCharacter.sqf"],
["blck_fnc_spawnParaUnits","\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnParaUnits.sqf"],
//["blck_fnc_nextAnim","\q\addons\custom_server\Compiles\Units\GMS_fnc_nextAnim.sqf"],
["blck_fnc_placeCharacterInBuilding","\q\addons\custom_server\Compiles\Units\GMS_fnc_placeCharacterInBuilding.sqf"],
["GMS_fnc_removeAllAIgear","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeAllAIgear.sqf"],
*/
// HC support functions
//["blck_fnc_HC_XferGroup","\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_XferGroup.sqf"],
//["blck_fnc_HC_passToHCs","\q\addons\custom_server\Compiles\HC\GMS_fnc_passToHCs.sqf"],
//["blck_fnc_HC_leastBurdened","\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_leastBurdened.sqf"],
//["blck_fnc_HC_countGroupsAssigned","\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_countGroupsAssigned.sqf"]
[]
];
{
if !(_x isEqualto []) then
{
_x params ["_name","_path"];
missionnamespace setvariable [_name,compileFinal preprocessFileLineNumbers _path];
};
} foreach _functions;
diag_log format["[blckeagles] Functions for Headless Clients compiled"];