Final build 138

All types of patrols at static objects now despawn when no player is near.
In addition, vehicle, heli and emplaced weapons crew use the same uniform selections as infantry.
This commit is contained in:
Ghostrider-GRG- 2018-06-17 12:07:37 -04:00
parent 84902062da
commit 2d74842106
25 changed files with 782 additions and 44 deletions

View File

@ -40,7 +40,7 @@ while {true} do
{
_timer5sec = diag_tickTime + 5;
[] call blck_fnc_missionGroupMonitor;
[] call blck_fnc_sm_monitorStaticMissionUnits;
[] call blck_fnc_sm_missionPatrolMonitor;
//diag_log format["[blckeagls] _fnc_mainThread 5 Second Timer Handled | Timstamp %1",diag_tickTime];
};
if (diag_tickTime > _timer20sec) then

View File

@ -13,7 +13,14 @@
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols]];
params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]]];
if (count _uniforms == 0) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
if (count _headGear == 0) then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear};
if (count _vests == 0) then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests};
if (count _backpacks == 0) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
if (count _weaponList == 0) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (count _sideArms == 0) then {[_aiDifficultyLevel] call blck_fnc_selectAISidearms};
#ifdef blck_debugMode
if (blck_debugLevel >=2) then
{

View File

@ -14,8 +14,14 @@
*/
#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","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]];
params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_isScubaGroup",false]];
if (count _uniforms == 0) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
if (count _headGear == 0) then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear};
if (count _vests == 0) then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests};
if (count _backpacks == 0) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
if (count _weaponList == 0) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (count _sideArms == 0) then {[_aiDifficultyLevel] call blck_fnc_selectAISidearms};
#ifdef blck_debugMode
if (blck_debugLevel >=2) then
{

View File

@ -12,8 +12,13 @@
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
private["_grpPilot","_chopperType","_patrolHeli","_launcherType","_unitPilot","_unitCrew","_mags","_turret","_return","_abort","_supplyHeli"];
params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]], ["_sideArms",[]] ];
params["_coords","_skillAI","_helis",["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]],["_Launcher","none"]];
if (count _uniforms == 0) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
if (count _headGear == 0) then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear};
if (count _vests == 0) then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests};
if (count _backpacks == 0) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
if (count _weaponList == 0) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (count _sideArms == 0) then {[_aiDifficultyLevel] call blck_fnc_selectAISidearms};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{

View File

@ -14,7 +14,13 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
// [_coords,_aiDifficultyLevel,_chancePara,_noPara,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms]
params["_coords","_missionHelis","_spawnHeli",["_aiSkillsLevel","Red"],["_chancePara",0],["_noPara",0],["_uniforms",blck_SkinList],["_headGear",blck_headgearList],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weapons",[]],["_sideArms",blck_Pistols]];
params["_coords","_missionHelis","_spawnHeli",["_aiSkillsLevel","Red"],["_chancePara",0],["_noPara",0],["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]]];
if (count _uniforms == 0) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
if (count _headGear == 0) then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear};
if (count _vests == 0) then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests};
if (count _backpacks == 0) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
if (count _weaponList == 0) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (count _sideArms == 0) then {[_aiDifficultyLevel] call blck_fnc_selectAISidearms};
#ifdef blck_debugMode
if (blck_debugLevel >=2) then
{

View File

@ -16,4 +16,18 @@
//#define blck_debugMode
//#define blck_milServer
////////////////////////////
// Do not touch anything below this line
///////////////////////////
#define onFoot 1
#define inVehicle 2
// defines for static group spawners
#define staticPatrolTriggerRange 2000
#define groupParameters 0
#define patrolGroup 1
#define groupSpawned 2
#define timesSpawned 3
#define respawnAt 4

View File

@ -9,13 +9,14 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_array","_patrolInformation"];
params["_array","_patrolInformation",["_timesToRespawn",-1]];
waitUntil {blck_sm_monitoring isEqualTo 0};
_array pushBack [
_patrolInformation,
grpNull,
0, // spawned at
0, // respawn at
0 // last time a player was nearby
0, // groupSpawned
0, // times Spawned
0, // Respawn At
_timesToRespawn // Max Times to Respawn
];
_array

View File

@ -10,7 +10,8 @@
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
diag_log "[blckeagls] GMS_fnc_sm_init_functions.sqf <Defining Variables and Compiling Functions>";
blck_sm_Groups = [];
//blck_sm_Groups = [];
blck_sm_Infantry = [];
blck_sm_Vehicles = [];
blck_sm_Aircraft = [];
blck_sm_Emplaced = [];
@ -22,17 +23,27 @@ blck_sm_lootContainers = [];
blck_fnc_sm_AddGroupToArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddGroupToArray.sqf";
/*
blck_fnc_sm_AddGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddGroup.sqf";
blck_fnc_sm_AddVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddVehicle.sqf";
blck_fnc_sm_AddAircraft = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddAircraft.sqf";
blck_fnc_sm_AddEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddEmplaced.sqf";
*/
blck_fnc_sm_monitorStaticUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorStaticPatrols.sqf";
blck_fnc_sm_monitorInfantry = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorInfantry.sqf";
blck_fnc_sm_monitorScuba = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorScuba.sqf";
blck_fnc_sm_monitorVehicles = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorVehicles.sqf";
blck_fnc_sm_monitorAircraft = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorAircraft.sqf";
blck_fnc_sm_monitorShips = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorShips.sqf";
blck_fnc_sm_monitorSubs = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorSubs.sqf";
blck_fnc_sm_monitorEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorEmplaced.sqf";
blck_fnc_sm_monitorStaticUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorStaticUnits.sqf";
blck_fnc_sm_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnVehiclePatrol.sqf";
blck_fnc_sm_spawnAirPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnAirPatrol.sqf";
blck_fnc_sm_spawnEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnEmplaced.sqf";
//blck_fnc_sm_spawnInfantryPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrol.sqf";
blck_fnc_sm_monitorStaticMissionUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorStaticUnits.sqf";
blck_fnc_sm_missionPatrolMonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorStaticPatrols.sqf";
//blck_fnc_sm_checkForPlayerNearMission = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_checkForPlayerNearMission.sqf";
blck_fnc_sm_spawnAirPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnAirPatrols.sqf";
blck_fnc_sm_spawnEmplaceds = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnEmplaced.sqf";

View File

@ -30,21 +30,21 @@ _blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow
[_missionLandscape] call blck_fnc_sm_spawnObjects;
{
[_x] call blck_fnc_sm_AddAircraft;
[blck_sm_Aircraft,_x] call blck_fnc_sm_AddGroupToArray;
}forEach _airPatrols;
//uiSleep 1;
{
[_x] call blck_fnc_sm_AddGroup;
[blck_sm_Infantry,_x] call blck_fnc_sm_AddGroupToArray;
}forEach _aiGroupParameters;
{
[_x] call blck_fnc_sm_AddEmplaced;
[blck_sm_Emplaced,_x] call blck_fnc_sm_AddGroupToArray;
}forEach _missionEmplacedWeapons;
{
[_x] call blck_fnc_sm_AddVehicle;
[blck_sm_Vehicles,_x] call blck_fnc_sm_AddGroupToArray;
}forEach _vehiclePatrolParameters;
uiSleep 30;

View File

@ -0,0 +1,94 @@
/*
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";
private["_mode","_sm_groups"];
_sm_groups = +blck_sm_Aircraft;
//diag_log format["_fnc_monitorAircraft: time %2 | blck_sm_Aircraft %1",blck_sm_Aircraft,diag_tickTime];
{
_x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"];
//diag_log format["_fnc_monitorAircraft: _x %1",_x];
//diag_log format["_fnc_monitorAircraft: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_monitorAircraft (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt];
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"];
_groupParameters params["_aircraftType","_pos","_difficulty","_patrolRadius","_respawnTime"];
//diag_log format["_fnc_monitorAircraft: _aircraftType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_aircraftType,_pos,_difficulty,_patrolRadius,_respawnTime];
private _element = +_x;//
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0};
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {blck_sm_Aircraft deleteAt (blck_sm_Aircraft find _x)};
case 1: {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
private _numAI = [_units] call blck_fnc_getNumberFromRange;
_return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli;
_group = group (driver (_return select 0));
_timesSpawned = _timesSpawned + 1;
_groupSpawned = 1;
_respawnAt = 0;
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned];
_element set[respawnAt,_respawnAt];
blck_sm_Aircraft set[blck_sm_Aircraft find _x,_element];
};
};
case 2: {
_groupSpawned = 0;
_respawnAt = diag_tickTime + _respawnTime;
_element set[respawnAt,_respawnAt];
_element set[groupSpawned,_groupSpawned];
blck_sm_Aircraft set[blck_sm_Aircraft find _x,_element];
//diag_log format["_fnc_monitorAircraft: update respawn time to %1",_respawnAt];
};
default {};
};
//diag_log format["_fnc_monitorAircraft(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned];
} else {
//diag_log format["_fnc_monitorAircraft: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]];
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
//diag_log format["_fnc_monitorAircraft: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]];
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
//diag_log format["_fnc_monitorAircraft: despanwing patrol for _element %1",_element];
_groupParameters set [2, {alive _x} count (units _group)];
private _veh = vehicle (leader _group);
[_veh] call blck_fnc_destroyVehicleAndCrew;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
blck_sm_Aircraft set[(blck_sm_Aircraft find _x), _element];
};
};
};
}forEach _sm_groups;

View File

@ -0,0 +1,92 @@
/*
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";
private["_mode","_sm_groups"];
_sm_groups = +blck_sm_Emplaced;
//diag_log format["_fnc_monitorEmplaced: time %2 | blck_sm_Emplaced %1",blck_sm_Emplaced,diag_tickTime];
{
_x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"];
//diag_log format["_fnc_monitorEmplaced: _x %1",_x];
//diag_log format["_fnc_monitorEmplaced: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_monitorEmplaced (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt];
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime"];
//diag_log format["_fnc_monitorEmplaced: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime];
private _element = +_x;//
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0};
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {blck_sm_Emplaced deleteAt (blck_sm_Emplaced find _x)};
case 1: {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
private _return = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray;
_group = group( (_return select 1) select 0);
_timesSpawned = _timesSpawned + 1;
_groupSpawned = 1;
_respawnAt = 0;
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned];
_element set[respawnAt,_respawnAt];
blck_sm_Emplaced set[blck_sm_Emplaced find _x,_element];
};
};
case 2: {
_groupSpawned = 0;
_respawnAt = diag_tickTime + _respawnTime;
_element set[respawnAt,_respawnAt];
_element set[groupSpawned,_groupSpawned];
blck_sm_Emplaced set[blck_sm_Emplaced find _x,_element];
//diag_log format["_fnc_monitorEmplaced: update respawn time to %1",_respawnAt];
};
default {};
};
//diag_log format["_fnc_monitorEmplaced(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned];
} else {
//diag_log format["_fnc_monitorEmplaced: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]];
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
//diag_log format["_fnc_monitorEmplaced: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]];
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
diag_log format["_fnc_monitorEmplaced: despanwing patrol for _element %1",_element];
_groupParameters set [2, {alive _x} count (units _group)];
private _veh = vehicle (leader _group);
[_veh] call blck_fnc_destroyVehicleAndCrew;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
blck_sm_Emplaced set[(blck_sm_Emplaced find _x), _element];
};
};
};
}forEach _sm_groups;

View File

@ -0,0 +1,100 @@
/*
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";
private["_mode","_sm_groups"];
_sm_groups = +blck_sm_Infantry;
//diag_log format["_fnc_monitorInfantry: time %2 | blck_sm_Infantry %1",blck_sm_Infantry,diag_tickTime];
{
_x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"];
//diag_log format["_fnc_monitorInfantry: _x %1",_x];
//diag_log format["_fnc_monitorInfantry: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_monitorInfantry (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"];
//diag_log format["_fnc_monitorInfantry: _pos = %1 | _difficulty = 2 | _units = %3 | _patrolRadius = %4 | _respawnTime = %5",_pos,_difficulty,_units,_patrolRadius,_respawnTime];
private _element = +_x;//
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0};
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {blck_sm_Infantry deleteAt (blck_sm_Infantry find _x)};
case 1: {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
private _numAI = [_units] call blck_fnc_getNumberFromRange;
//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] ];
_group = [
_pos,_pos,_numAI,_numAI,_difficulty,_patrolRadius-1,_patrolRadius,true,
[_difficulty] call blck_fnc_selectAIUniforms,
[_difficulty] call blck_fnc_selectAIHeadgear,
[_difficulty] call blck_fnc_selectAIVests,
[_difficulty] call blck_fnc_selectAIBackpacks,
[_difficulty] call blck_fnc_selectAILoadout,
[_difficulty] call blck_fnc_selectAISidearms
] call blck_fnc_spawnGroup;
_timesSpawned = _timesSpawned + 1;
_groupSpawned = 1;
_respawnAt = 0;
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned];
_element set[respawnAt,_respawnAt];
blck_sm_Infantry set[blck_sm_Infantry find _x,_element];
};
};
case 2: {
_groupSpawned = 0;
_respawnAt = diag_tickTime + _respawnTime;
_element set[respawnAt,_respawnAt];
_element set[groupSpawned,_groupSpawned];
blck_sm_Infantry set[blck_sm_Infantry find _x,_element];
//diag_log format["_fnc_monitorInfantry: update respawn time to %1",_respawnAt];
};
default {};
};
//diag_log format["_fnc_monitorInfantry(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned];
} else {
//diag_log format["_fnc_monitorInfantry: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]];
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
//diag_log format["_fnc_monitorInfantry: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]];
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
//diag_log format["_fnc_monitorInfantry: despanwing patrol for _element %1",_element];
_groupParameters set [2, {alive _x} count (units _group)];
{[_x] call blck_fnc_deleteAI} forEach (units _group);
deleteGroup _group;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
blck_sm_Infantry set[(blck_sm_Infantry find _x), _element];
};
};
};
}forEach _sm_groups;

View File

@ -0,0 +1,92 @@
/*
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";
private["_mode","_sm_groups"];
_sm_groups = +blck_sm_scubaGroups;
//diag_log format["_fnc_monitorScubaGroups: time %2 | blck_sm_scubaGroups %1",blck_sm_scubaGroups,diag_tickTime];
{
_x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"];
//diag_log format["_fnc_monitorScubaGroups: _x %1",_x];
//diag_log format["_fnc_monitorScubaGroups: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_monitorScubaGroups (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"];
//diag_log format["_fnc_monitorScubaGroups: _pos = %1 | _difficulty = 2 | _units = %3 | _patrolRadius = %4 | _respawnTime = %5",_pos,_difficulty,_units,_patrolRadius,_respawnTime];
private _element = +_x;//
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {blck_sm_scubaGroups deleteAt (blck_sm_scubaGroups find _x)};
case 1: {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
private _numAI = [_units] call blck_fnc_getNumberFromRange;
//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] ];
_group = [_pos,_difficulty,_units,_patrolRadius] call blck_fnc_spawnScubaGroup;
_timesSpawned = _timesSpawned + 1;
_groupSpawned = 1;
_respawnAt = 0;
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned];
_element set[respawnAt,_respawnAt];
blck_sm_scubaGroups set[blck_sm_scubaGroups find _x,_element];
};
};
case 2: {
_groupSpawned = 0;
_respawnAt = diag_tickTime + _respawnTime;
_element set[respawnAt,_respawnAt];
_element set[groupSpawned,_groupSpawned];
blck_sm_scubaGroups set[blck_sm_scubaGroups find _x,_element];
//diag_log format["_fnc_monitorScubaGroups: update respawn time to %1",_respawnAt];
};
default {};
};
//diag_log format["_fnc_monitorScubaGroups(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned];
} else {
//diag_log format["_fnc_monitorScubaGroups: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]];
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
//diag_log format["_fnc_monitorScubaGroups: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]];
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
//diag_log format["_fnc_monitorScubaGroups: despanwing patrol for _element %1",_element];
_groupParameters set [2, {alive _x} count (units _group)];
{[_x] call blck_fnc_deleteAI} forEach (units _group);
deleteGroup _group;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
blck_sm_scubaGroups set[(blck_sm_scubaGroups find _x), _element];
};
};
};
}forEach _sm_groups;

View File

@ -0,0 +1,93 @@
/*
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";
private["_mode","_sm_groups"];
_sm_groups = +blck_sm_surfaceShips;
//diag_log format["_fnc_monitorShips: time %2 | blck_sm_surfaceShips %1",blck_sm_surfaceShips,diag_tickTime];
{
_x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"];
//diag_log format["_fnc_monitorShips: _x %1",_x];
//diag_log format["_fnc_monitorShips: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_monitorShips (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt];
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime"];
//diag_log format["_fnc_monitorVehicles: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime];
private _element = +_x;//
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {blck_sm_surfaceShips deleteAt (blck_sm_surfaceShips find _x)};
case 1: {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
//diag_log format["_fnc_monitorShips: _return = %1",_return];
_group = group ((_return select 0) select 0);
_timesSpawned = _timesSpawned + 1;
_groupSpawned = 1;
_respawnAt = 0;
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned];
_element set[respawnAt,_respawnAt];
blck_sm_surfaceShips set[blck_sm_surfaceShips find _x,_element];
};
};
case 2: {
_groupSpawned = 0;
_respawnAt = diag_tickTime + _respawnTime;
_element set[respawnAt,_respawnAt];
_element set[groupSpawned,_groupSpawned];
blck_sm_surfaceShips set[blck_sm_surfaceShips find _x,_element];
//diag_log format["_fnc_monitorShips: update respawn time to %1",_respawnAt];
};
default {};
};
//diag_log format["_fnc_monitorShips(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned];
} else {
//diag_log format["_fnc_monitorShips: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]];
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
//diag_log format["_fnc_monitorShips: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]];
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
//diag_log format["_fnc_monitorShips: despanwing patrol for _element %1",_element];
_groupParameters set [2, {alive _x} count (units _group)];
private _veh = vehicle (leader _group);
[_veh] call blck_fnc_destroyVehicleAndCrew;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
blck_sm_surfaceShips set[(blck_sm_surfaceShips find _x), _element];
};
};
};
}forEach _sm_groups;

View File

@ -0,0 +1,23 @@
/*
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";
[] call blck_fnc_sm_monitorInfantry;
[] call blck_fnc_sm_monitorVehicles;
[] call blck_fnc_sm_monitorAircraft;
[] call blck_fnc_sm_monitorEmplaced;
[] call blck_fnc_sm_monitorScuba;
[] call blck_fnc_sm_monitorShips;
[] call blck_fnc_sm_monitorSubs;

View File

@ -0,0 +1,92 @@
/*
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";
private["_mode","_sm_groups"];
_sm_groups = +blck_sm_submarines;
//diag_log format["_fnc_monitorSubs: time %2 | blck_sm_submarines %1",blck_sm_submarines,diag_tickTime];
{
_x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"];
//diag_log format["_fnc_monitorSubs: _x %1",_x];
//diag_log format["_fnc_monitorSubs: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_monitorSubs (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt];
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime"];
//diag_log format["_fnc_monitorVehicles: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime];
private _element = +_x;//
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {blck_sm_submarines deleteAt (blck_sm_submarines find _x)};
case 1: {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_return = [_pos,1,_difficulty,[_groupParameters],false,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,blck_backpacks,blck_UMS_weapons,blck_Pistols,true] call blck_fnc_spawnMissionVehiclePatrols;
//diag_log format["_fnc_monitorSubs: _return = %1",_return];
_timesSpawned = _timesSpawned + 1;
_groupSpawned = 1;
_respawnAt = 0;
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned];
_element set[respawnAt,_respawnAt];
blck_sm_submarines set[blck_sm_submarines find _x,_element];
};
};
case 2: {
_groupSpawned = 0;
_respawnAt = diag_tickTime + _respawnTime;
_element set[respawnAt,_respawnAt];
_element set[groupSpawned,_groupSpawned];
blck_sm_submarines set[blck_sm_submarines find _x,_element];
//diag_log format["_fnc_monitorSubs: update respawn time to %1",_respawnAt];
};
default {};
};
//diag_log format["_fnc_monitorSubs(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned];
} else {
//diag_log format["_fnc_monitorSubs: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]];
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
//diag_log format["_fnc_monitorSubs: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]];
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
//diag_log format["_fnc_monitorSubs: despanwing patrol for _element %1",_element];
_groupParameters set [2, {alive _x} count (units _group)];
private _veh = vehicle (leader _group);
[_veh] call blck_fnc_destroyVehicleAndCrew;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
blck_sm_submarines set[(blck_sm_submarines find _x), _element];
};
};
};
}forEach _sm_groups;

View File

@ -0,0 +1,93 @@
/*
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";
private["_mode","_sm_groups"];
_sm_groups = +blck_sm_Vehicles;
//diag_log format["_fnc_monitorVehicles: time %2 | blck_sm_Vehicles %1",blck_sm_Vehicles,diag_tickTime];
{
_x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"];
//diag_log format["_fnc_monitorVehicles: _x %1",_x];
//diag_log format["_fnc_monitorVehicles: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_monitorVehicles (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt];
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime"];
//diag_log format["_fnc_monitorVehicles: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime];
private _element = +_x;//
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0};
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {blck_sm_Vehicles deleteAt (blck_sm_Vehicles find _x)};
case 1: {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
_group = group (driver (_return select 0));
_timesSpawned = _timesSpawned + 1;
_groupSpawned = 1;
_respawnAt = 0;
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned];
_element set[respawnAt,_respawnAt];
blck_sm_Vehicles set[blck_sm_Vehicles find _x,_element];
};
};
case 2: {
_groupSpawned = 0;
_respawnAt = diag_tickTime + _respawnTime;
_element set[respawnAt,_respawnAt];
_element set[groupSpawned,_groupSpawned];
blck_sm_Vehicles set[blck_sm_Vehicles find _x,_element];
//diag_log format["_fnc_monitorVehicles: update respawn time to %1",_respawnAt];
};
default {};
};
//diag_log format["_fnc_monitorVehicles(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned];
} else {
//diag_log format["_fnc_monitorVehicles: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]];
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
//diag_log format["_fnc_monitorVehicles: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]];
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
//diag_log format["_fnc_monitorVehicles: despanwing patrol for _element %1",_element];
_groupParameters set [2, {alive _x} count (units _group)];
private _veh = vehicle (leader _group);
[_veh] call blck_fnc_destroyVehicleAndCrew;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
blck_sm_Vehicles set[(blck_sm_Vehicles find _x), _element];
};
};
};
}forEach _sm_groups;

View File

@ -15,8 +15,8 @@ private ["_staticMissions"];
_staticMissions = [
// [mod (Epoch, Exile), map (Altis, Tanoa etc), mission center, eg [10445,2014,0], filename.sqf (name of static mission template for that mission)];
["Epoch","Altis","staticMissionExample2_Epoch.sqf"],
["Exile","Altis","staticMissionExample2_Exile.sqf"]
//["Epoch","Altis","staticMissionExample2_Epoch.sqf"],
//["Exile","Altis","staticMissionExample2_Exile.sqf"]
];
//diag_log "[blckeagls] GMS_StaticMissions_Lists.sqf <Loaded>";

View File

@ -20,6 +20,7 @@
private["_mod","_map","_missionMod","_missionMap","_missionLocation","_missionDataFile"];
blck_sm_monitoring = 0;
blck_sm_groupDespawnTime = 30;
blck_sm_patrolRespawnInterval = 30;
_map = toLower worldName;
{
if ((_map) isEqualTo toLower(_x select 1)) then

View File

@ -87,7 +87,7 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Red; // Modified as needed; can be a num
// Note that this value is ignored if you define static weapon positions and types in the array below.
_missionEmplacedWeapons = [
//["B_G_Mortar_01_F",[22867.3,16809.1,3.17968],"red",0,0],
///["B_HMG_01_high_F",[22944.3,16820.5,3.14243],"green",0,0]
//["B_HMG_01_high_F",[22825.3,16923.5,3.14243],"blue",0,0]
]; // example [ ["emplacedClassName",[px, py, pz] /* position to spawn weapon */, difficulty /* difficulty of AI manning weapon (blue, red etc)] ];
// can be used to define the precise placement of static weapons [[1,2,3] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
// If the number of possible locations exceeds the number of emplaced weapons specified above then only some of the locations in the array will have emplaced weapons spawned.
@ -105,14 +105,14 @@ _aiGroupParameters = [
//[[22832.9,16805.6,4.59315],"red",4, 75,900],
//[[22909.8,16778.6,3.19144],"red",4, 75,900],
//[[22809.4,16929.5,5.33892],"blue",1, 75,0],
//[[22819.4,16929.5,5.33892],"red",1, 75, 90]
//[[22819.4,16929.5,5.33892],"red",1, 75, 0]
];
_noVehiclePatrols = blck_SpawnVeh_Red; // Modified as needed; can be a numberic value (e.g. 3) or range presented as [2,4];
// Note that this value is ignored if you define vehicle patrols in the array below.
_vehiclePatrolParameters = [
//["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"green",600,0],
//["B_G_Offroad_01_armed_F",[22809.5,16699.2,8.78706],"orange",600,60]
//["B_G_Offroad_01_armed_F",[22809.5,16699.2,8.78706],"blue",600,0]
]; //[ ["vehicleClassName",[px,py,pz] /* center of patrol area */, difficulty /* blue, red etc*/, patrol radius] ]
// When this array is empty, vehicle patrols will be scattered randomely around the mission.
// Allows you to define the location of the center of the patrol, vehicle type spawned, radius to patrol, and AI difficulty (blue, red, green etc).
@ -122,7 +122,7 @@ _noAirPatrols = blck_noPatrolHelisRed; // You can use one of the pre-defined val
// Note: this value is ignored if you specify air patrols in the array below.
_airPatrols = [
//["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,900]//,
[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"green",1000,0]
//[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"blue",1000,60]
];
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines; // Set to false if you have vehicles patrolling nearby.

View File

@ -16,8 +16,8 @@ private ["_staticMissions"];
_staticMissions = [
// [mod (Epoch, Exile), map (Altis, Tanoa etc), mission center, eg [10445,2014,0], filename.sqf (name of static mission template for that mission)];
//["Epoch","Altis","staticMissionExample2_Epoch.sqf"],
//["Exile","Altis","staticMissionExample2_Exile.sqf"]
["Epoch","Altis","staticMissionExample2_Epoch.sqf"],
["Exile","Altis","staticMissionExample2_Exile.sqf"]
];
//diag_log "[blckeagls] GMS_UMS_StaticMissions_Lists.sqf <Loaded>";

View File

@ -31,30 +31,29 @@ _blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow
[_missionLandscape] call blck_fnc_sm_spawnObjects;
//diag_log format["_fnc_sm_initializeUMSStaticMission: count _airPatrols = %1 | _airPatrols = %2", count _airPatrols, _airPatrols];
{
//diag_log format["_fnc_sm_initializeUMSStaticMission: initialize _airPatrols: _x = %1",_x];
[_x] call blck_fnc_sm_AddAircraft;
[blck_sm_Aircraft,_x] call blck_fnc_sm_AddGroupToArray;
}forEach _airPatrols;
//uiSleep 1;
{
[_x] call blck_fnc_sm_AddGroup;
[blck_sm_Infantry,_x] call blck_fnc_sm_AddGroupToArray;
}forEach _aiGroupParameters;
{
[_x] call blck_fnc_sm_AddScubaGroup;
[blck_sm_scubaGroups,_x] call blck_fnc_sm_AddGroupToArray;
}forEach _aiScubaGroupParameters;
{
[_x] call blck_fnc_sm_AddEmplaced;
[blck_sm_Emplaced,_x] call blck_fnc_sm_AddGroupToArray;
}forEach _missionEmplacedWeapons;
{
[_x] call blck_fnc_sm_AddSurfaceVehicle;
[blck_sm_surfaceShips,_x] call blck_fnc_sm_AddGroupToArray;
}forEach _vehiclePatrolParameters;
{
[_x] call blck_fnc_sm_AddSDVVehicle;
[blck_sm_submarines,_x] call blck_fnc_sm_AddGroupToArray;
} forEach _submarinePatrolParameters;
//uiSleep 30;
// spawn loot chests

View File

@ -348,7 +348,7 @@ if (_noChoppers > 0) then
if (random(1) < _chanceHeliPatrol) then
{
//_temp = [_coords,_missionHelis,spawnHeli,_aiDifficultyLevel,_chancePara,_noPara,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionReinforcements;
_temp = [_coords,_aiDifficultyLevel,_missionHelis,_uniforms,_headGear,_vests,_backpacks,"none",_weaponList, _sideArms] call blck_fnc_spawnMissionHeli;
_temp = [_coords,_aiDifficultyLevel,_missionHelis] call blck_fnc_spawnMissionHeli;
if (typeName _temp isEqualTo "ARRAY") then
{

View File

@ -82,7 +82,7 @@ _missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output her
_missionLootVehicles = [ // Paste appropriate lines from the output of M3EDEN Editor here and add the loot crate type and loot counts at the end of each entry as shown in the example below.
// Many vehicles have less inventory capacity than crates so you may have to modify _lootcounts to avoid having stuff spawned all over the ground.
//["Exile_Car_Van_Box_Guerilla02",[22896.8,16790.1,3.18987],[[0,1,0],[0,0,1]],[true,false], _crateLoot, [[1,2],[4,6],[2,6],[5,8],6,1]],
["B_T_Boat_Transport_01_F",[22570.1,15235.3,-4.49949],[[0,1,0],[0,0,1]],[true,false],_crateLoot, _lootCounts]
//["B_T_Boat_Transport_01_F",[22570.1,15235.3,-4.49949],[[0,1,0],[0,0,1]],[true,false],_crateLoot, _lootCounts]
]; // [ ["vehicleClassName", [px, py, pz] /* possition at which to spawn*/, _loot /* pointer to array of loot (see below)];
// When blank nothing is spawned.
// You can use the same format used for _missionLootBoxes to add vehicles with/without loot.
@ -110,21 +110,21 @@ _aiGroupParameters = [
_aiScubaGroupParameters = [
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/]
//[[22584.9,15304.8,-4.27578],"red",4, 75,0],
[[22613.5,15269.1,-4.28332],"red",3, 75,900],
[[22549,15288.9,0],"red",3, 75,900]
//[[22613.5,15269.1,-4.28332],"red",3, 75,900],
//[[22549,15288.9,0],"red",1, 75,0]
];
_noVehiclePatrols = blck_SpawnVeh_Red; // Modified as needed; can be a numberic value (e.g. 3) or range presented as [2,4];
// Note that this value is ignored if you define vehicle patrols in the array below.
_vehiclePatrolParameters = [
//["B_T_Boat_Transport_01_F",[22570.1,15235.3,-4.49949],"red",4, 75,60],
//["B_T_Boat_Armed_01_minigun_F",[22578.6,15273.3,-0.0354593],"red",3, 75,0]
//["B_T_Boat_Transport_01_F",[22570.1,15235.3,-4.49949],"red",75,60],
//["B_T_Boat_Armed_01_minigun_F",[22578.6,15273.3,-0.0354593],"red",75,0]
]; //[ ["vehicleClassName",[px,py,pz] /* center of patrol area */, difficulty /* blue, red etc*/, patrol radius] ]
// When this array is empty, vehicle patrols will be scattered randomely around the mission.
// Allows you to define the location of the center of the patrol, vehicle type spawned, radius to patrol, and AI difficulty (blue, red, green etc).
_submarinePatrolParameters = [
//["B_SDV_01_F",[22584.9,15304.8,-1],"red",4, 75,0],
//["B_SDV_01_F",[22609.9,15299.8,-1],"red",3, 75,0]
//["B_SDV_01_F",[22584.9,15304.8,-1],"red",75,0],
["B_SDV_01_F",[22609.9,15299.8,-1],"red",75,0]
];
_aircraftTypes = blck_patrolHelisRed; // You can use one of the pre-defined lists in blck_configs or your own custom array.
@ -140,4 +140,4 @@ _useMines = false; // Set to false if you have vehicles patrolling nearby.
#include "\q\addons\custom_server\Missions\UMS\code\GMS_fnc_sm_initializeUMSStaticMission.sqf";
diag_log format["[blckeagls static missions] COMPLETED initializing middions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty];
diag_log format["[blckeagls static missions] COMPLETED initializing misions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty];

View File

@ -8,10 +8,19 @@ Ideas or code from that by Vampire and KiloSwiss have been used for certain func
Significant Changes:
=====================
Version 1.82 Build 136
6.83
Added Option to load weapons, pistols, uniforms, headgear, vests and backpacks from CfgPricing or the Arsenal Pricing and exclude items above a certain price
Add details on configs for enabeling this and setting the maximum price
NOTE: this function overides any loadouts you specify in blck_config.sqf etc.
Added: configs for blue, red, green and orange pistol, vest, backpack and uniforms
Changed:
Added functions to despawn static patrols invehicles on on foot when no players are nearby. This tracks the number of infantry alive in a group and respawns only the number alive when the group was despawned.
Added: Static units will now be spawned with gear specific to difficulty level (blue, red, green, orange) as specified in blck_config.sqf etc.
Version 1.82 Build 134
Added: configs for blue, red, green and orange pistol, vest, backpack and uniforms (with thanks to Grahame for suggesting this change and doing most of the coding)
Changes:
Commented out all configs in missions for uniforms, headgear, backpacks and uniforms.
Commented out most configs for helis, paratroops and supplemental loot dropped by paratroops.
Removed some logging that is not required.