Version 6.84 Build 144

Final Build for Version 6.84.
This commit is contained in:
Ghostrider-GRG- 2018-06-22 17:30:03 -04:00
parent 9fbc888a5b
commit 6b67ce4ae1
83 changed files with 679 additions and 6476 deletions

View File

@ -0,0 +1,13 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "sqflint",
"request": "launch",
"name": "Watch RPT File"
}
]
}

View File

@ -1,130 +0,0 @@
// self explanatory. Checks to see if the position is in either a black listed location or near a player spawn.
// As written this relies on BIS_fnc_findSafePos to ensure that the spawn point is not on water or an excessively steep slope.
//
/*
for ghostridergaming
By Ghostrider [GRG]
Copyright 2016
Last Modified 1-22-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";
private["_findNew","_tries","_coords","_dist","_xpos","_ypos","_newPos","_townPos","_pole","_oldPos","_ignore"];
_findNew = true;
_tries = 0;
while {_findNew} do {
_findNew = false;
//[_centerForSearch,_minDistFromCenter,_maxDistanceFromCenter,_minDistanceFromNearestObj,_waterMode,_maxTerainGradient,_shoreMode] call BIS_fnc_findSafePos
// https://community.bistudio.com/wiki/BIS_fnc_findSafePos
_coords = [blck_mapCenter,0,blck_mapRange,30,0,5,0] call BIS_fnc_findSafePos;
//diag_log format["<<--->> _coords = %1",_coords];
{
if ((_x distance2D _coords) < blck_MinDistanceFromMission) then {
_findNew = true;
};
}forEach blck_heliCrashSites;
{
if ( ((_x select 0) distance2D _coords) < (_x select 1)) exitWith
{
_findNew = true;
};
} forEach blck_locationBlackList;
//diag_log format["#- findSafePosn -# blck_ActiveMissionCoords isEqualTo %1", blck_ActiveMissionCoords];
{
//diag_log format["#- findSafePosn -# blck_ActiveMissionCoords active mission item is %1", _x];
if ( (_x distance2D _coords) < blck_MinDistanceFromMission) exitWith
{
_FindNew = true;
};
} forEach blck_ActiveMissionCoords;
//diag_log format["#- findSafePosn -# blck_recentMissionCoords isEqualTo %1", blck_recentMissionCoords];
{
_ignore = false;
//diag_log format["-# findSafePosn.sqf -# Old Mission element is %1", _x];
if (diag_tickTime > ((_x select 1) + 1200)) then // if the prior mission was completed more than 20 min ago then delete it from the list and ignore the check for this location.
{
_ignore = true;
blck_recentMissionCoords= blck_recentMissionCoords - _x;
//diag_log format["-# findSafePosn.sqf -# Removing Old Mission element: %1", _x];
};
if !(_ignore) then
{
//diag_log format["-# findSafePosn.sqf -# testing _coords against Old Mission coords is %1", _x select 0];
if ( ((_x select 0) distance2D _coords) < blck_MinDistanceFromMission) then
{
_findNew = true;
//diag_log format["-# findSafePosn.sqf -# Too Close to Old Mission element: %1", _x];
};
};
} forEach blck_recentMissionCoords;
// test for water nearby
_dist = 100;
for [{_i=0}, {_i<360}, {_i=_i+20}] do
{
_xpos = (_coords select 0) + sin (_i) * _dist;
_ypos = (_coords select 1) + cos (_i) * _dist;
_newPos = [_xpos,_ypos,0];
if (surfaceIsWater _newPos) then
{
_findNew = true;
_i = 361;
};
};
// check that missions spawn at least 1 kkm from towns
{
_townPos = [((locationPosition _x) select 0), ((locationPosition _x) select 1), 0];
if (_townPos distance2D _coords < blck_minDistanceFromTowns) exitWith {
_findNew = true;
};
} forEach blck_townLocations;
// check for nearby plot pole/freq jammer within 800 meters
_mod = call blck_fnc_getModType;
_pole = "";
if (_mod isEqualTo "Epoch") then {_pole = "PlotPole_EPOCH"};
if (_mod isEqualTo "Exile") then {_pole = "Exile_Construction_Flag_Static"};
//diag_log format["_fnc_findSafePosn:: -- >> _mod = %1 and _pole = %2",_mod,_pole];
{
if ((_x distance2D _coords) < blck_minDistanceToBases) then
{
_findNew = true;
};
}forEach nearestObjects[blck_mapCenter, [_pole], blck_minDistanceToBases];
// check to be sure we do not spawn a mission on top of a player.
{
if (isPlayer _x && (_x distance2D _coords) < blck_minDistanceToPlayer) then
{
_findNew = true;
};
}forEach playableUnits;
if (toLower(worldName) isEqualTo "taviana") then
{
_tavTest = createVehicle ["SmokeShell",_coords,[], 0, "CAN_COLLIDE"];
_tavHeight = (getPosASL _tavTest) select 2;
deleteVehicle _tavTest;
if (_tavHeight > 100) then {_FindNew = true;};
};
_tries = _tries + 1;
};
if ((count _coords) > 2) then
{
private["_temp"];
_temp = [_coords select 0, _coords select 1];
_coords = _temp;
};
_coords;

View File

@ -1,107 +0,0 @@
/*
blck_fnc_spawnGroup
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/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
private["_numbertospawn","_groupSpawned","_safepos","_useLauncher","_launcherType"];
// _newGroup = [_groupSpawnPos,_minAI,_maxAI,_skillLevel,_coords,_minPatrolRadius,_maxPatrolRadius,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,true,_isScubaGroup]
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] ];
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
{
private _params = ["_pos","_center","_numai1","_numai2","_skillLevel","_minDis","_maxDist","_configureWaypoints","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms","_scuba"];
{
diag_log format["_fnc_spawnGroup: param %1 | value %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex,_forEachIndex];
}forEach _this;
};
#endif
//Spawns correct number of AI
if (_numai2 > _numai1) then
{
_numbertospawn = floor( (random (_numai2 - _numai1) + _numai1 ) );
} else {
_numbertospawn = _numai2;
};
#ifdef blck_debugMode
if (blck_debugLevel >= 1) then
{
diag_log format["spawnGroup.sqf: _numbertospawn = %1",_numbertospawn];
};
#endif
//_groupSpawned = createGroup [blck_AI_Side, true]; // true here causes any empty group to be automatically deleted within 1 sec or so. https://community.bistudio.com/wiki/createGroup
_groupSpawned = call blck_fnc_create_AI_Group;
#ifdef blck_debugMode
if (blck_debugLevel >= 1) then
{
diag_log format["spawnGroup.sqf: _groupSpawned = %1",_groupSpawned];
};
#endif
if !(isNull _groupSpawned) then
{
//diag_log format["spawnGroup:: group is %1",_groupSpawned];
_useLauncher = blck_useLaunchers;
if (_weaponList isEqualTo []) then
{
_weaponList = [_skillLevel] call blck_fnc_selectAILoadout;
};
//Spawns the correct number of AI Groups, each with the correct number of units
//Counter variable
_i = 0;
while {_i < _numbertospawn} do {
_i = _i + 1;
if (blck_useLaunchers && _i <= blck_launchersPerGroup) then
{
_launcherType = selectRandom blck_launcherTypes;
} else {
_launcherType = "none";
};
//Finds a safe positon to spawn the AI in the area given
//_safepos = [_pos,0,30,2,0,20,0] call BIS_fnc_findSafePos;
//Spawns the AI unit
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["spawnGroup:: spawning unit #%1",_i];
};
#endif
//params["_pos","_aiGroup",_skillLevel,_uniforms, _headGear,_vests,_backpacks,_Launcher,_weaponList,_sideArms,_scuba];
[_pos,_groupSpawned,_skillLevel,_uniforms,_headGear,_vests,_backpacks,_launcherType, _weaponList, _sideArms, _scuba] call blck_fnc_spawnUnit;
};
_groupSpawned selectLeader (units _groupSpawned select 0);
// params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]];
if (_configureWaypoints) then
{
if (_scuba) then {_infantryType = "scuba"} else {_infantryType = "infantry"};
[_pos,_minDist,_maxDist,_groupSpawned,"random","SAD","infantry"] spawn blck_fnc_setupWaypoints;
};
//[_pos,_minDist,_maxDist,_groupSpawned,"random","SENTRY"] spawn blck_fnc_setupWaypoints;
//diag_log format["_fnc_spawnGroup: blck_fnc_setupWaypoints called for group %1",_groupSpawned];
#ifdef blck_debugMode
if (blck_debugLevel >= 1) then
{
diag_log format["fnc_spawnGroup:: Group spawned was %1 with units of %2",_groupSpawned, units _groupSpawned];
};
#endif
} else
{
diag_log "_fnc_spawnGroup:: ERROR CONDITION : NULL GROUP CREATED";
};
_groupSpawned

View File

@ -14,7 +14,13 @@
private["_numbertospawn","_groupSpawned","_safepos","_useLauncher","_launcherType"];
// _newGroup = [_groupSpawnPos,_minAI,_maxAI,_skillLevel,_coords,_minPatrolRadius,_maxPatrolRadius,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,true,_isScubaGroup]
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["_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",20], ["_maxDist",35],["_configureWaypoints",true], ["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_scuba",false]];
if (_weaponList isEqualTo []) then {_weaponList = [_skillLevel] call blck_fnc_selectAILoadout};
if (_sideArms isEqualTo []) then {_sideArms = [_skillLevel] call blck_fnc_selectAISidearms};
if (_uniforms isEqualTo []) then {_uniforms = [_skillLevel] call blck_fnc_selectAIUniforms};
if (_headGear isEqualTo []) then {_headGear = [_skillLevel] call blck_fnc_selectAIHeadgear};
if (_vests isEqualTo []) then {_vests = [_skillLevel] call blck_fnc_selectAIVests};
if (_backpacks isEqualTo []) then {_backpacks = [_skillLevel] call blck_fnc_selectAIBackpacks};
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then

View File

@ -1,43 +0,0 @@
/*
Dynamic Loot Crate Spaw System for Exile Mod for Arma 3
by
Ghostrider [GRG]
for ghostridergaming
4-6-16
Spawn a crate on land or in the air
--------------------------
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["_crate","_light","_beacon","_start","_maxHeight","_bbr","_p1","_p2"];
params["_crate"];
//_crate = _this select 0;
_start = diag_tickTime;
// If night, attach a chemlight
_signal = "SmokeShellOrange";
if (sunOrMoon < 0.2) then
{
_signal = "FlareYellow_F";
};
_bbr = boundingBoxReal _crate;
_p1 = _bbr select 0;
_p2 = _bbr select 1;
_maxHeight = abs ((_p2 select 2) - (_p1 select 2));
while {(diag_tickTime - _start) < 3*60} do
{
_beacon = _signal createVehicle getPosATL _crate;
_beacon setPos (getPos _crate);
_beacon attachTo [_crate,[0,0,(_maxHeight + 0.05)]];
uiSleep 30;
deleteVehicle _beacon;
};
true

View File

@ -1,28 +0,0 @@
// removes mines in a region centered around a specific position.
/*
[_missionAIGroups] call blck_fnc_missionAIareDead; // _missionAIGroups is an array of groups.
for ghostridergaming
By Ghostrider [GRG]
Copyright 2016
Last Modified 3-13-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 ["_missionAIGroups"];
private["_allAIDead","_group"];
_allAIDead = true;
{
_group = _x; // done for coding clarity only - actually less efficient this way
if ( {alive _x) count (units _group) > 0 ) exitWith {_allAIDead = false};
} forEach _missionAIGroups;
_allAIDead;

View File

@ -1,658 +0,0 @@
/*
Dynamic Mission Spawner (over-ground missions)
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/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#define delayTime 1
private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_assetKilledMsg","_enemyLeaderConfig",
"_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups","_loadCratesTiming","_spawnCratesTiming","_assetSpawned","_hostageConfig",
"_chanceHeliPatrol","_noPara","_chanceLoot","_heliCrew","_loadCratesTiming","_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius",
"_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_noChoppers","_chancePara","_marker"];
params["_coords","_markerClass","_aiDifficultyLevel"];
////////
// set all variables needed for the missions
// data is pulled either from the mission description or from the _mission variable passsed as a parameter
// Deal with situations where some of these variables might not be defined as well.
////////
// _mission params["OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange];
//_markerClass = _mission select 0;
// _aiDifficultyLevel = _mission select 1;
[_markerClass, "active",_coords] call blck_fnc_updateMissionQue;
blck_ActiveMissionCoords pushback _coords;
blck_missionsRunning = blck_missionsRunning + 1;
diag_log format["[blckeagls] missionSpawner (17):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
if (isNil "_assetKilledMsg") then {_assetKilledMsg = ""};
if (isNil "_markerColor") then {_markerColor = "ColorBlack"};
if (isNil "_markerType") then {_markerType = ["mil_box",[]]};
//if (isNil "_timeOut") then {_timeOut = -1;};
if (isNil "_endCondition") then {_endCondition = blck_missionEndCondition}; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"};
if (isNil "_spawnCratesTiming") then {_spawnCratesTiming = blck_spawnCratesTiming}; // Choices: "atMissionSpawnGround","atMissionStartAir","atMissionEndGround","atMissionEndAir".
if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn";
if (isNil "_missionPatrolVehicles") then {_missionPatrolVehicles = []};
if (isNil "_missionGroups") then {_missionGroups = []};
if (isNil "_hostageConfig") then {_hostageConfig = []};
if (isNil "_enemyLeaderConfig") then {_enemyLeaderConfig = []};
if (isNil "_useMines") then {_useMines = blck_useMines;};
if (isNil "_weaponList") then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (isNil "_sideArms") then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms};
if (isNil "_uniforms") then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
if (isNil "_headGear") then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear};
if (isNil "_vests") then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests};
if (isNil "_backpacks") then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
if (isNil "_chanceHeliPatrol") then
{
switch (toLower(_aiDifficultyLevel)) do
{
case "blue": {_chanceHeliPatrol = blck_chanceHeliPatrolBlue};
case "red": {_chanceHeliPatrol = blck_chanceHeliPatrolRed};
case "green": {_chanceHeliPatrol = blck_chanceHeliPatrolGreen};
case "orange": {_chanceHeliPatrol = blck_chanceHeliPatrolOrange};
default {_chanceHeliPatrol = 0};
};
};
if (isNil "_noChoppers") then
{
switch (toLower(_aiDifficultyLevel)) do
{
case "blue": {_noChoppers = blck_noPatrolHelisBlue};
case "red": {_noChoppers = blck_noPatrolHelisRed};
case "green": {_noChoppers = blck_noPatrolHelisGreen};
case "orange": {_noChoppers = blck_noPatrolHelisOrange};
default {_noChoppers = 0};
};
};
if (isNil "_chancePara") then
{
switch (toLower (_aiDifficultyLevel)) do
{
case "blue": {_chancePara = blck_chanceParaBlue};
case "red": {_chancePara = blck_chanceParaRed};
case "green": {_chancePara = blck_chanceParaGreen};
case "orange": {_chancePara = blck_chanceParaOrange};
default {_chancePara = 0};
};
};
if (isNil "_missionHelis") then
{
switch (toLower (_aiDifficultyLevel)) do
{
case "blue": {_missionHelis = blck_patrolHelisBlue};
case "red": {_missionHelis = blck_patrolHelisRed};
case "green": {_missionHelis = blck_patrolHelisGreen};
case "orange": {_missionHelis = blck_patrolHelisOrange};
default {_missionHelis = blck_patrolHelisBlue};
};
};
if (isNil "_noPara") then
{
switch (toLower (_aiDifficultyLevel)) do
{
case "blue": {_noPara = blck_noParaBlue};
case "red": {_noPara = blck_noParaRed};
case "green": {_noPara = blck_noParaGreen};
case "orange": {_noPara = blck_noParaOrange};
default {_noPara = 0};
};
};
if (isNil "_chanceLoot") then {_chanceLoot = 1.0}; //0.5};
if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;};
if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Green};
if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed};
_objects = [];
_mines = [];
_crates = [];
_aiGroup = [];
_missionAIVehicles = [];
_blck_AllMissionAI = [];
_AI_Vehicles = [];
_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType];
#define delayTime 1
//_groupPatrolRadius = 50;
#ifdef blck_debugMode
diag_log "_missionSpawner: All variables initialized";
#endif
if (blck_labelMapMarkers select 0) then
{
//diag_log "labeling map markers *****";
_blck_localMissionMarker set [2, _markerMissionName];
};
if !(blck_preciseMapMarkers) then
{
//diag_log "Map marker will be OFFSET from the mission position";
_blck_localMissionMarker set [1,[_coords,75] call blck_fnc_randomPosition];
};
_blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow labeled with the mission name?
[["start",_startMsg,_markerMissionName]] call blck_fnc_messageplayers;
_marker = [_blck_localMissionMarker] call blck_fnc_spawnMarker;
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (145) message players and spawn a mission marker";};
if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (146) _marker = %1",_marker];};
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (147) waiting for player to trigger the mission";};
#endif
////////
// All parameters are defined, lets wait until a player is nearby or the mission has timed out
////////
_missionStartTime = diag_tickTime;
_playerInRange = false;
_missionTimedOut = false;
_wait = true;
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {
diag_log "missionSpawner:: (90) starting mission trigger loop"};
diag_log format["missionSpawner (163) blck_MissionTimeout = %1", blck_MissionTimeout];
#endif
while {_wait} do
{
#ifdef blck_debugMode
//diag_log "missionSpawner:: top of mission trigger loop";
if (blck_debugLevel > 2) exitWith {_playerInRange = true;diag_log "_fnc_missionSpawner (168): player trigger loop triggered by scripting";};
#endif
if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;};
if ([_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;};
uiSleep 5;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["missionSpawner:: Trigger Loop - blck_debugLevel = %1 and _coords = %2",blck_debugLevel, _coords];
diag_log format["missionSpawner:: Trigger Loop - players in range = %1",{isPlayer _x && _x distance2D _coords < blck_TriggerDistance} count allPlayers];
diag_log format["missionSpawner:: Trigger Loop - timeout = %1", [_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut];
};
#endif
};
if (_missionTimedOut) exitWith
{
diag_log format["_fnc_missionSpawner (187): mission timed out"];
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
};
////////
// Spawn the mission objects, loot chest, and AI
////////
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (200) -- >> Mission tripped: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate
{
_temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates;
if (typeName _temp isEqualTo "ARRAY") then
{
_objects append _temp;
};
};
uiSleep delayTime;
if (_useMines) then
{
_mines = [_coords] call blck_fnc_spawnMines;
};
uiSleep delayTime;
_temp = [];
if (_missionLandscapeMode isEqualTo "random") then
{
_temp = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape;
} else {
params["_center","_objects"];
_temp = [_coords, _missionLandscape] call blck_fnc_spawnCompositionObjects;
};
if (typeName _temp isEqualTo "ARRAY") then
{
_objects append _temp;
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (237) Landscape spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
uiSleep delayTime;;
_temp = [_coords,_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles;
//uisleep 1;
_crates append _temp;
uiSleep delayTime;
_abort = false;
_temp = [[],[],false];
// params["_coords",_minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests",_backpacks,_weapons,sideArms,_isScubaGroup];
#ifdef blck_debugMode
private _params = [_coords,_minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms];
{
diag_log format["_fnc_missionSpawner: _param %1 label %2 = %3",_forEachIndex, _x, _params select _forEachIndex];
}forEach ["_coords","_minNoAI","_maxNoAI","_missionGroups","_aiDifficultyLevel","_uniforms","_headgear","_vests","_backpacks","_weaponList","_sideArms"];
#endif
_temp = [_coords, _minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionAI;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {
diag_log format["missionSpawner :: (264) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1;
};
_abort = _temp select 1;
if (blck_debugLevel > 2) then {
diag_log format["missionSpawner :: (269) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1;
};
#endif
if (_abort) exitWith
{
if (blck_debugLevel > 1) then {
diag_log "missionSpawner:: (277) grpNull returned, mission termination criteria met, calling blck_fnc_endMission"
};
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
};
if !(_abort) then
{
_blck_AllMissionAI append (_temp select 0);
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (288) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
_assetSpawned = objNull;
if !(_hostageConfig isEqualTo []) then
{
_assetSpawned = [_coords,_hostageConfig] call blck_fnc_spawnHostage;
//diag_log format["_fnc_missionSpawner: _assetSpawned = %1",_assetSpawned];
_blck_AllMissionAI pushBack _assetSpawned;
};
if !(_enemyLeaderConfig isEqualTo []) then
{
_assetSpawned = [_coords,_enemyLeaderConfig] call blck_fnc_spawnLeader;
//diag_log format["_fnc_missionSpawner: _assetSpawned = %1",_assetSpawned];
_blck_AllMissionAI pushBack _assetSpawned;
};
#ifdef blck_debugMode
if (blck_debugLevel >= 1) then {
diag_log format["_fnc_missionSpawner: _assetSpawned = %1",_assetSpawned];
};
#endif
uiSleep delayTime;
_temp = [[],[],false];
_abort = false;
_vehToSpawn = [_noVehiclePatrols] call blck_fnc_getNumberFromRange;
if (blck_useVehiclePatrols && ((_vehToSpawn > 0) || count _missionPatrolVehicles > 0)) then
{
#define useRelativePos true
//params[_coords,_noVehiclePatrols,_aiDifficultyLevel,_missionPatrolVehicles,_useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms, _isScubaGroup];
//_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_missionPatrolVehicles] call blck_fnc_spawnMissionVehiclePatrols;
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_missionPatrolVehicles,useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionVehiclePatrols;
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
};
if !(_abort) then
{
_patrolVehicles = _temp select 0;
_blck_AllMissionAI append (_temp select 1);
};
};
if (_abort) exitWith
{
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
};
uiSleep delayTime;
_temp = [[],[],false];
_abort = false;
// Deal with helicopter patrols
_temp = [];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["[blckeagls] missionSpawner:: (351) calling in heli patrol: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
_noChoppers = [_noChoppers] call blck_fnc_getNumberFromRange;
//_noPara = [_noPara] call blck_fnc_getNumberFromRange;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["_missionSpawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara]};
#endif
if (_noChoppers > 0) then
{
for "_i" from 1 to (_noChoppers) do
{
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;
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
blck_monitoredVehicles pushBack (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
};
if (_abort) then
{
_objects pushback (_temp select 0);
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
};
};
};
};
//////////////////////////
// Spawn Crates and Emplaced Weapons Last to try to force them to correct positions relative to spawned buildinga or other objects.
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (389) preparing to spawn emplaced weapons for _coords %4 | _markerClass %3 | blck_useStatic = %1 | _noEmplacedWeapons = %2",blck_useStatic,_noEmplacedWeapons,_markerClass,_coords];};
#endif
uiSleep 15;
private["_noEmplacedToSpawn"];
_noEmplacedToSpawn = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange;
//diag_log format["_fnc_missionSpawner: -> _noEmplacedToSpawn = %1 | blck_useStatic = %2",_noEmplacedToSpawn,blck_useStatic];
if (blck_useStatic && (_noEmplacedToSpawn > 0)) then
{
// _params = ["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms"];
// _temp = [_missionEmplacedWeapons,_noEmplacedToSpawn,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
_temp = [_coords,_missionEmplacedWeapons,useRelativePos,_noEmplacedToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray;
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
};
if !(_abort) then
{
_objects append (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
};
};
if (_abort) exitWith
{
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
};
uiSleep delayTime;
if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then
{
if (count _missionLootBoxes > 0) then
{
_crates = [_coords,_missionLootBoxes,_loadCratesTiming, _spawnCratesTiming, "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
}
else
{
_crates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming, _spawnCratesTiming, "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
};
if (blck_cleanUpLootChests) then
{
_objects append _crates;
};
};
if (_noPara > 0 && (random(1) < _chancePara) && _paraTriggerDistance == 0) then
{
diag_log format["_fnc_missionSpawner (436): spawning %1 paraunits at mission spawn",_noPara];
private _paratroops = [_coords,_noPara,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnParaUnits;
if !(isNull _paratroops) then
{
_blck_AllMissionAI append (units _paratroops);
};
if (random(1) < _chanceLoot) then
{
diag_log format["_fnc_missionSpawner (446): spawning supplemental loot with _chanceLoot = %1",_chanceLoot];
private _extraCrates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_paraLoot,_paraLootCounts]], "atMissionSpawn","atMissionStartAir", "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
if (blck_cleanUpLootChests) then
{
_objects append _extraCrates;
};
};
};
// Define Triggers for mission end
private["_missionComplete","_endIfPlayerNear","_endIfAIKilled","_secureAsset","_crateStolen","_locations"];
_missionComplete = -1;
_startTime = diag_tickTime;
switch (_endCondition) do
{
case "playerNear": {_secureAsset = false; _endIfPlayerNear = true;_endIfAIKilled = false;};
case "allUnitsKilled": {_secureAsset = false; _endIfPlayerNear = false;_endIfAIKilled = true;};
case "allKilledOrPlayerNear": {_secureAsset = false; _endIfPlayerNear = true;_endIfAIKilled = true;};
case "assetSecured": {_secureAsset = true; _endIfPlayerNear = false; _endIfAIKilled = false;};
};
//diag_log format["_fnc_missionSpawner: _secureAsset = %1",_secureAsset];
if (blck_showCountAliveAI) then
{
if !(_marker isEqualTo "") then
{
[_marker,_markerMissionName,_blck_AllMissionAI] call blck_fnc_updateMarkerAliveCount;
blck_missionMarkers pushBack [_marker,_markerMissionName,_blck_AllMissionAI];
};
};
_crateStolen = false;
_locations = [_coords];
private _spawnPara = if (random(1) < _chancePara) then {true} else {false};
{
_locations pushback (getPos _x);
_x setVariable["crateSpawnPos", (getPos _x)];
} forEach _crates;
private["_thresholdPercentageKilled","_result","_minPercentageKilled"];
_thresholdPercentageKilled = (1-blck_killPercentage);
while {_missionComplete isEqualTo -1} do
{
#ifdef blck_debugMode
if (blck_debugLevel > 2) exitWith {uiSleep blck_triggerLoopCompleteTime;diag_log "_missionSpawner (492) scripted Mission End blck_debugLevel = 3";};
#endif
if (_endIfPlayerNear) then
{
if ([_locations,20,true] call blck_fnc_playerInRangeArray) then {_missionComplete = 1};
};
if (_endIfAIKilled) then
{
_result = [_blck_AllMissionAI,1] call blck_fnc_countAliveAI;
// _result is an array of [no alive, total spawned];
//private _noneAlive = if (_result select 0 isEqualTo 0) then {true} else {false};
//private _aiCountBelowThreshold = if ( (_result select 0)/(_result select 1) < _thresholdPercentageKilled) then {true} else {false};
//diag_log format["_fnc_missionSpawner: _noneAlive = %1 | _result = %2 | PercentageKilled = %3",_noneAlive,_result,(_result select 0)/(_result select 1)];
if ((_result select 0) < 1 || ((_result select 0)/(_result select 1)) < _thresholdPercentageKilled ) then {_missionComplete = 1};
};
if (_spawnCratesTiming isEqualTo "atMissionSpawn") then
{
{
if ({[_x] call blck_fnc_crateMoved} count _crates > 0) exitWith
{
_missionComplete = 1;
_crateStolen = true;
};
}forEach _crates;
};
if (_secureAsset) then
{
if !(alive _assetSpawned) then
{
_missionComplete = 1
} else {
//if (_assetSpawned getVariable["blck_AIState",0] > 0 && (({alive _x} count _blck_AllMissionAI) isEqualTo 1)) then {_missionComplete = 1};
_result = [_blck_AllMissionAI, 1] call blck_fnc_countAliveAI;
// _result is an array of [no alive, total spawned];
//private _noneAlive = if (_result select 0 isEqualTo 0) then {true} else {false};
//private _aiCountBelowThreshold = if ((_result select 0)/(_result select 1) < _thresholdPercentageKilled) then {true} else {false};
//diag_log format["_fnc_missionSpawner: _noneAlive = %1 | _result = %2 | PercentageKilled = %3",_noneAlive,_result,(_result select 0)/(_result select 1)];
if (((_result select 0)/(_result select 1)) < 0.18) then
{
if (_assetSpawned getVariable["blck_unguarded",0] isEqualTo 0) then {_assetSpawned setVariable["blck_unguarded",1,true]};
if ((_assetSpawned getVariable["blck_AIState",0] > 0)) then {
_missionComplete = 1:
_assetSpawned allowdamage false;
};
};
};
};
if (_spawnPara) then
{
if ([_coords,_paraTriggerDistance,true] call blck_fnc_playerInRange) then
{
_spawnPara = false; // The player gets one try to spawn these.
if (random(1) < _chancePara) then //
{
private _paratroops = [_coords,_noPara,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnParaUnits;
if !(isNull _paratroops) then
{
_blck_AllMissionAI append (units _paratroops);
};
if (random(1) < _chanceLoot) then
{
private _extraCrates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_paraLoot,_paraLootCounts]], "atMissionSpawn","atMissionStartAir", "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
if (blck_cleanUpLootChests) then
{
_objects append _extraCrates;
};
};
};
};
};
uiSleep 1;
};
if (_crateStolen) exitWith
{
diag_log format["missionSpawner:: (542) Crate Stolen Callening _fnc_endMission - > players near = %1 and ai alive = %2 and crates stolen = %3",[_locations,10,true] call blck_fnc_playerInRangeArray, {alive _x} count _blck_AllMissionAI, _crateStolen];
[_mines,_objects,_crates, _blck_AllMissionAI,"Crate Removed from Mission Site Before Mission Completion: Mission Aborted",_blck_localMissionMarker,_coords,_markerClass, 2] call blck_fnc_endMission;
};
if ((_secureAsset) && !(alive _assetSpawned)) exitWith
{
[_mines,_objects,_crates, _blck_AllMissionAI,_assetKilledMsg,_blck_localMissionMarker,_coords,_markerClass, 2] call blck_fnc_endMission;
};
if (_spawnCratesTiming in ["atMissionEndGround","atMissionEndAir"]) then
{
if (count _missionLootBoxes > 0) then
{
_crates = [_coords,_missionLootBoxes,_loadCratesTiming,_spawnCratesTiming, "end", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
}
else
{
_crates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming,_spawnCratesTiming, "end", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log format["_fnc_missionSpawner (531): _crates = %1", _crates]};
#endif
if (blck_cleanUpLootChests) then
{
_objects append _crates;
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log format["[blckeagls] missionSpawner:: (428) Crates Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]};
#endif
};
if (_spawnCratesTiming isEqualTo "atMissionSpawnGround" && _loadCratesTiming isEqualTo "atMissionCompletion") then
{
{
[_x] call blck_fnc_loadMissionCrate;
} forEach _crates;
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (586) Mission completion criteria fulfilled: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
diag_log format["missionSpawner :: (587) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled];
diag_log format["[blckeagls] missionSpawner:: (588) calling endMission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
private["_result"];
// Force passing the mission name for informational purposes.
_blck_localMissionMarker set [2, _markerMissionName];
if (blck_showCountAliveAI) then
{
_marker setMarkerText format["%1: All AI Dead",_markerMissionName];
{
if ((_x select 1) isEqualTo _markerMissionName) exitWith{blck_missionMarkers deleteAt _forEachIndex};
}forEach blck_missionMarkers;
};
//diag_log format["_fnc_missionSpawner (557) Build 123: _secureAsset = %1 | {alive _assetSpawned} = %2 | assetType = %3",_secureAsset,alive _assetSpawned, _assetSpawned getVariable["assetType",-1]];
if (_assetSpawned getVariable["assetType",0] isEqualTo 1) then
{
//diag_log "Processing Mission End for Hostage Rescue";
_assetSpawned setCaptive false;
_assetSpawned setVariable["GMSAnimations",[""],true];
[_assetSpawned,""] remoteExec["switchMove",-2];;
uiSleep 0.1;
_assetSpawned enableAI "ALL";
private _newPos = (getPos _assetSpawned) getPos [1000, random(360)];
//diag_log format["processing domove for hostage with current pos = %1 and new pos = %2",getPos _assetSpawned, _newPos];
(group _assetSpawned) setCurrentWaypoint [group _assetSpawned, 0];
[group _assetSpawned,0] setWaypointPosition [_newPos,0];
[group _assetSpawned,0] setWaypointType "MOVE";
};
if (_assetSpawned getVariable["assetType",0] isEqualTo 2) then
{
//diag_log format["Processing Mission End for Arrest of Leader %1 with endAnimation %2",_assetSpawned,_assetSpawned getVariable["endAnimation",""]];
[_assetSpawned,""] remoteExec["switchMove",-2];
_assetSpawned setVariable["GMSAnimations",_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]],true];
[_assetSpawned,selectRandom(_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]])] remoteExec["switchMove",-2];
};
//diag_log format["_fnc_missionSpawner (579) Build 123: <calling blck_fnc_endMission> _secureAsset = %1 | {alive _assetSpawned} = %2 | assetType = %3",_secureAsset,alive _assetSpawned, _assetSpawned getVariable["assetType",-1]];
_result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 0] call blck_fnc_endMission;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["[blckeagls] missionSpawner:: (507)end of mission: blck_fnc_endMission has returned control to _fnc_missionSpawner"]};
#endif
diag_log format["_fnc_missionSpawner (643) Mission Completed | _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
blck_missionsRun = blck_missionsRun + 1;
diag_log format["_fnc_missionSpawner (644): Total Dyanamic Land and UMS Run = %1", blck_missionsRun];

View File

@ -1,608 +0,0 @@
/*
Dynamic Mission Spawner (over-ground missions)
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/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#define delayTime 1
private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_assetKilledMsg","_enemyLeaderConfig",
"_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups","_loadCratesTiming","_spawnCratesTiming","_assetSpawned","_hostageConfig",
"_chanceHeliPatrol","_noPara","_chanceLoot","_heliCrew","_loadCratesTiming","_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius",
"_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_noChoppers","_chancePara","_marker"];
params["_coords","_markerClass","_aiDifficultyLevel"];
////////
// set all variables needed for the missions
// data is pulled either from the mission description or from the _mission variable passsed as a parameter
// Deal with situations where some of these variables might not be defined as well.
////////
// _mission params["OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange];
//_markerClass = _mission select 0;
// _aiDifficultyLevel = _mission select 1;
[_markerClass, "active",_coords] call blck_fnc_updateMissionQue;
blck_ActiveMissionCoords pushback _coords;
blck_missionsRunning = blck_missionsRunning + 1;
diag_log format["[blckeagls] missionSpawner (17):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
if (isNil "_assetKilledMsg") then {_assetKilledMsg = ""};
if (isNil "_markerColor") then {_markerColor = "ColorBlack"};
if (isNil "_markerType") then {_markerType = ["mil_box",[]]};
//if (isNil "_timeOut") then {_timeOut = -1;};
if (isNil "_endCondition") then {_endCondition = blck_missionEndCondition}; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"};
if (isNil "_spawnCratesTiming") then {_spawnCratesTiming = blck_spawnCratesTiming}; // Choices: "atMissionSpawnGround","atMissionStartAir","atMissionEndGround","atMissionEndAir".
if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn";
if (isNil "_missionPatrolVehicles") then {_missionPatrolVehicles = []};
if (isNil "_missionGroups") then {_missionGroups = []};
if (isNil "_hostageConfig") then {_hostageConfig = []};
if (isNil "_enemyLeaderConfig") then {_enemyLeaderConfig = []};
if (isNil "_useMines") then {_useMines = blck_useMines;};
if (isNil "_weaponList") then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (isNil "_sideArms") then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms};
if (isNil "_uniforms") then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
if (isNil "_headGear") then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear};
if (isNil "_vests") then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests};
if (isNil "_backpacks") then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = [_aiDifficultyLevel] call blck_fnc_selectChanceHeliPatrol};
if (isNil "_noChoppers") then {_noChoppers = [_aiDifficultyLevel] call blck_fnc_selectNumberAirPatrols};
if (isNil "_chancePara") then {_chancePara = [_aiDifficultyLevel] call blck_fnc_selectChanceParatroops};
if (isNil "_missionHelis") then {_missionHelis = [_aiDifficultyLevel] call blck_fnc_selectMissionHelis};
if (isNil "_noPara") then {_noPara = [_aiDifficultyLevel] call blck_fnc_selectNumberParatroops};
if (isNil "_chanceLoot") then {_chanceLoot = 1.0}; //0.5};
if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;};
if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Green}; // Add diffiiculty based settings
if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed}; // Add difficulty based settings
_objects = [];
_mines = [];
_crates = [];
_aiGroup = [];
_missionAIVehicles = [];
_blck_AllMissionAI = [];
_AI_Vehicles = [];
_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType];
#define delayTime 1
//_groupPatrolRadius = 50;
#ifdef blck_debugMode
diag_log "_missionSpawner: All variables initialized";
#endif
if (blck_labelMapMarkers select 0) then
{
//diag_log "labeling map markers *****";
_blck_localMissionMarker set [2, _markerMissionName];
};
if !(blck_preciseMapMarkers) then
{
//diag_log "Map marker will be OFFSET from the mission position";
_blck_localMissionMarker set [1,[_coords,75] call blck_fnc_randomPosition];
};
_blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow labeled with the mission name?
[["start",_startMsg,_markerMissionName]] call blck_fnc_messageplayers;
_marker = [_blck_localMissionMarker] call blck_fnc_spawnMarker;
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (145) message players and spawn a mission marker";};
if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (146) _marker = %1",_marker];};
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (147) waiting for player to trigger the mission";};
#endif
////////
// All parameters are defined, lets wait until a player is nearby or the mission has timed out
////////
_missionStartTime = diag_tickTime;
_playerInRange = false;
_missionTimedOut = false;
_wait = true;
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {
diag_log "missionSpawner:: (90) starting mission trigger loop"};
diag_log format["missionSpawner (163) blck_MissionTimeout = %1", blck_MissionTimeout];
#endif
while {_wait} do
{
#ifdef blck_debugMode
//diag_log "missionSpawner:: top of mission trigger loop";
if (blck_debugLevel > 2) exitWith {_playerInRange = true;diag_log "_fnc_missionSpawner (168): player trigger loop triggered by scripting";};
#endif
if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;};
if ([_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;};
uiSleep 5;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["missionSpawner:: Trigger Loop - blck_debugLevel = %1 and _coords = %2",blck_debugLevel, _coords];
diag_log format["missionSpawner:: Trigger Loop - players in range = %1",{isPlayer _x && _x distance2D _coords < blck_TriggerDistance} count allPlayers];
diag_log format["missionSpawner:: Trigger Loop - timeout = %1", [_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut];
};
#endif
};
if (_missionTimedOut) exitWith
{
diag_log format["_fnc_missionSpawner (187): mission timed out"];
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
};
////////
// Spawn the mission objects, loot chest, and AI
////////
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (200) -- >> Mission tripped: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate
{
_temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates;
if (typeName _temp isEqualTo "ARRAY") then
{
_objects append _temp;
};
};
uiSleep delayTime;
if (_useMines) then
{
_mines = [_coords] call blck_fnc_spawnMines;
};
uiSleep delayTime;
_temp = [];
if (_missionLandscapeMode isEqualTo "random") then
{
_temp = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape;
} else {
params["_center","_objects"];
_temp = [_coords, _missionLandscape] call blck_fnc_spawnCompositionObjects;
};
if (typeName _temp isEqualTo "ARRAY") then
{
_objects append _temp;
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (237) Landscape spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
uiSleep delayTime;;
_temp = [_coords,_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles;
//uisleep 1;
_crates append _temp;
uiSleep delayTime;
_abort = false;
_temp = [[],[],false];
// params["_coords",_minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests",_backpacks,_weapons,sideArms,_isScubaGroup];
#ifdef blck_debugMode
private _params = [_coords,_minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms];
{
diag_log format["_fnc_missionSpawner: _param %1 label %2 = %3",_forEachIndex, _x, _params select _forEachIndex];
}forEach ["_coords","_minNoAI","_maxNoAI","_missionGroups","_aiDifficultyLevel","_uniforms","_headgear","_vests","_backpacks","_weaponList","_sideArms"];
#endif
_temp = [_coords, _minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionAI;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {
diag_log format["missionSpawner :: (264) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1;
};
_abort = _temp select 1;
if (blck_debugLevel > 2) then {
diag_log format["missionSpawner :: (269) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1;
};
#endif
if (_abort) exitWith
{
if (blck_debugLevel > 1) then {
diag_log "missionSpawner:: (277) grpNull returned, mission termination criteria met, calling blck_fnc_endMission"
};
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
};
if !(_abort) then
{
_blck_AllMissionAI append (_temp select 0);
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (288) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
_assetSpawned = objNull;
if !(_hostageConfig isEqualTo []) then
{
_assetSpawned = [_coords,_hostageConfig] call blck_fnc_spawnHostage;
//diag_log format["_fnc_missionSpawner: _assetSpawned = %1",_assetSpawned];
_blck_AllMissionAI pushBack _assetSpawned;
};
if !(_enemyLeaderConfig isEqualTo []) then
{
_assetSpawned = [_coords,_enemyLeaderConfig] call blck_fnc_spawnLeader;
//diag_log format["_fnc_missionSpawner: _assetSpawned = %1",_assetSpawned];
_blck_AllMissionAI pushBack _assetSpawned;
};
#ifdef blck_debugMode
if (blck_debugLevel >= 1) then {
diag_log format["_fnc_missionSpawner: _assetSpawned = %1",_assetSpawned];
};
#endif
uiSleep delayTime;
_temp = [[],[],false];
_abort = false;
_vehToSpawn = [_noVehiclePatrols] call blck_fnc_getNumberFromRange;
if (blck_useVehiclePatrols && ((_vehToSpawn > 0) || count _missionPatrolVehicles > 0)) then
{
#define useRelativePos true
//params[_coords,_noVehiclePatrols,_aiDifficultyLevel,_missionPatrolVehicles,_useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms, _isScubaGroup];
//_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_missionPatrolVehicles] call blck_fnc_spawnMissionVehiclePatrols;
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_missionPatrolVehicles,useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionVehiclePatrols;
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
};
if !(_abort) then
{
_patrolVehicles = _temp select 0;
_blck_AllMissionAI append (_temp select 1);
};
};
if (_abort) exitWith
{
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
};
uiSleep delayTime;
_temp = [[],[],false];
_abort = false;
// Deal with helicopter patrols
_temp = [];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["[blckeagls] missionSpawner:: (351) calling in heli patrol: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
_noChoppers = [_noChoppers] call blck_fnc_getNumberFromRange;
//_noPara = [_noPara] call blck_fnc_getNumberFromRange;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["_missionSpawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara]};
#endif
if (_noChoppers > 0) then
{
for "_i" from 1 to (_noChoppers) do
{
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;
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
blck_monitoredVehicles pushBack (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
};
if (_abort) then
{
_objects pushback (_temp select 0);
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
};
};
};
};
//////////////////////////
// Spawn Crates and Emplaced Weapons Last to try to force them to correct positions relative to spawned buildinga or other objects.
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (389) preparing to spawn emplaced weapons for _coords %4 | _markerClass %3 | blck_useStatic = %1 | _noEmplacedWeapons = %2",blck_useStatic,_noEmplacedWeapons,_markerClass,_coords];};
#endif
uiSleep 15;
private["_noEmplacedToSpawn"];
_noEmplacedToSpawn = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange;
//diag_log format["_fnc_missionSpawner: -> _noEmplacedToSpawn = %1 | blck_useStatic = %2",_noEmplacedToSpawn,blck_useStatic];
if (blck_useStatic && (_noEmplacedToSpawn > 0)) then
{
// _params = ["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms"];
// _temp = [_missionEmplacedWeapons,_noEmplacedToSpawn,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
_temp = [_coords,_missionEmplacedWeapons,useRelativePos,_noEmplacedToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray;
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
};
if !(_abort) then
{
_objects append (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
};
};
if (_abort) exitWith
{
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
};
uiSleep delayTime;
if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then
{
if (count _missionLootBoxes > 0) then
{
_crates = [_coords,_missionLootBoxes,_loadCratesTiming, _spawnCratesTiming, "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
}
else
{
_crates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming, _spawnCratesTiming, "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
};
if (blck_cleanUpLootChests) then
{
_objects append _crates;
};
};
if (_noPara > 0 && (random(1) < _chancePara) && _paraTriggerDistance == 0) then
{
diag_log format["_fnc_missionSpawner (436): spawning %1 paraunits at mission spawn",_noPara];
private _paratroops = [_coords,_noPara,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnParaUnits;
if !(isNull _paratroops) then
{
_blck_AllMissionAI append (units _paratroops);
};
if (random(1) < _chanceLoot) then
{
diag_log format["_fnc_missionSpawner (446): spawning supplemental loot with _chanceLoot = %1",_chanceLoot];
private _extraCrates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_paraLoot,_paraLootCounts]], "atMissionSpawn","atMissionStartAir", "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
if (blck_cleanUpLootChests) then
{
_objects append _extraCrates;
};
};
};
// Define Triggers for mission end
private["_missionComplete","_endIfPlayerNear","_endIfAIKilled","_secureAsset","_crateStolen","_locations"];
_missionComplete = -1;
_startTime = diag_tickTime;
switch (_endCondition) do
{
case "playerNear": {_secureAsset = false; _endIfPlayerNear = true;_endIfAIKilled = false;};
case "allUnitsKilled": {_secureAsset = false; _endIfPlayerNear = false;_endIfAIKilled = true;};
case "allKilledOrPlayerNear": {_secureAsset = false; _endIfPlayerNear = true;_endIfAIKilled = true;};
case "assetSecured": {_secureAsset = true; _endIfPlayerNear = false; _endIfAIKilled = false;};
};
//diag_log format["_fnc_missionSpawner: _secureAsset = %1",_secureAsset];
if (blck_showCountAliveAI) then
{
if !(_marker isEqualTo "") then
{
[_marker,_markerMissionName,_blck_AllMissionAI] call blck_fnc_updateMarkerAliveCount;
blck_missionMarkers pushBack [_marker,_markerMissionName,_blck_AllMissionAI];
};
};
_crateStolen = false;
_locations = [_coords];
private _spawnPara = if (random(1) < _chancePara) then {true} else {false};
{
_locations pushback (getPos _x);
_x setVariable["crateSpawnPos", (getPos _x)];
} forEach _crates;
private["_thresholdPercentageKilled","_result","_minPercentageKilled"];
_thresholdPercentageKilled = (1-blck_killPercentage);
while {_missionComplete isEqualTo -1} do
{
#ifdef blck_debugMode
if (blck_debugLevel > 2) exitWith {uiSleep blck_triggerLoopCompleteTime;diag_log "_missionSpawner (492) scripted Mission End blck_debugLevel = 3";};
#endif
if (_endIfPlayerNear) then
{
if ([_locations,20,true] call blck_fnc_playerInRangeArray) then {_missionComplete = 1};
};
if (_endIfAIKilled) then
{
_result = [_blck_AllMissionAI,1] call blck_fnc_countAliveAI;
// _result is an array of [no alive, total spawned];
//private _noneAlive = if (_result select 0 isEqualTo 0) then {true} else {false};
//private _aiCountBelowThreshold = if ( (_result select 0)/(_result select 1) < _thresholdPercentageKilled) then {true} else {false};
//diag_log format["_fnc_missionSpawner: _noneAlive = %1 | _result = %2 | PercentageKilled = %3",_noneAlive,_result,(_result select 0)/(_result select 1)];
if ((_result select 0) < 1 || ((_result select 0)/(_result select 1)) < _thresholdPercentageKilled ) then {_missionComplete = 1};
};
if (_spawnCratesTiming isEqualTo "atMissionSpawn") then
{
{
if ({[_x] call blck_fnc_crateMoved} count _crates > 0) exitWith
{
_missionComplete = 1;
_crateStolen = true;
};
}forEach _crates;
};
if (_secureAsset) then
{
if !(alive _assetSpawned) then
{
_missionComplete = 1
} else {
//if (_assetSpawned getVariable["blck_AIState",0] > 0 && (({alive _x} count _blck_AllMissionAI) isEqualTo 1)) then {_missionComplete = 1};
_result = [_blck_AllMissionAI, 1] call blck_fnc_countAliveAI;
// _result is an array of [no alive, total spawned];
//private _noneAlive = if (_result select 0 isEqualTo 0) then {true} else {false};
//private _aiCountBelowThreshold = if ((_result select 0)/(_result select 1) < _thresholdPercentageKilled) then {true} else {false};
//diag_log format["_fnc_missionSpawner: _noneAlive = %1 | _result = %2 | PercentageKilled = %3",_noneAlive,_result,(_result select 0)/(_result select 1)];
if (((_result select 0)/(_result select 1)) < 0.18) then
{
if (_assetSpawned getVariable["blck_unguarded",0] isEqualTo 0) then {_assetSpawned setVariable["blck_unguarded",1,true]};
if ((_assetSpawned getVariable["blck_AIState",0] > 0)) then {
_missionComplete = 1:
_assetSpawned allowdamage false;
};
};
};
};
if (_spawnPara) then
{
if ([_coords,_paraTriggerDistance,true] call blck_fnc_playerInRange) then
{
_spawnPara = false; // The player gets one try to spawn these.
if (random(1) < _chancePara) then //
{
private _paratroops = [_coords,_noPara,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnParaUnits;
if !(isNull _paratroops) then
{
_blck_AllMissionAI append (units _paratroops);
};
if (random(1) < _chanceLoot) then
{
private _extraCrates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_paraLoot,_paraLootCounts]], "atMissionSpawn","atMissionStartAir", "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
if (blck_cleanUpLootChests) then
{
_objects append _extraCrates;
};
};
};
};
};
uiSleep 1;
};
if (_crateStolen) exitWith
{
diag_log format["missionSpawner:: (542) Crate Stolen Callening _fnc_endMission - > players near = %1 and ai alive = %2 and crates stolen = %3",[_locations,10,true] call blck_fnc_playerInRangeArray, {alive _x} count _blck_AllMissionAI, _crateStolen];
[_mines,_objects,_crates, _blck_AllMissionAI,"Crate Removed from Mission Site Before Mission Completion: Mission Aborted",_blck_localMissionMarker,_coords,_markerClass, 2] call blck_fnc_endMission;
};
if ((_secureAsset) && !(alive _assetSpawned)) exitWith
{
[_mines,_objects,_crates, _blck_AllMissionAI,_assetKilledMsg,_blck_localMissionMarker,_coords,_markerClass, 2] call blck_fnc_endMission;
};
if (_spawnCratesTiming in ["atMissionEndGround","atMissionEndAir"]) then
{
if (count _missionLootBoxes > 0) then
{
_crates = [_coords,_missionLootBoxes,_loadCratesTiming,_spawnCratesTiming, "end", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
}
else
{
_crates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming,_spawnCratesTiming, "end", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log format["_fnc_missionSpawner (531): _crates = %1", _crates]};
#endif
if (blck_cleanUpLootChests) then
{
_objects append _crates;
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log format["[blckeagls] missionSpawner:: (428) Crates Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]};
#endif
};
if (_spawnCratesTiming isEqualTo "atMissionSpawnGround" && _loadCratesTiming isEqualTo "atMissionCompletion") then
{
{
[_x] call blck_fnc_loadMissionCrate;
} forEach _crates;
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (586) Mission completion criteria fulfilled: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
diag_log format["missionSpawner :: (587) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled];
diag_log format["[blckeagls] missionSpawner:: (588) calling endMission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
private["_result"];
// Force passing the mission name for informational purposes.
_blck_localMissionMarker set [2, _markerMissionName];
if (blck_showCountAliveAI) then
{
_marker setMarkerText format["%1: All AI Dead",_markerMissionName];
{
if ((_x select 1) isEqualTo _markerMissionName) exitWith{blck_missionMarkers deleteAt _forEachIndex};
}forEach blck_missionMarkers;
};
//diag_log format["_fnc_missionSpawner (557) Build 123: _secureAsset = %1 | {alive _assetSpawned} = %2 | assetType = %3",_secureAsset,alive _assetSpawned, _assetSpawned getVariable["assetType",-1]];
if (_assetSpawned getVariable["assetType",0] isEqualTo 1) then
{
//diag_log "Processing Mission End for Hostage Rescue";
_assetSpawned setCaptive false;
_assetSpawned setVariable["GMSAnimations",[""],true];
[_assetSpawned,""] remoteExec["switchMove",-2];;
uiSleep 0.1;
_assetSpawned enableAI "ALL";
private _newPos = (getPos _assetSpawned) getPos [1000, random(360)];
//diag_log format["processing domove for hostage with current pos = %1 and new pos = %2",getPos _assetSpawned, _newPos];
(group _assetSpawned) setCurrentWaypoint [group _assetSpawned, 0];
[group _assetSpawned,0] setWaypointPosition [_newPos,0];
[group _assetSpawned,0] setWaypointType "MOVE";
};
if (_assetSpawned getVariable["assetType",0] isEqualTo 2) then
{
//diag_log format["Processing Mission End for Arrest of Leader %1 with endAnimation %2",_assetSpawned,_assetSpawned getVariable["endAnimation",""]];
[_assetSpawned,""] remoteExec["switchMove",-2];
_assetSpawned setVariable["GMSAnimations",_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]],true];
[_assetSpawned,selectRandom(_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]])] remoteExec["switchMove",-2];
};
//diag_log format["_fnc_missionSpawner (579) Build 123: <calling blck_fnc_endMission> _secureAsset = %1 | {alive _assetSpawned} = %2 | assetType = %3",_secureAsset,alive _assetSpawned, _assetSpawned getVariable["assetType",-1]];
_result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 0] call blck_fnc_endMission;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["[blckeagls] missionSpawner:: (507)end of mission: blck_fnc_endMission has returned control to _fnc_missionSpawner"]};
#endif
diag_log format["_fnc_missionSpawner (643) Mission Completed | _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
blck_missionsRun = blck_missionsRun + 1;
diag_log format["_fnc_missionSpawner (644): Total Dyanamic Land and UMS Run = %1", blck_missionsRun];

View File

@ -19,16 +19,6 @@ private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_mission
params["_coords","_markerClass","_aiDifficultyLevel"];
////////
// set all variables needed for the missions
// data is pulled either from the mission description or from the _mission variable passsed as a parameter
// Deal with situations where some of these variables might not be defined as well.
////////
// _mission params["OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange];
//_markerClass = _mission select 0;
// _aiDifficultyLevel = _mission select 1;
[_markerClass, "active",_coords] call blck_fnc_updateMissionQue;
blck_ActiveMissionCoords pushback _coords;
blck_missionsRunning = blck_missionsRunning + 1;
@ -47,21 +37,20 @@ if (isNil "_hostageConfig") then {_hostageConfig = []};
if (isNil "_enemyLeaderConfig") then {_enemyLeaderConfig = []};
if (isNil "_useMines") then {_useMines = blck_useMines;};
if (isNil "_weaponList") then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (isNil "_sideArms") then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms};
if (isNil "_uniforms") then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
if (isNil "_headGear") then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear};
if (isNil "_vests") then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests};
if (isNil "_backpacks") then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = [_aiDifficultyLevel] call blck_fnc_selectChanceHeliPatrol};
if (isNil "_noChoppers") then {_noChoppers = [_aiDifficultyLevel] call blck_fnc_selectNumberAirPatrols};
if (isNil "_chancePara") then {_chancePara = [_aiDifficultyLevel] call blck_fnc_selectChanceParatroops};
if (isNil "_missionHelis") then {_missionHelis = [_aiDifficultyLevel] call blck_fnc_selectMissionHelis};
if (isNil "_noPara") then {_noPara = [_aiDifficultyLevel] call blck_fnc_selectNumberParatroops};
if (isNil "_chanceLoot") then {_chanceLoot = 1.0}; //0.5};
if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;};
if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Green}; // Add diffiiculty based settings
if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed}; // Add difficulty based settings
if (isNil "_sideArms") then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms};
if (isNil "_uniforms") then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
if (isNil "_headGear") then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear};
if (isNil "_vests") then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests};
if (isNil "_backpacks") then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = [_aiDifficultyLevel] call blck_fnc_selectChanceHeliPatrol};
if (isNil "_noChoppers") then {_noChoppers = [_aiDifficultyLevel] call blck_fnc_selectNumberAirPatrols};
if (isNil "_chancePara") then {_chancePara = [_aiDifficultyLevel] call blck_fnc_selectChanceParatroops};
if (isNil "_missionHelis") then {_missionHelis = [_aiDifficultyLevel] call blck_fnc_selectMissionHelis};
if (isNil "_noPara") then {_noPara = [_aiDifficultyLevel] call blck_fnc_selectNumberParatroops};
if (isNil "_chanceLoot") then {_chanceLoot = 1.0}; //0.5};
if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;};
if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Green}; // Add diffiiculty based settings
if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed}; // Add difficulty based settings
_objects = [];
_mines = [];
@ -72,7 +61,6 @@ _blck_AllMissionAI = [];
_AI_Vehicles = [];
_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType];
#define delayTime 1
//_groupPatrolRadius = 50;
#ifdef blck_debugMode
diag_log "_missionSpawner: All variables initialized";
@ -80,12 +68,10 @@ diag_log "_missionSpawner: All variables initialized";
if (blck_labelMapMarkers select 0) then
{
//diag_log "labeling map markers *****";
_blck_localMissionMarker set [2, _markerMissionName];
};
if !(blck_preciseMapMarkers) then
{
//diag_log "Map marker will be OFFSET from the mission position";
_blck_localMissionMarker set [1,[_coords,75] call blck_fnc_randomPosition];
};
_blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow labeled with the mission name?
@ -115,7 +101,6 @@ if (blck_debugLevel > 0) then {
while {_wait} do
{
#ifdef blck_debugMode
//diag_log "missionSpawner:: top of mission trigger loop";
if (blck_debugLevel > 2) exitWith {_playerInRange = true;diag_log "_fnc_missionSpawner (168): player trigger loop triggered by scripting";};
#endif
@ -189,7 +174,6 @@ if (blck_debugLevel > 0) then
uiSleep delayTime;;
_temp = [_coords,_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles;
//uisleep 1;
_crates append _temp;
uiSleep delayTime;
@ -197,7 +181,6 @@ uiSleep delayTime;
_abort = false;
_temp = [[],[],false];
// params["_coords",_minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests",_backpacks,_weapons,sideArms,_isScubaGroup];
#ifdef blck_debugMode
private _params = [_coords,_minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms];
{
@ -240,16 +223,25 @@ if (blck_debugLevel > 0) then
_assetSpawned = objNull;
if !(_hostageConfig isEqualTo []) then
{
_assetSpawned = [_coords,_hostageConfig] call blck_fnc_spawnHostage;
_temp = [_coords,_hostageConfig] call blck_fnc_spawnHostage;
//diag_log format["_fnc_missionSpawner: _fnc_spawnHostage returned %1",_temp];
_assetSpawned = _temp select 0;
_objects pushBack (_temp select 1);
//diag_log format["_fnc_missionSpawner: _assetSpawned = %1",_assetSpawned];
//diag_log format["_fnc_missionSpawner: _fnc_spawnHostage returned object %1",_temp select 1];
_blck_AllMissionAI pushBack _assetSpawned;
};
if !(_enemyLeaderConfig isEqualTo []) then
{
_assetSpawned = [_coords,_enemyLeaderConfig] call blck_fnc_spawnLeader;
_temp = [_coords,_enemyLeaderConfig] call blck_fnc_spawnLeader;
//diag_log format["_fnc_missionSpawner: _fnc_spawnLeader return _temp = %1",_temp];
_assetSpawned = _temp select 0;
_objects pushBack (_temp select 1);
//diag_log format["_fnc_missionSpawner: _assetSpawned = %1",_assetSpawned];
//diag_log format["_fnc_missionSpawner: building spawned by _fnc_spawnLeader = %1",_temp select 1];
_blck_AllMissionAI pushBack _assetSpawned;
//diag_log format["_fnc_missionSpawner (261): _blck_AllMissionAI",_blck_AllMissionAI];
};
#ifdef blck_debugMode
@ -266,8 +258,6 @@ _vehToSpawn = [_noVehiclePatrols] call blck_fnc_getNumberFromRange;
if (blck_useVehiclePatrols && ((_vehToSpawn > 0) || count _missionPatrolVehicles > 0)) then
{
#define useRelativePos true
//params[_coords,_noVehiclePatrols,_aiDifficultyLevel,_missionPatrolVehicles,_useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms, _isScubaGroup];
//_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_missionPatrolVehicles] call blck_fnc_spawnMissionVehiclePatrols;
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_missionPatrolVehicles,useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionVehiclePatrols;
if (typeName _temp isEqualTo "ARRAY") then
@ -301,7 +291,6 @@ if (blck_debugLevel > 1) then
#endif
_noChoppers = [_noChoppers] call blck_fnc_getNumberFromRange;
//_noPara = [_noPara] call blck_fnc_getNumberFromRange;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["_missionSpawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara]};
@ -312,8 +301,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,_uniforms,_headGear,_vests,_backpacks,_weaponList, _sideArms,"none"] call blck_fnc_spawnMissionHeli;
if (typeName _temp isEqualTo "ARRAY") then
{
@ -342,8 +330,6 @@ _noEmplacedToSpawn = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange;
//diag_log format["_fnc_missionSpawner: -> _noEmplacedToSpawn = %1 | blck_useStatic = %2",_noEmplacedToSpawn,blck_useStatic];
if (blck_useStatic && (_noEmplacedToSpawn > 0)) then
{
// _params = ["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms"];
// _temp = [_missionEmplacedWeapons,_noEmplacedToSpawn,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
_temp = [_coords,_missionEmplacedWeapons,useRelativePos,_noEmplacedToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray;
if (typeName _temp isEqualTo "ARRAY") then

View File

@ -1,3 +1,15 @@
/*
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["_aiDifficultyLevel"];
private["_chancePara"];

View File

@ -1,3 +1,15 @@
/*
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["_aiDifficultyLevel"];
private["_backpacks"];

View File

@ -1,3 +1,15 @@
/*
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["_aiDifficultyLevel"];
private["_headgear"];

View File

@ -1,5 +1,18 @@
/*
by Ghostrider [GRG]
params["_aiDifficultyLevel"];
--------------------------
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["_aiDifficultyLevel"]; //[["_aiDifficultyLevel",selectRandom["Red","Green"]]];
//diag_log format["_fnc_selectAISidearms: _aiDifficultyLevel = %1",_aiDifficultyLevel];
private["_sideArms"];
switch (toLower (_aiDifficultyLevel)) do
{

View File

@ -1,3 +1,15 @@
/*
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["_aiDifficultyLevel"];
private["_uniforms"];

View File

@ -1,3 +1,15 @@
/*
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["_aiDifficultyLevel"];
private["_vests"];

View File

@ -1,3 +1,15 @@
/*
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["_aiDifficultyLevel"];
private["_chanceHeliPatrol"];

View File

@ -1,3 +1,15 @@
/*
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["_aiDifficultyLevel"];
private["_missionHelis"];

View File

@ -1,3 +1,15 @@
/*
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["_aiDifficultyLevel"];
private["_noChoppers"];

View File

@ -1,3 +1,15 @@
/*
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["_aiDifficultyLevel"];
private["_noPara"];

View File

@ -17,8 +17,13 @@ params["_center","_objects"];
if (count _center == 2) then {_center pushBack 0};
private ["_newObjs","_simDam","_obj","_spawnPos"];
_newObjs = [];
_obj = createVehicle ["RoadCone_L_F", _coords]; // To designate the mission center
_obj allowDamage true;
_obj enableSimulation false;
_obj enableSimulationGlobal false;
_obj enableDynamicSimulation false;
_newObjs pushBack _obj;
{
//diag_log format["_fnc_spawnBaseObjects::-->> _x = %1",_x];
if (count _x == 3) then
{
_simDam = [false,false];
@ -28,11 +33,12 @@ _newObjs = [];
_simDam = _x select 3;
};
_obj = createVehicle[(_x select 0),_center vectorAdd (_x select 1),[],0,"CAN_COLLIDE"];
//diag_log format["_fnc_spawnBaseObjects::-->> _x = %1 | _obj = %2",_x,_obj];
_newObjs pushback _obj;
_obj setDir (_x select 2);
_obj enableDynamicSimulation (_simDam select 0);
_obj allowDamage (_simDam select 1);
if ( (typeOf _obj) isKindOf "LandVehicle" || (typeOf _obj) isKindOf "Air" || (typeOf _obj) isKindOf "Sea") then
if ((typeOf _obj) isKindOf "LandVehicle" || (typeOf _obj) isKindOf "Air" || (typeOf _obj) isKindOf "Sea") then
{
[_obj] call blck_fnc_configureMissionVehicle;
};

View File

@ -14,12 +14,12 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
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};
if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
if (_headGear isEqualTo []) then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear};
if (_vests isEqualTo []) then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests};
if (_backpacks isEqualTo []) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (_sideArms isEqualTo []) then {[_aiDifficultyLevel] call blck_fnc_selectAISidearms};
#ifdef blck_debugMode
if (blck_debugLevel >=2) then

View File

@ -14,7 +14,7 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#define configureWaypoints true
params["_coords",["_minNoAI",3],["_maxNoAI",6],"_missionGroups",["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear],["_vests",blck_vests],["_backpacks",[]],["_weapons",[]],["_sideArms",blck_Pistols],["_isScubaGroup",false]];
params["_coords",["_minNoAI",3],["_maxNoAI",6],"_missionGroups",["_aiDifficultyLevel","red"],["_uniforms",[]],["_headGear",blck_BanditHeadgear],["_vests",[]],["_backpacks",[]],["_weapons",[]],["_sideArms",[]],["_isScubaGroup",false]];
#ifdef blck_debugMode
if (blck_debugLevel >=2) then
{

View File

@ -1,53 +0,0 @@
/*
Author: Ghostrider [GRG]
Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP
License: Attribution-NonCommercial-ShareAlike 4.0 International
3/17/17
This is basically a container that determines whether a paragroop group should be created and if so creates a group and passes it off to the routine that spawns the paratroops.
--------------------------
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",["_grpParatroops",grpNull],"_skillAI","_noPara",["_uniforms",blck_SkinList],["_headGear",blck_headgearList],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weapons",[]],["_sideArms",blck_Pistols],["_isScuba",false]];
#ifdef blck_debugMode
if (blck_debugLevel >=2) then
{
private _params = ["_coords","_skillAI","_chancePara","_uniforms","_headGear","_vests","_backpacks","_weapons","_sideArms","_grpParatroops","_heli"];
{
diag_log format["_fnc_spawnMissionParatroops:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex];
}forEach _this;
};
private["_grpParatroops","_chanceParatroops","_aborted","_return"];
_skillAI = toLower _skillAI;
_aborted = false;
_grpParatroops = createGroup blck_AI_Side;
//params["_missionPos","_paraGroup",["_numAI",3],"_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull]];
_aborted = [_coords,_grpParatroops,_noPara,_skillAI,_weapons,_uniforms,_headGear,_heli] call blck_fnc_spawnParaUnits;
diag_log format["_fnc_spawnMissionParatroops: blck_fnc_spawnParaUnits returned a value of %1",_aborted];
};
#ifdef blck_debugMode
diag_log format["_fnc_spawnMissionParatroops: _aborted = %1",_aborted];
#endif
if (_aborted) then
{
_return = [[],true];
} else {
_return = [(units _grpParatroops),false];
};
#ifdef blck_debugMode
diag_log format["_fnc_spawnMissionParatroops:-> _return = %1 | _abort = %2",_return,_aborted];
#endif
_return

View File

@ -1,122 +0,0 @@
/*
blck_fnc_spawnMissionVehiclePatrols
by Ghostrider [GRG]
3/17/17
returns [] if no groups could be created
returns [_AI_Vehicles,_missionAI] otherwise;
--------------------------
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["_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",[]], ["_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
{
private _params = ["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles","_useRelativePos","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms","_isScubaGroup"];
{
diag_log format["_fnc_spawnMissionVehiclePatrols:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex];
}forEach _this;
};
#endif
private["_vehGroup","_patrolVehicle","_vehiclePatrolSpawns","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_vehicle","_return","_abort","_spawnPos","_v"];
_vehicles = [];
_missionAI = [];
_abort = false;
//_useRelativePos = false;
if (_missionPatrolVehicles isEqualTo []) then
{
_useRelativePos = false;
_vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius;
{
_v = [_aiDifficultyLevel] call blck_fnc_selectPatrolVehicle;
//diag_log format["_fnc_spawnMissionVehiclePatrols (36):: position = %1 and vehicle = %2",_x, _v];
_missionPatrolVehicles pushBack [_v, _x];
}forEach _vehiclePatrolSpawns;
};
#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)
} else {
_spawnPos = _x select 1;
};
_vehicle = _x select 0;
// params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_vehGroup = [_spawnPos,_coords,3,3,_aiDifficultyLevel,1,2,false,_uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup;
if (isNull _vehGroup) exitWith
{
_abort = true;
};
if !(isNull _vehGroup) then
{
blck_monitoredMissionAIGroups pushBack _vehGroup;
};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionVehiclePatrols (73): group spawned = %1",_vehGroup];
//diag_log format["_fnc_spawnMissionVehiclePatrols (74):: -> _missionType = %3 _vehGroup = %1 and units _vehGroup = %2",_vehGroup, units _vehGroup,_missionType];
};
#endif
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionVehiclePatrols(66): will spawn vehicle %1 at position %2",_vehicle,_spawnPos];
};
#endif
//params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]];
_patrolVehicle = [_coords,_spawnPos,_vehicle,30,45,_vehGroup,true] call blck_fnc_spawnVehiclePatrol;
_vehGroup setVariable["groupVehicle",_vehicle];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionVehiclePatrols (76):: - > patrol vehicle spawned was %1",_patrolVehicle];
};
#endif
if !(isNull _patrolVehicle) then
{
_patrolVehicle setVariable["vehicleGroup",_vehGroup];
_vehicles pushback _patrolVehicle;
_missionAI append (units _vehGroup);
};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionVehiclePatrols(91):: -- > _vehicles updated to %1",_vehicles];
};
#endif
} forEach _missionPatrolVehicles;
blck_monitoredVehicles append _vehicles;
_return = [_vehicles, _missionAI, _abort];
_return

View File

@ -14,18 +14,23 @@
*/
#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",[]], ["_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};
params["_coords","_noVehiclePatrols","_skillAI","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_isScubaGroup",false]];
//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};
if (_backpacks isEqualTo []) then {_backpacks = [_skillAI] call blck_fnc_selectAIBackpacks};
if (_weaponList isEqualTo []) then {_weaponList = [_skillAI] call blck_fnc_selectAILoadout};
if (_sideArms isEqualTo []) then {[_skillAI] call blck_fnc_selectAISidearms};
//{
//diag_log format["_fnc_spawnMissionVehiclePatrols: %1 = %2",_x select 0, _x select 1];
//}forEach [["uniforms",_uniforms],["headgear",_headGear],["vests",_vests],["backpacks",_backpacks],["primary weapons",_weaponList],["secondary weapons",_sideArms]];
#ifdef blck_debugMode
if (blck_debugLevel >=2) then
{
private _params = ["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles","_useRelativePos","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms","_isScubaGroup"];
private _params = ["_coords","_noVehiclePatrols","_skillAI","_missionPatrolVehicles","_useRelativePos","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms","_isScubaGroup"];
{
diag_log format["_fnc_spawnMissionVehiclePatrols:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex];
}forEach _this;
@ -42,7 +47,7 @@ if (_missionPatrolVehicles isEqualTo []) then
_useRelativePos = false;
_vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius;
{
_v = [_aiDifficultyLevel] call blck_fnc_selectPatrolVehicle;
_v = [_skillAI] call blck_fnc_selectPatrolVehicle;
//diag_log format["_fnc_spawnMissionVehiclePatrols (36):: position = %1 and vehicle = %2",_x, _v];
_missionPatrolVehicles pushBack [_v, _x];
}forEach _vehiclePatrolSpawns;
@ -64,7 +69,7 @@ if (_missionPatrolVehicles isEqualTo []) then
};
_vehicle = _x select 0;
// params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_vehGroup = [_spawnPos,_coords,3,3,_aiDifficultyLevel,1,2,false,_uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup;
_vehGroup = [_spawnPos,_coords,3,3,_skillAI,1,2,false,_uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup;
if (isNull _vehGroup) exitWith
{
_abort = true;

View File

@ -11,17 +11,24 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_coords","_missionLandscape",["_min",3],["_max",15],["_nearest",1]];
private["_objects","_wreck","_dir","_dirOffset"];
#define objectSpawnRadius 15
_objects = [];
//_wreck = createVehicle ["Flag_AAF_F", _coords, [], 25, "NONE"];
_wreck = createVehicle ["RoadCone_L_F", _coords]; // To designate the mission center
_wreck allowDamage true;
_wreck enableSimulation false;
_wreck enableSimulationGlobal false;
_wreck enableDynamicSimulation false;
_objects pushBack _wreck;
{
//Random Position Objects based on distance in array
// https://community.bistudio.com/wiki/BIS_fnc_findSafePos
private _posX = ((_coords select 0) + random(objectSpawnRadius)) * (selectRandom[1,-1]);
private _posY = ((_coords select 1) + random(objectSpawnRadius)) * (selectRandom[1,-1]);
_pos = [_coords,_min,_max,_nearest,0,5,0] call BIS_fnc_findSafePos;
_wreck = createVehicle[_x, _pos, [], 0, "CAN_COLLIDE"];
_wreck = createVehicle[_x, _pos, [], 2];
//diag_log format["_fnc_spawnRandomLandscape: _x = %1 | _wreck = %2",_x,_wreck];
_wreck allowDamage true;
_wreck enableSimulation false;
_wreck enableSimulationGlobal false;
@ -29,6 +36,7 @@ _objects pushBack _wreck;
_dirOffset = random(30) * ([1,-1] call BIS_fnc_selectRandom);
_dir = _dirOffset +([_wreck,_coords] call BIS_fnc_dirTo);
_wreck setDir _dir;
//_wreck setDir (_wreck relativeDir _coords);
_objects pushback _wreck;
sleep 0.1;
} forEach _missionLandscape;

View File

@ -0,0 +1,25 @@
/*
by Ghostrider
--------------------------
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["_character","_center","_characterBuildingConfigs"];
//diag_log format["_fnc_placeCharacterInBuilding: _characterBuildingConfigs = %1",_characterBuildingConfigs];
private ["_obj"];
if !(_characterBuildingConfigs isEqualTo []) then
{
_obj = createVehicle[(_characterBuildingConfigs select 0),_center vectorAdd (_characterBuildingConfigs select 1),[],0,"CAN_COLLIDE"];
diag_log format["_fnc_placeCharacterInBuilding: _obj = %1",_obj];
_obj setDir (_characterBuildingConfigs select 2);
_obj allowDamage true;
_obj enableDynamicSimulation true;
_character setPosATL (_obj buildingPos (round(random((count ([_obj] call BIS_fnc_buildingPositions)) -1))));
};
_obj

View File

@ -52,5 +52,5 @@ _char allowDamage true;
_char enableSimulationGlobal true;
_char setVariable["GMSAnimations",_animations,true];
_char setUnitPos "UP";
//diag_log format["_fnc_spawncharacter: _char = %1",_char];
_char

View File

@ -11,16 +11,13 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_coords","_hostageConfigs"];
private["_hostageGroup","_hostage"];
private["_hostageGroup","_hostage","_building"];
_hostage = [_coords,_hostageConfigs] call blck_fnc_spawnCharacter;
_hostage remoteExec["GMS_fnc_initHostage", -2, true];
_hostage setVariable["assetType",1,true];
/*
private _marker = createMarker [format["hostageMarger%1",getPos _hostage], getPos _hostage];
_marker setMarkerColor "ColorBlack";
_marker setMarkerType "mil_dot";
_marker setMarkerText "Hostage";
*/
_hostage
_building = [_hostage,_coords,_hostageConfigs select 7] call blck_fnc_placeCharacterInBuilding;
_result = [_hostage,_building];
//diag_log format["_fnd_spawnHostage: _result = %1",_result];
_result

View File

@ -11,17 +11,15 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_coords","_leaderConfigs"];
private["_leader"];
private["_leader","_building","_result"];
_leader = [_coords, _leaderConfigs] call blck_fnc_spawnCharacter;
_leader remoteExec["GMS_fnc_initLeader", -2, true];
_leader setVariable["assetType",2,true];
_leader setVariable["endAnimation",["Acts_CivilShocked_1"],true];
/*
private _marker = createMarker [format["hostageMarger%1",getPos _leader], getPos _leader];
_marker setMarkerColor "ColorBlack";
_marker setMarkerType "mil_dot";
_marker setMarkerText "Hostage";
*/
_leader
//diag_log format["_fnc_spawnLeader: _leaderConfigs = %1",_leaderConfigs];
_building = [_leader,_coords,_leaderConfigs select 7] call blck_fnc_placeCharacterInBuilding;
//diag_log format["_fnc_spawnLeader: _building = %1",_building];
_result = [_leader,_building];
_result

View File

@ -18,7 +18,15 @@
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_pos","_numAI","_skillAI",["_uniforms",blck_SkinList],["_headGear",blck_headgearList],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weapons",[]],["_sideArms",blck_Pistols],["_isScuba",false]];
params["_pos","_numAI","_skillAI",["_uniforms",[]],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weapons",[]],["_sideArms",[]],["_isScuba",false]];
if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (_sideArms isEqualTo []) then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms};
if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
if (_headGear isEqualTo []) then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear};
if (_vests isEqualTo []) then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests};
if (_backpacks isEqualTo []) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
private["_arc","_dir","_spawnPos","_chute","_unit","_return","_paraGroup"];
private _params = ["_pos","_numAI","_skillAI"];
#ifdef blck_debugMode
@ -42,7 +50,7 @@ for "_i" from 1 to _numAI do
_chute = createVehicle ["Steerable_Parachute_F", [_spawnPos select 0, _spawnPos select 1, 250], [], 0, "FLY"];
[_chute] call blck_fnc_protectVehicle;
// ["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]];
_unit = [getPos _chute,_paraGroup,_skillAI,_uniforms,_headGear,_vests,_backpacks,launcherType,_weapons] call blck_fnc_spawnUnit;
_unit = [getPos _chute,_paraGroup,_skillAI,_uniforms,_headGear,_vests,_backpacks,launcherType,_weapons,_sideArms,_isScuba] call blck_fnc_spawnUnit;
#ifdef blck_debugMode
diag_log format["_fnc_spawnParaUnits: unit %1 = %2 dropping in chute %3",_i,_unit,_chute];

View File

@ -1,210 +0,0 @@
/*
blck_fnc_spawnUnit
Original Code by blckeagls
Modified by Ghostrider
--------------------------
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 ["_i","_weap","_skin","_unit","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices","_optics","_pointers","_muzzles","_underbarrel","_legalOptics"];
params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]];
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
{
private _params = ["_pos","_aiGroup","_skillLevel","_uniforms","_headGear","_vests","_backpacks","_Launcher","_weaponList","_sideArms","_scuba"]; //"_weaponList", "_Launcher"
{
diag_log format["_fnc_spawnUnit::-> _this select %1 (%2) = %3",_forEachIndex, _params select _forEachIndex, _this select _forEachIndex];
}forEach _this;
};
#endif
if (isNull _aiGroup) exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnUnit"};
_unit = ObjNull;
if (blck_modType isEqualTo "Epoch") then
{
"I_Soldier_EPOCH" createUnit [[0,0,0], _aiGroup, "_unit = this", blck_baseSkill, "COLONEL"];
_unit setVariable ["LAST_CHECK",28800,true];
switch(_skillLevel) do
{
case "blue":{_unit setVariable["Crypto",2 + floor(random(blck_maxMoneyBlue)),true];};
case "red":{_unit setVariable["Crypto",4 + floor(random(blck_maxMoneyRed)),true];};
case "green":{_unit setVariable["Crypto",6 + floor(random(blck_maxMoneyGreen)),true];};
case "orange":{_unit setVariable["Crypto",8 + floor(random(blck_maxMoneyOrange)),true];};
};
};
if (blck_modType isEqualTo "Exile") then
{
"i_g_soldier_unarmed_f" createUnit [[0,0,0], _aiGroup, "_unit = this", blck_baseSkill, "COLONEL"];
switch(_skillLevel) do
{
case "blue":{_unit setVariable["ExileMoney",2 + floor(random(blck_maxMoneyBlue)),true];};
case "red":{_unit setVariable["ExileMoney",4 + floor(random(blck_maxMoneyRed)),true];};
case "green":{_unit setVariable["ExileMoney",6 + floor(random(blck_maxMoneyGreen)),true];};
case "orange":{_unit setVariable["ExileMoney",8 + floor(random(blck_maxMoneyOrange)),true];};
};
};
// findEmptyPosition [minDistance, maxDistance, vehicleType]
_unit setPos ( _pos findEmptyPosition [0.1,3,(typeOf _unit)]);
_posUnit = getPosATL _unit;
_start = +_posUnit;
_start set [2, 100];
while { (lineIntersects [ATLToASL _start, ATLToASL _posUnit]) } do {
_pos set [2, ((_pos select 2) + 0.25)];
_posUnit set[1,((_posUnit select 1) + 0.25)];
};
_unit setPosATL _pos;
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
{
diag_log format["_fnc_spawnUnit::-->> unit spawned = %1",_unit];
};
#endif
[_unit] call blck_fnc_removeGear;
if (_scuba) then
{
_unit swiminDepth (_pos select 2);
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
{
diag_log format["_fnc_spawnUnit:: -- >> unit depth = %1 and underwater for unit = %2",_pos select 2, underwater _unit];
};
#endif
};
_skin = "";
_counter = 1;
//diag_log format["_fnc_spawnUnit: _uniforms = %1",_uniforms];
while {_skin isEqualTo "" && _counter < 10} do
{
_unit forceAddUniform (selectRandom _uniforms);
_skin = uniform _unit;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_spawnUnit::-->> for unit _unit % uniform is %2",_unit, uniform _unit];
};
#endif
_counter =+1;
};
//Sets AI Tactics
_unit enableAI "ALL";
_unit allowDammage true;
_unit setBehaviour "COMBAT";
_unit setunitpos "AUTO";
if !(_headGear isEqualTo []) then
{
_unit addHeadgear (selectRandom _headGear);
//diag_log format["Headgear for unit %1 = %2",_unit, headgear _unit];
};
if !(_vests isEqualTo []) then
{
_unit addVest (selectRandom _vests);
//diag_log format["Vest for unit %1 = %2",_unit, vest _unit];
};
if (_weaponList isEqualTo []) then {_weaponList = call blck_fnc_selectAILoadout};
_weap = selectRandom _weaponList;
_unit addWeaponGlobal _weap;
_ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines");
_optics = getArray (configfile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems");
_pointers = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "PointerSlot" >> "compatibleItems");
_muzzles = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "MuzzleSlot" >> "compatibleItems");
_underbarrel = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "UnderBarrelSlot" >> "compatibleItems");
_legalOptics = _optics - blck_blacklistedOptics;
_unit addMagazines [selectRandom _ammoChoices, 3];
if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom _muzzles)};
if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom _legalOptics)};
if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom _pointers)};
if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom _muzzles)};
if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom _underbarrel)};
if ((count(getArray (configFile >> "cfgWeapons" >> _weap >> "muzzles"))) > 1) then
{
_unit addMagazine "1Rnd_HE_Grenade_shell";
};
if !(_sideArms isEqualTo []) then
{
_weap = selectRandom _sideArms;
//diag_log format["[spawnUnit.sqf] _weap os %1",_weap];
_unit addWeaponGlobal _weap;
_ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines");
_unit addMagazines [selectRandom _ammoChoices, 2];
};
for "_i" from 1 to (1+floor(random(4))) do
{
_unit addItem (selectRandom blck_ConsumableItems);
};
// Add First Aid or Grenade 50% of the time
if (round(random 10) <= 5) then
{
//diag_log format["spawnUnit.sqf] -- Item is %1", _item];
_unit addItem selectRandom blck_specialItems;
};
//diag_log format["_spawnUnit: _Launcher = %1",_Launcher];
if ( !(_Launcher isEqualTo "none") && !(_backpacks isEqualTo [])) then
{
_unit addWeaponGlobal _Launcher;
_unit addBackpack (selectRandom _backpacks);
for "_i" from 1 to 3 do
{
_unit addItemToBackpack (getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines") select 0); // call BIS_fnc_selectRandom;
};
_unit setVariable["Launcher",_launcher,true];
} else {
if ( random (1) < blck_chanceBackpack && !(_backpacks isEqualTo [])) then
{
_unit addBackpack selectRandom _backpacks;
};
};
if(sunOrMoon < 0.2 && blck_useNVG)then
{
_unit addWeapon selectRandom blck_NVG;
_unit setVariable ["hasNVG", true,true];
}
else
{
_unit setVariable ["hasNVG", false,true];
};
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_spawnUnit:: --> unit loadout = %1", getUnitLoadout _unit];
};
#endif
_unit addEventHandler ["Reloaded", {_this call compile preprocessfilelinenumbers blck_EH_unitWeaponReloaded;}];
_unit addMPEventHandler ["MPKilled", {[(_this select 0), (_this select 1)] call compile preprocessfilelinenumbers blck_EH_AIKilled;}]; // changed to reduce number of concurrent threads, but also works as spawn blck_AIKilled; }];
_unit addMPEventHandler ["MPHit",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIHit;}];
switch (_skillLevel) do
{
case "blue": {_index = 0;_aiSkills = blck_SkillsBlue;};
case "red": {_index = 1;_aiSkills = blck_SkillsRed;};
case "green": {_index = 2;_aiSkills = blck_SkillsGreen;};
case "orange": {_index = 3;_aiSkills = blck_SkillsOrange;};
default {_index = 0;_aiSkills = blck_SkillsBlue;};
};
[_unit,_aiSkills] call blck_fnc_setSkill;
_unit setVariable ["alertDist",blck_AIAlertDistance select _index,true];
_unit setVariable ["intelligence",blck_AIIntelligence select _index,true];
_unit setVariable ["GMS_AI",true,true];
_unit

View File

@ -13,8 +13,13 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
private ["_i","_weap","_skin","_unit","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices","_optics","_pointers","_muzzles","_underbarrel","_legalOptics"];
params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]];
params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", []],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]];
if (_weaponList isEqualTo []) then {_weaponList = [_skillLevel] call blck_fnc_selectAILoadout};
if (_sideArms isEqualTo []) then {_sideArms = [_skillLevel] call blck_fnc_selectAISidearms};
if (_uniforms isEqualTo []) then {_uniforms = [_skillLevel] call blck_fnc_selectAIUniforms};
if (_headGear isEqualTo []) then {_headGear = [_skillLevel] call blck_fnc_selectAIHeadgear};
if (_vests isEqualTo []) then {_vests = [_skillLevel] call blck_fnc_selectAIVests};
if (_backpacks isEqualTo []) then {_backpacks = [_skillLevel] call blck_fnc_selectAIBackpacks};
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
{
@ -114,6 +119,7 @@ if !(_vests isEqualTo []) then
};
if (_weaponList isEqualTo []) then {_weaponList = call blck_fnc_selectAILoadout};
//diag_log format["_fnc_spawnUnit: _weaponList = %1",_weaponList];
_weap = selectRandom _weaponList;
_unit addWeaponGlobal _weap;
_ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines");
@ -181,6 +187,8 @@ else
_unit setVariable ["hasNVG", false,true];
};
_unit addWeapon selectRandomWeighted["",4,"Binocular",3,"Rangefinder",1];
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{

View File

@ -13,12 +13,20 @@
#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",[]], ["_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};
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};
if (_backpacks isEqualTo []) then {_backpacks = [_skillAI] call blck_fnc_selectAIBackpacks};
if (_weaponList isEqualTo []) then {_weaponList = [_skillAI] call blck_fnc_selectAILoadout};
if (_sideArms isEqualTo []) then {[_skillAI] call blck_fnc_selectAISidearms};
/*
{
diag_log format["_fnc_spawnMissionHeli: parameter %1 = %2",_foreachIndex,_x];
}forEach [_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms];
*/
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
@ -82,7 +90,7 @@ if !(isNull _grpPilot) then
[_patrolHeli] call blck_fnc_emptyObject;
_launcherType = "none";
//params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]];
//params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", []],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]];
_unitPilot = [[100,100,100],_grpPilot,_skillAI,_uniforms,_headGear,_vests,_backpacks,_Launcher,_weaponList,_sideArms] call blck_fnc_spawnUnit;
_unitPilot setSkill 1;
_unitPilot assignAsDriver _patrolHeli;

View File

@ -15,12 +15,14 @@
// [_coords,_aiDifficultyLevel,_chancePara,_noPara,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms]
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};
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};
if (_backpacks isEqualTo []) then {_backpacks = [_skillAI] call blck_fnc_selectAIBackpacks};
if (_weaponList isEqualTo []) then {_weaponList = [_skillAI] call blck_fnc_selectAILoadout};
if (_sideArms isEqualTo []) then {[_skillAI] call blck_fnc_selectAISidearms};
#ifdef blck_debugMode
if (blck_debugLevel >=2) then
{

View File

@ -1,82 +0,0 @@
/*
Author: Ghostrider [GRG]
Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP
License: Attribution-NonCommercial-ShareAlike 4.0 International
3/17/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/
--------------------------
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["_missionPos","_paraGroup","_numAI","_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull]];
private["_arc","_dir","_spawnPos","_chute","_unit","_launcherType","_aborted"];
_aborted = false;
#ifdef blck_debugMode
diag_log format["_fnc_spawnParaUnits (17)::_missionPos %1 | _paraGroup %2 | _numAI %3 | _skillAI %4 | _heli = %5",_missionPos,_paraGroup,_numAI,_skillAI,_heli];
#endif
if (isNull _paraGroup) then
{
_aborted = true;
} else {
_paraGroup setVariable["groupVehicle",objNull];
_launcherType = "none";
private ["_arc","_spawnPos"];
_arc = 45;
_dir = 0;
_pos = _missionPos;
for "_i" from 1 to _numAI do
{
if (_heli isKindOf "Air") then {_pos = getPos _heli};
_spawnPos = _pos getPos[1.5,_dir];
_chute = createVehicle ["Steerable_Parachute_F", [100, 100, 200], [], 0, "FLY"];
[_chute] call blck_fnc_protectVehicle;
_unit = [[_spawnPos select 0, _spawnPos select 1, 100],_weapons,_paraGroup,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnAI;
_chute setPos [_spawnPos select 0, _spawnPos select 1, 125]; //(_offset select 2) - 10];
_unit assignAsDriver _chute;
_unit moveInDriver _chute;
_unit allowDamage true;
_dir = _dir + _arc;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnParaUnits:: spawned unit %1, at location %2 and vehicle _unit %1",_unit,getPos _unit, vehicle _unit];
};
#endif
uiSleep 2;
};
_paraGroup selectLeader ((units _paraGroup) select 0);
//params["_pos","_minDis","_maxDis","_group"];
// [_pos,_minDist,_maxDist,_groupSpawned,"random","SAD"] spawn blck_fnc_setupWaypoints;
[_missionPos,20,30,_paraGroup,"random","SAD","paraUnits"] call blck_fnc_setupWaypoints;
blck_monitoredMissionAIGroups pushback _paraGroup;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log "_fnc_spawnParaUnits (44): All Units spawned";
};
#endif
};
#ifdef blck_debugMode
diag_log format["_fnc_spawnParaUnits: _aborted = %1",_aborted];
#endif
_aborted;

View File

@ -1,39 +0,0 @@
/*
Spawn a vehicle and protect it against cleanup by Epoch
Returns the object (vehicle) created.
By Ghostrider [GRG]
Last modified 1-27-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";
private["_veh"];
params["_vehType","_pos",["_clearInventory",true]];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf: _vehType = %1 | _pos = %2",_vehType,_pos];};
#endif
_veh = createVehicle[_vehType, _pos, [], 0, "NONE"];
_veh allowDamage true;
_veh enableRopeAttach true;
_veh setVariable["blck_vehicle",true];
[_veh] call blck_fnc_protectVehicle;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf:: vehicle spawned is %1",_veh];};
#endif
// params["_veh",["_clearInventory",true]];
[_veh,_clearInventory] call blck_fnc_configureMissionVehicle;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["spawnVehicle:: returning parameter _veh = %1",_veh];};
#endif
_veh

View File

@ -1,79 +0,0 @@
/*
By Ghostrider [GRG]
Copyright 2016
Last updated 3-17-17
spawns a vehicle of _vehType and mans it with units in _group.
returns _veh, the vehicle spawned.
--------------------------
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["_vehType","_safepos","_veh","_unitNumber"];
params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull],["_setWaypoints",true]];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
private _params = ["_center","_pos","_vehType","_minDis","_maxDis","_group","_setWaypoints"];
{
diag_log format["_fnc_spawnMissionVehiclePatrol:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex];
}forEach _this;
};
#endif
//_center Center of the mission area - this is usuall the position treated as the center by the mission spawner. Vehicles will patrol the perimeter of the mission area.
// _pos the approximate spawn point for the vehicle
//_vehType = [_this,1,"I_G_Offroad_01_armed_F"] call BIS_fnc_param;
//_minDis = minimum distance from the center of the mission for vehicle waypoints
//_maxDis = maximum distance from the center of the mission for vehicle waypoints
//_groupForVehiclePatrol = The group with which to man the vehicle
if !(isNull _group) then
{ // exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnVehiclePatrol"; objNull;};
_veh = [_vehType,_pos] call blck_fnc_spawnVehicle;
// _veh addEventHandler["HandleDamage",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIVehicle_HandleDamage}];
_veh addMPEventHandler["MPHit",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIVehicle_HandleHit}];
_group setVariable["groupVehicle",_veh];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["spawnVehiclePatrol:: vehicle spawned is %1 of typeof %2",_veh, typeOf _veh];
};
#endif
_unitNumber = 0;
{
switch (_unitNumber) do
{
case 0: {_x moveingunner _veh;};
case 1: {_x moveindriver _veh;};
default {_x moveInCargo _veh;};
};
_unitNumber = _unitNumber + 1;
}forEach (units _group);
// params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAD"],["_soldierType","null"] ];
_group setcombatmode "RED";
_group setBehaviour "COMBAT";
if (_setWaypoints) then
{
[_center,_minDis,_maxDis,_group,"perimeter","SAD","vehicle"] spawn blck_fnc_setupWaypoints;
};
};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnVehiclePatrol::->> _veh = %1",_veh];
};
#endif
_veh

View File

@ -60,13 +60,11 @@ blck_fnc_selectMissionHelis = compileFinal preprocessFileLineNumbers "\q\addons
blck_fnc_selectNumberAirPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectNumberAirPatrols.sqf";
blck_fnc_selectNumberParatroops = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectNumberParatroops.sqf";
blck_fnc_selectChanceParatroops = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_selecctChanceParatroops.sqf";
blck_fnc_addMissionToQue = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_addMissionToQue.sqf"; //
blck_fnc_updateMissionQue = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_updateMissionQue.sqf"; //
blck_fnc_spawnPendingMissions = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnPendingMissions.sqf"; //
blck_fnc_addLiveAItoQue = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_addLiveAItoQue.sqf";
blck_fnc_addObjToQue = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_addObjToQue.sqf"; //
//blck_fnc_missionTimer = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionTimer.sqf";
blck_fnc_spawnCrate = compileFinal preprocessFileLineNumbers "\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 = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionCrates.sqf";
blck_fnc_cleanupObjects = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_cleanUpObjects.sqf";
@ -82,13 +80,11 @@ blck_fnc_spawnMines = compileFinal preprocessFileLineNumbers "\q\addons\custom_s
blck_fnc_clearMines = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_clearMines.sqf"; // clears mines in an array passed as a parameter
blck_fnc_signalEnd = compileFinal preprocessFileLineNumbers "\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 = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_endMission.sqf";
//blck_fnc_missionAIareDead = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionAIareDead.sqf";
//blck_fnc_countAliveAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_countAliveAI.sqf";
blck_fnc_paraDropObject = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_paraDropObject.sqf";
blck_fnc_loadMissionCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_loadMissionCrate.sqf";
blck_fnc_crateMoved = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMoved.sqf";
blck_fnc_crateMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMarker.sqf";
//blck_fnc_crateMapMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMapMarker.sqf";
// Group-related functions
blck_fnc_spawnGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"; // Spawn a single group and populate it with AI units]
@ -110,9 +106,6 @@ blck_fnc_configureMissionVehicle = compileFinal preprocessFileLineNumbers "\q\ad
blck_fnc_vehicleMonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_vehicleMonitor.sqf";
blck_fnc_spawnMissionReinforcements = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionReinforcements.sqf";
blck_fnc_spawnMissionHeli = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionHeli.sqf";
//blck_fnc_spawnMissionParatroops = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionParatroops.sqf"; // Lumped here because these 'jump' from aircraft
//blck_fnc_spawnParaUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnParaUnits.sqf"; // Lumped here because these 'jump' from aircraft
//blck_fnc_releaseVehicleToPlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_releaseVehicleToPlayers.sqf"; // GMS_fnc_releaseVehicleToPlayers
blck_EH_AIVehicle_HandleHit = "\q\addons\custom_server\Compiles\Vehicles\GMS_EH_AIVehicle_Hit.sqf";
blck_fnc_HandleAIVehicleHit = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_HandleAIVehicleHit.sqf";
blck_EH_VehicleKilled = "\q\addons\custom_server\Compiles\Vehicles\GMS_EH_VehicleKilled.sqf";
@ -148,6 +141,7 @@ blck_fnc_spawnLeader = compileFinal preprocessFileLineNumbers "\q\addons\custom
blck_fnc_spawnCharacter = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnCharacter.sqf";
blck_fnc_spawnParaUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnParaUnits.sqf";
blck_fnc_nextAnim = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_nextAnim.sqf";
blck_fnc_placeCharacterInBuilding = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_placeCharacterInBuilding.sqf";
// HC support functions
blck_fnc_HC_XferGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_XferGroup.sqf";

View File

@ -1,91 +0,0 @@
_blck_lightlyArmed_ARMA3 = [
"B_G_Offroad_01_armed_F",
"O_G_Offroad_01_armed_F",
"B_MRAP_01_gmg_F",
"B_MRAP_01_hmg_F",
"O_MRAP_02_gmg_F",
"O_MRAP_02_hmg_F",
"I_MRAP_03_hmg_F",
"I_MRAP_03_gmg_F",
"B_APC_Wheeled_01_cannon_F",
"I_APC_Wheeled_03_cannon_F"
];
_blck_tracked_APC_ARMA3 = [
"B_APC_Tracked_01_rcws_F",
"B_APC_Tracked_01_CRV_F",
"B_APC_Tracked_01_AA_F",
"O_APC_Tracked_02_cannon_F",
"O_APC_Tracked_02_AA_F",
"O_APC_Wheeled_02_rcws_F",
"I_APC_tracked_03_cannon_F"
];
_blck_Tanks_ARMA3 = [
//"B_MBT_01_arty_F",
"B_MBT_01_mlrs_F",
"B_MBT_01_TUSK_F",
"O_MBT_02_cannon_F",
//"O_MBT_02_arty_F",
"I_MBT_03_cannon_F"
];
_blck_APC_CUP = [
"CUP_B_Mastiff_GMG_GB_D",
"CUP_B_Mastiff_HMG_GB_D",
"CUP_B_Ridgback_HMG_GB_D",
"CUP_B_Ridgback_GMG_GB_D",
"CUP_B_M1128_MGS_Desert",
"CUP_B_M1135_ATGMV_Desert_Slat",
"CUP_B_M1133_MEV_Desert_Slat",
"CUP_B_LAV25M240_desert_USMC",
"CUP_B_M1129_MC_MK19_Desert_Slat",
"CUP_B_LAV25_HQ_desert_USMC",
"CUP_B_BRDM2_ATGM_CDF",
"CUP_B_BTR60_CDF",
"CUP_B_M1130_CV_M2_Desert_Slat",
"CUP_B_M1126_ICV_MK19_Desert_Slat",
"CUP_O_BTR90_RU",
"CUP_O_GAZ_Vodnik_BPPU_RU",
"CUP_B_M1126_ICV_M2_Desert",
"CUP_B_M1126_ICV_MK19_Desert",
"CUP_B_M1130_CV_M2_Desert",
"CUP_B_M1126_ICV_M2_Desert_Slat",
"CUP_B_M1133_MEV_Desert",
"CUP_O_GAZ_Vodnik_AGS_RU",
"CUP_O_GAZ_Vodnik_PK_RU"
];
_blck_Tanks_CUP = [
"CUP_B_M2A3Bradley_USA_D",
"CUP_B_M113_desert_USA",
"CUP_B_M163_USA",
"CUP_B_M6LineBacker_USA_D",
"CUP_B_M1A1_DES_US_Army",
"CUP_B_M1A2_TUSK_MG_DES_US_Army",
"CUP_B_AAV_USMC",
"CUP_B_M270_DPICM_USA",
"CUP_B_ZSU23_CDF",
"CUP_B_BMP2_CDF",
"CUP_B_T72_CDF",
"CUP_I_T34_NAPA",
"CUP_B_Challenger2_NATO",
"CUP_B_FV432_Bulldog_GB_D_RWS",
"CUP_B_FV432_Bulldog_GB_D",
"CUP_B_FV510_GB_D_SLAT",
"CUP_B_MCV80_GB_D_SLAT",
"CUP_O_2S6_RU",
"CUP_O_BMP3_RU",
"CUP_O_T90_RU",
"CUP_O_T55_SLA",
"CUP_O_BMP1P_TKA",
"CUP_B_M270_DPICM_USA",
"CUP_B_M2Bradley_USA_W",
"CUP_B_FV510_GB_D",
"CUP_B_MCV80_GB_D",
"CUP_B_M7Bradley_USA_D",
"CUP_O_2S6_RU",
"CUP_O_BMP1_TKA"
];

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,6 @@ _markerMissionName = "Capture Don";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[-1.44531,-21.2148,0],0,[true,false]],
["Land_u_Barracks_V2_F",[-3.79102,2.56055,0],0,[true,false]],
["Land_BagBunker_Small_F",[33.8457,18.2461,0],51.9209,[true,false]],
["Land_BagBunker_Small_F",[-30.4336,22.9043,0],321.242,[true,false]],
["Land_BagBunker_Small_F",[-35.3164,-29.9648,0],237.265,[true,false]],
@ -63,11 +62,26 @@ _missionLandscape = [
["Land_HBarrier_3_F",[8.11914,16.957,0.0400085],88.6077,[true,false]]
]; // list of objects to spawn as landscape; // list of objects to spawn as landscape
_buildings = [
"Land_Cargo_HQ_V4_F",
"Land_Cargo_HQ_V1_F",
"Land_Cargo_HQ_V2_F",
"Land_Cargo_HQ_V3_F",
"Land_Cargo_Tower_V1_F",
"Land_Cargo_Tower_V2_F",
"Land_Cargo_Tower_V3_F",
"Land_Cargo_Tower_V4_Fv",
"Land_BagBunker_01_large_green_F"
];
_enemyLeaderConfig =
["I_G_resistanceLeader_F",[-7.83789,13.1465,-0.00143886],126.345,[true,false],
["I_G_resistanceLeader_F", // select 0
[-7.83789,13.1465,-0.00143886], // select 1
126.345, // select 2
[true,false], // select 3
["Acts_B_briefings"], // Use the animation viewer to see other choices: http://killzonekid.com/arma-3-animation-viewer-jumping-animation/
["H_Beret_Colonel"], // array of headgear choices
["U_OrestesBody"] // array of uniform choices
["U_OrestesBody"], // array of uniform choices
[selectRandom _buildings,[-3.79102,2.56055,0],0,[true,false]]
];
_enemyLeaderConfig set[
1, selectRandom [[-7.83789,13.1465,-0.00143886]]
@ -123,7 +137,7 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Blue;
//_headgear = blck_headgear;
_chanceReinforcements = blck_chanceParaBlue;
_noPara = blck_noParaBlue;
_chanceHeliPatrol = blck_chanceHeliPatrolBlue;
_chanceHeliPatrol = 0;
_spawnCratesTiming = "atMissionEndAir";
_endCondition = "assetSecured"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear", "assetSecured"
//_timeOut = -1;

View File

@ -68,11 +68,26 @@ _markerType = ["ELIPSE",[175,175],"GRID"];
_markerColor = "ColorBlue";
_markerMissionName = "Bandit Patrol";
_missionLandscapeMode = "random"; // acceptable values are "none","random","precise"
// _missionLandscape
// Note that the format for the _missionLandscape is different for the two modes.
// In random, the objects are randomly arrayed around the mission center.
// In precise, the objects are spawned as closely as possible to the x,y,z offset from mission center specified.
// See default2.sqf for an example of the use of precise base objects.
_missionLandscape = ["Land_WoodPile_F","Land_BagFence_Short_F","Land_WoodPile_F","Land_BagFence_Short_F","Land_WoodPile_F","Land_BagFence_Short_F","Land_FieldToilet_F","Land_TentDome_F","Land_TentDome_F","Land_TentDome_F","Land_TentDome_F","Land_CargoBox_V1_F","Land_CargoBox_V1_F"]; // list of objects to spawn as landscape
/*
private _addedLandscape = ["Land_FoodSacks_01_cargo_brown_F","Land_FoodSacks_01_large_brown_F","Land_FoodSack_01_full_brown_F","Land_PaperBox_01_open_boxes_F",
"Land_CampingTable_white_F","Land_WoodenPlanks_01_messy_pine_F","Land_CinderBlocks_01_F","Land_WoodenCrate_01_F","Land_WoodenCrate_01_stack_x5_F",
"Land_BarrelTrash_grey_F","Land_WoodenTable_large_F","Land_BagFence_Short_F","Land_WoodPile_F"]
*/
_missionLandscape = ["Flag_AAF_F","Land_TentDome_F","Land_TentDome_F","Land_TentDome_F","Land_TentDome_F","Land_FieldToilet_F","Campfire_burning_F"]; // list of objects to spawn as landscape
for "_i" from 1 to 8 do
{
_missionLandscape pushBack selectRandom [
"Land_FoodSacks_01_cargo_brown_F","Land_FoodSacks_01_large_brown_F","Land_FoodSack_01_full_brown_F","Land_PaperBox_01_open_boxes_F",
"Land_CampingTable_white_F","Land_WoodenPlanks_01_messy_pine_F","Land_CinderBlocks_01_F","Land_WoodenCrate_01_F","Land_WoodenCrate_01_stack_x5_F",
"Land_BarrelTrash_grey_F","Land_WoodenTable_large_F","Land_BagFence_Short_F","Land_WoodPile_F"
];
};
_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
// when empty, a single loot container will be spawned at the center of the mission.
// Use this to specify exact spots to spawn crates; see default2.seq for an example.

View File

@ -59,7 +59,7 @@ _markerColor = "ColorBlue";
_markerMissionName = "Bandit Patrol";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[0,0,0],0,[false,false]],
["Flag_AAF_F",[3,3,0],0,[false,false]],
["Land_dp_transformer_F",[1.698242,-10.4668,-0.00763702],271.32,[true,false]],
["Land_Wreck_BRDM2_F",[1.37012,13.498,0.00109863],184.487,[true,false]],
["Land_BagBunker_Small_F",[18.4512,-3.66406,0.00780487],305.003,[true,false]],

View File

@ -24,69 +24,85 @@ _markerColor = "ColorBlue";
_markerMissionName = "Rescue Hostage";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[0.935547,-24.3027,0],0,[true,false]],
["Land_SM_01_shelter_wide_F",[0.298828,4.63867,0],0,[true,false]],
["Campfire_burning_F",[-2.08789,-7.51563,0],0,[true,false]],
["Land_Stone_8m_F",[-10.0313,-6.46875,0],268.936,[true,false]],
["Land_Stone_8m_F",[-10.2402,1.90039,0],268.936,[true,false]],
["Land_Stone_8m_F",[-10.3984,10.1035,0],268.936,[true,false]],
["Land_Stone_8m_F",[10.125,-4.10156,0],270,[true,false]],
["Land_Stone_8m_F",[10.0723,4.26953,0],270,[true,false]],
["Land_Stone_8m_F",[10.0664,12.4746,0],270,[true,false]],
["Land_Stone_8m_F",[7.95117,20.252,0],0,[true,false]],
["Land_Stone_8m_F",[-0.314453,20.2656,0],0,[true,false]],
["Land_Stone_8m_F",[-8.54102,20.3066,0],0,[true,false]],
["Land_Stone_8m_F",[8.16016,-15.1113,0],0,[true,false]],
["Land_Stone_8m_F",[-0.105469,-15.0977,0],0,[true,false]],
["Land_Stone_8m_F",[-8.33203,-15.0566,0],0,[true,false]],
["Land_HBarrierWall6_F",[-50.875,38.2676,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-50.3516,21.4355,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-50.6055,29.8965,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-49.4141,1.33203,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-49.918,13.0254,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-48.5371,-15.6992,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-49.0938,-7.12305,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-47.7773,-28.3535,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-47.1641,-36.5547,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[50.0566,-17.4785,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[50.1484,-25.9414,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[49.5039,2.64063,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[49.7852,-9.06055,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[48.9531,19.6855,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[49.3457,11.0996,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[48.4355,32.3516,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[47.9785,40.5625,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[50.2598,-34.3164,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[44.7031,55.5176,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[27.8652,55.1797,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[36.3281,55.3418,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[7.75195,54.4629,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[19.4512,54.8379,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-9.28711,53.7734,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-0.705078,54.2363,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-21.9492,53.1523,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-30.1563,52.6289,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-38.5195,52.3809,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-46.9727,52.0313,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-44.418,-50.7617,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[-27.5898,-50.1348,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[-36.0488,-50.4434,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[-7.49023,-49.0723,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[-19.1816,-49.6484,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[9.5332,-48.0918,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[0.960938,-48.7012,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[22.1836,-47.252,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[30.3809,-46.5879,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[38.6406,-46.1328,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[47.0762,-45.5215,0],358.823,[true,false]]
//["Flag_AAF_F",[0.269531,-29.8301,0],0,[true,false]],
["Campfire_burning_F",[-2.75391,-13.043,0],0,[true,false]],
["Land_Stone_8m_F",[-17.252,-5.42969,0],268.936,[true,false]],
["Land_Stone_8m_F",[-17.4609,2.93945,0],268.936,[true,false]],
["Land_Stone_8m_F",[-17.6191,11.1426,0],268.936,[true,false]],
["Land_Stone_8m_F",[16.082,-3.7168,0],270,[true,false]],
["Land_Stone_8m_F",[16.0742,4.58789,0],270,[true,false]],
["Land_Stone_8m_F",[16.1035,12.8438,0],270,[true,false]],
["Land_Stone_8m_F",[7.83203,17.8164,0],0,[true,false]],
["Land_Stone_8m_F",[-0.505859,18.0039,0],0,[true,false]],
["Land_Stone_8m_F",[-8.85742,18.0273,0],0,[true,false]],
["Land_Stone_8m_F",[7.94727,-32.7383,0],0,[true,false]],
["Land_Stone_8m_F",[-0.318359,-32.7246,0],0,[true,false]],
["Land_Stone_8m_F",[-8.54492,-32.6836,0],0,[true,false]],
["Land_HBarrierWall6_F",[-54.6641,42.75,0],91.2122,[true,false]],
["Land_HBarrierWall6_F",[-54.7383,25.9102,0],91.2122,[true,false]],
["Land_HBarrierWall6_F",[-54.6934,34.375,0],91.2122,[true,false]],
["Land_HBarrierWall6_F",[-54.5156,5.78711,0],91.2122,[true,false]],
["Land_HBarrierWall6_F",[-54.6035,17.4902,0],91.2122,[true,false]],
["Land_HBarrierWall6_F",[-54.2441,-11.2656,0],91.2122,[true,false]],
["Land_HBarrierWall6_F",[-54.4961,-2.67383,0],91.2122,[true,false]],
["Land_HBarrierWall6_F",[-53.9336,-23.9395,0],91.2122,[true,false]],
["Land_HBarrierWall6_F",[-53.6113,-32.1563,0],91.2122,[true,false]],
["Land_HBarrierWall6_F",[52.082,29.7891,0],90.6291,[true,false]],
["Land_HBarrierWall6_F",[52.043,38.252,0],90.6291,[true,false]],
["Land_HBarrierWall6_F",[52.5098,9.66602,0],90.6291,[true,false]],
["Land_HBarrierWall6_F",[52.3008,21.3691,0],90.6291,[true,false]],
["Land_HBarrierWall6_F",[52.9551,-7.38086,0],90.6291,[true,false]],
["Land_HBarrierWall6_F",[52.6152,1.20703,0],90.6291,[true,false]],
["Land_HBarrierWall6_F",[53.3945,-20.0508,0],90.6291,[true,false]],
["Land_HBarrierWall6_F",[53.8008,-28.2637,0],90.6291,[true,false]],
["Land_HBarrierWall6_F",[51.9824,46.627,0],90.6291,[true,false]],
["Land_HBarrierWall6_F",[42.873,59.8809,0],180.956,[true,false]],
["Land_HBarrierWall6_F",[26.0313,59.8809,0],180.956,[true,false]],
["Land_HBarrierWall6_F",[34.4961,59.873,0],180.956,[true,false]],
["Land_HBarrierWall6_F",[5.9082,59.5664,0],180.956,[true,false]],
["Land_HBarrierWall6_F",[17.6133,59.707,0],180.956,[true,false]],
["Land_HBarrierWall6_F",[-11.1406,59.2188,0],180.956,[true,false]],
["Land_HBarrierWall6_F",[-2.55078,59.5098,0],180.956,[true,false]],
["Land_HBarrierWall6_F",[-23.8125,58.8516,0],180.956,[true,false]],
["Land_HBarrierWall6_F",[-32.0293,58.4922,0],180.956,[true,false]],
["Land_HBarrierWall6_F",[-40.3965,58.4121,0],180.956,[true,false]],
["Land_HBarrierWall6_F",[-48.8535,58.2324,0],180.956,[true,false]],
["Land_HBarrierWall6_F",[-44.877,-44.8379,0],1.36283,[true,false]],
["Land_HBarrierWall6_F",[-28.0371,-44.957,0],1.36283,[true,false]],
["Land_HBarrierWall6_F",[-36.502,-44.8906,0],1.36283,[true,false]],
["Land_HBarrierWall6_F",[-7.91016,-44.7871,0],1.36283,[true,false]],
["Land_HBarrierWall6_F",[-19.6152,-44.8438,0],1.36283,[true,false]],
["Land_HBarrierWall6_F",[9.13867,-44.5605,0],1.36283,[true,false]],
["Land_HBarrierWall6_F",[0.548828,-44.791,0],1.36283,[true,false]],
["Land_HBarrierWall6_F",[21.8145,-44.2832,0],1.36283,[true,false]],
["Land_HBarrierWall6_F",[30.0332,-43.9824,0],1.36283,[true,false]],
["Land_HBarrierWall6_F",[38.3047,-43.8945,0],1.36283,[true,false]],
["Land_HBarrierWall6_F",[46.7598,-43.6582,0],1.36283,[true,false]],
["Land_Stone_8m_F",[15.791,-29.4043,0],270,[true,false]],
["Land_Stone_8m_F",[15.7383,-21.0332,0],270,[true,false]],
["Land_Stone_8m_F",[15.7324,-12.8281,0],270,[true,false]],
["Land_Stone_8m_F",[-17.2559,-28.6465,0],270,[true,false]],
["Land_Stone_8m_F",[-17.3086,-20.2754,0],270,[true,false]],
["Land_Stone_8m_F",[-17.3145,-12.0703,0],270,[true,false]]
]; // list of objects to spawn as landscape; // list of objects to spawn as landscape
_buildings = [
"Land_i_House_Big_01_V1_F",
"Land_i_House_Big_01_V3_F",
"Land_i_House_Big_02_V1_F",
"Land_i_House_Big_02_V3_F",
"Land_i_Shop_02_V1_F",
"Land_i_Shop_02_V3_F"
];
_hostageConfig = ["C_man_polo_6_F",
[-7.08594,9.5957,-0.299652],
126.345,[true,false],
[-7.08594,9.5957,
-0.299652],
126.345,
[true,false],
["AmovPercMstpSnonWnonDnon_Scared"],
["H_Cap_red"], // array of headgear choices
["U_NikosBody"] // array of uniform choices
["U_NikosBody"], // array of uniform choices
[selectRandom _buildings,[-0.279297,-15.9199,0],0,[true,false]]
]; // Sitting Animation
// Use the animation view to see other choices: http://killzonekid.com/arma-3-animation-viewer-jumping-animation/
_missionLootBoxes = [
@ -114,7 +130,7 @@ _missionGroups =
//[[26.9961,-29.9551,-0.00143886],3,3,"Blue",10,20],
//[[32.2461,33.0605,-0.00143886],3,3,"Blue",10,20],
//[[-35.6035,32.1855,-0.00143886],3,3,"Blue",10,20],
[[-47.4219,-19.8906,-0.00143886],1,1,"Blue",10,20]
//[[-47.4219,-19.8906,-0.00143886],1,1,"Blue",10,20]
]; // Can be used to define spawn positions of AI patrols
_missionEmplacedWeapons = [
@ -139,7 +155,7 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Blue;
//_headgear = blck_headgear;
_noPara = blck_noParaBlue;
//_chanceHeliPatrol = blck_chanceHeliPatrolBlue;
_chanceHeliPatrol = 0;
_spawnCratesTiming = "atMissionEndAir";
_endCondition = "assetSecured"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear", "assetSecured"
//_timeOut = -1;

View File

@ -26,23 +26,23 @@ _markerColor = "ColorBlue";
_markerMissionName = "Medical Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[3,3,0],0,[false,false]],
["Flag_AAF_F",[5,5,0],0,[false,true]],
["Land_dp_transformer_F",[1.698242,-10.4668,-0.00763702],271.32,[true,true]],
["Land_Wreck_BRDM2_F",[1.37012,13.498,0.00109863],184.487,[true,true]],
["Land_BagBunker_Small_F",[18.4512,-3.66406,0.00780487],305.003,[true,true]],
["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,[true,false]],
["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,[true,true]],
["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,[true,true]],
["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,[false,false]],
["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,[false,false]],
["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[false,false]],
["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[false,false]],
["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,[false,false]],
["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,[false,false]],
["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,[false,false]],
["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,[false,false]],
["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,[false,false]],
["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,[false,false]]
["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,[false,true]],
["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,[false,true]],
["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[false,false,true]],
["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[false,false,true]],
["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,[false,true]],
["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,[false,true]],
["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,[false,true]],
["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,[false,true]],
["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,[false,true]],
["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,[false,true]]
]; // list of objects to spawn as landscape
_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.

View File

@ -26,48 +26,48 @@ _markerColor = "ColorBlue";
_markerMissionName = "Bandit Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Land_CampingChair_V1_F",[1.32227,2.07813,8.2016e-005],108.293,[false,false]],
["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,[false,false]],
["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,[false,false]],
["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,[false,false]],
["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,[false,false]],
["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,[false,false]],
["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,[false,false]],
["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,[false,false]],
["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,[false,false]],
["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,[false,false]],
["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,[false,false]],
["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,[false,false]],
["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,[false,false]],
["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,[false,false]],
["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,[false,false]],
["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,[false,false]],
["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,[false,false]],
["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,[false,false]],
["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,[false,false]],
["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,[false,false]],
["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,[false,false]],
["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,[false,false]],
["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,[false,false]],
["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,[false,false]],
["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,[false,false]],
["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,[false,false]],
["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,[false,false]],
["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,[false,false]],
["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,[false,false]],
["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,[false,false]],
["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,[false,false]],
["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,[false,false]],
["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,[false,false]],
["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,[false,false]],
["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,[false,false]],
["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,[false,false]],
["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,[false,false]],
["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,[false,false]],
["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,[false,false]],
["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,[false,false]],
["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,[false,false]],
["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,[false,false]]
["Land_CampingChair_V1_F",[1.32227,2.07813,8.2016e-005],108.293,[false,true]],
["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,[false,true]],
["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,[false,true]],
["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,[false,true]],
["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,[false,true]],
["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,[false,true]],
["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,[false,true]],
["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,[false,true]],
["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,[false,true]],
["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,[false,true]],
["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,[false,true]],
["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,[false,true]],
["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,[false,true]],
["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,[false,true]],
["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,[false,true]],
["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,[false,true]],
["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,[false,true]],
["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,[false,true]],
["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,[false,true]],
["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,[false,true]],
["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,[false,true]],
["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,[false,true]],
["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,[false,true]],
["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,[false,true]],
["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,[false,true]],
["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,[false,true]],
["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,[false,true]],
["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,[false,true]],
["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,[false,true]],
["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,[false,true]],
["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,[false,true]],
["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,[false,true]],
["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,[false,true]],
["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,[false,true]],
["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,[false,true]],
["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,[false,true]],
["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,[false,true]],
["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,[false,true]],
["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,[false,true]],
["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,[false,true]],
["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,[false,true]],
["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,[false,true]]
]; // list of objects to spawn as landscape
_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.

View File

@ -27,12 +27,12 @@ _missionLandscapeMode = "precise"; // acceptable values are "none","random","pre
_missionLandscape = [
["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,[true,true]],
["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,[true,true]],
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,false]],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,false]],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,false]],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,false]],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,false]],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,false]]
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,true]],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,true]],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,true]],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,true]],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,true]],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,true]]
]; // list of objects to spawn as landscape
_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.

View File

@ -14,12 +14,13 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
_pathBlue = "Blue";
_missionListBlue = ["default"];
//_missionListBlue = ["default","captive1","hostage1"/*,"default2"/*,"medicalCamp","redCamp","resupplyCamp"*/];
//_missionListBlue = ["captive1"];
_missionListBlue = ["default","captive1","hostage1"/*,"default2"/*,"medicalCamp","redCamp","resupplyCamp"*/];
_pathRed = "Red";
//_missionListRed = ["resupplyCamp"];
_missionListRed = [/*"default","default2","medicalCamp",*/"redCamp"/*,"resupplyCamp"*/];
_pathGreen = "Green";
//_missionListGreen = ["resupplyCamp"];
_missionListGreen = [/*"default","default2",/*"redCamp",*//*"resupplyCamp",*/"medicalCamp"];

View File

@ -26,23 +26,23 @@ _markerColor = "ColorGreen";
_markerMissionName = "Medical Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[3,3,0],0,[false,false]],
["Flag_AAF_F",[5,5,0],0,[false,true]],
["Land_dp_transformer_F",[1.698242,-10.4668,-0.00763702],271.32,[true,true]],
["Land_Wreck_BRDM2_F",[1.37012,13.498,0.00109863],184.487,[true,true]],
["Land_BagBunker_Small_F",[18.4512,-3.66406,0.00780487],305.003,[true,true]],
["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,[true,false]],
["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,[true,true]],
["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,[true,true]],
["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,[false,false]],
["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,[false,false]],
["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[false,false]],
["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[false,false]],
["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,[false,false]],
["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,[false,false]],
["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,[false,false]],
["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,[false,false]],
["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,[false,false]],
["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,[false,false]]
["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,[false,true]],
["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,[false,true]],
["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[false,false,true]],
["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[false,false,true]],
["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,[false,true]],
["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,[false,true]],
["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,[false,true]],
["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,[false,true]],
["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,[false,true]],
["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,[false,true]]
]; // list of objects to spawn as landscape
_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.

View File

@ -25,48 +25,48 @@ _markerColor = "ColorGreen";
_markerMissionName = "Bandit Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Land_CampingChair_V1_F",[1.32227,2.07813,8.2016e-005],108.293,[false,false]],
["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,[false,false]],
["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,[false,false]],
["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,[false,false]],
["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,[false,false]],
["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,[false,false]],
["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,[false,false]],
["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,[false,false]],
["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,[false,false]],
["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,[false,false]],
["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,[false,false]],
["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,[false,false]],
["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,[false,false]],
["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,[false,false]],
["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,[false,false]],
["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,[false,false]],
["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,[false,false]],
["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,[false,false]],
["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,[false,false]],
["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,[false,false]],
["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,[false,false]],
["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,[false,false]],
["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,[false,false]],
["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,[false,false]],
["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,[false,false]],
["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,[false,false]],
["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,[false,false]],
["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,[false,false]],
["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,[false,false]],
["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,[false,false]],
["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,[false,false]],
["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,[false,false]],
["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,[false,false]],
["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,[false,false]],
["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,[false,false]],
["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,[false,false]],
["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,[false,false]],
["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,[false,false]],
["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,[false,false]],
["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,[false,false]],
["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,[false,false]],
["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,[false,false]]
["Land_CampingChair_V1_F",[1.32227,2.07813,8.2016e-005],108.293,[false,true]],
["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,[false,true]],
["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,[false,true]],
["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,[false,true]],
["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,[false,true]],
["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,[false,true]],
["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,[false,true]],
["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,[false,true]],
["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,[false,true]],
["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,[false,true]],
["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,[false,true]],
["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,[false,true]],
["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,[false,true]],
["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,[false,true]],
["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,[false,true]],
["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,[false,true]],
["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,[false,true]],
["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,[false,true]],
["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,[false,true]],
["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,[false,true]],
["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,[false,true]],
["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,[false,true]],
["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,[false,true]],
["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,[false,true]],
["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,[false,true]],
["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,[false,true]],
["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,[false,true]],
["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,[false,true]],
["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,[false,true]],
["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,[false,true]],
["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,[false,true]],
["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,[false,true]],
["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,[false,true]],
["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,[false,true]],
["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,[false,true]],
["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,[false,true]],
["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,[false,true]],
["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,[false,true]],
["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,[false,true]],
["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,[false,true]],
["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,[false,true]],
["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,[false,true]]
]; // list of objects to spawn as landscape
_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.

View File

@ -27,12 +27,12 @@ _missionLandscapeMode = "precise"; // acceptable values are "none","random","pre
_missionLandscape = [
["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,[true,true]],
["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,[true,true]],
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,false]],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,false]],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,false]],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,false]],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,false]],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,false]]
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,true]],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,true]],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,true]],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,true]],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,true]],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,true]]
]; // list of objects to spawn as landscape
_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.

View File

@ -25,23 +25,23 @@ _markerColor = "ColorOrange";
_markerMissionName = "Medical Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[3,3,0],0,[false,false]],
["Flag_AAF_F",[5,6,0],0,[false,true]],
["Land_dp_transformer_F",[1.698242,-10.4668,-0.00763702],271.32,[true,true]],
["Land_Wreck_BRDM2_F",[1.37012,13.498,0.00109863],184.487,[true,true]],
["Land_BagBunker_Small_F",[18.4512,-3.66406,0.00780487],305.003,[true,true]],
["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,[true,false]],
["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,[true,true]],
["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,[true,true]],
["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,[false,false]],
["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,[false,false]],
["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[false,false]],
["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[false,false]],
["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,[false,false]],
["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,[false,false]],
["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,[false,false]],
["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,[false,false]],
["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,[false,false]],
["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,[false,false]]
["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,[false,true]],
["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,[false,true]],
["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[false,false,true]],
["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[false,false,true]],
["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,[false,true]],
["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,[false,true]],
["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,[false,true]],
["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,[false,true]],
["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,[false,true]],
["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,[false,true]]
]; // list of objects to spawn as landscape
_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.

View File

@ -25,48 +25,48 @@ _markerColor = "ColorOrange";
_markerMissionName = "Bandit Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Land_CampingChair_V1_F",[1.32227,2.07813,8.2016e-005],108.293,[false,false]],
["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,[false,false]],
["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,[false,false]],
["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,[false,false]],
["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,[false,false]],
["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,[false,false]],
["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,[false,false]],
["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,[false,false]],
["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,[false,false]],
["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,[false,false]],
["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,[false,false]],
["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,[false,false]],
["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,[false,false]],
["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,[false,false]],
["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,[false,false]],
["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,[false,false]],
["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,[false,false]],
["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,[false,false]],
["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,[false,false]],
["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,[false,false]],
["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,[false,false]],
["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,[false,false]],
["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,[false,false]],
["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,[false,false]],
["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,[false,false]],
["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,[false,false]],
["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,[false,false]],
["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,[false,false]],
["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,[false,false]],
["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,[false,false]],
["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,[false,false]],
["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,[false,false]],
["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,[false,false]],
["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,[false,false]],
["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,[false,false]],
["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,[false,false]],
["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,[false,false]],
["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,[false,false]],
["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,[false,false]],
["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,[false,false]],
["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,[false,false]],
["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,[false,false]]
["Land_CampingChair_V1_F",[1.32227,2.07813,8.2016e-005],108.293,[false,true]],
["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,[false,true]],
["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,[false,true]],
["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,[false,true]],
["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,[false,true]],
["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,[false,true]],
["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,[false,true]],
["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,[false,true]],
["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,[false,true]],
["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,[false,true]],
["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,[false,true]],
["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,[false,true]],
["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,[false,true]],
["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,[false,true]],
["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,[false,true]],
["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,[false,true]],
["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,[false,true]],
["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,[false,true]],
["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,[false,true]],
["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,[false,true]],
["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,[false,true]],
["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,[false,true]],
["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,[false,true]],
["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,[false,true]],
["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,[false,true]],
["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,[false,true]],
["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,[false,true]],
["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,[false,true]],
["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,[false,true]],
["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,[false,true]],
["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,[false,true]],
["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,[false,true]],
["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,[false,true]],
["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,[false,true]],
["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,[false,true]],
["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,[false,true]],
["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,[false,true]],
["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,[false,true]],
["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,[false,true]],
["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,[false,true]],
["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,[false,true]],
["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,[false,true]]
]; // list of objects to spawn as landscape
_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.

View File

@ -28,12 +28,12 @@ _missionLandscapeMode = "precise"; // acceptable values are "none","random","pre
_missionLandscape = [
["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,[true,true]],
["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,[true,true]],
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,false]],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,false]],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,false]],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,false]],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,false]],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,false]]
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,true]],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,true]],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,true]],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,true]],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,true]],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,true]]
]; // list of objects to spawn as landscape
_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.

View File

@ -25,42 +25,61 @@ _markerColor = "ColorRed";
_markerMissionName = "Rescue Hostage";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[-10.6914,-10.541,0],0,[true,false]],
["Land_SM_01_shelter_wide_F",[-6.29883,9.57617,0],0,[true,false]],
["Land_ContainerLine_01_F",[-5.54492,40.8184,0],0,[true,false]],
["Land_ContainerLine_01_F",[-6.92578,-38.2188,0],0,[true,false]],
["Land_ContainerLine_01_F",[-65.8438,-28.4023,0],90,[true,false]],
["Land_ContainerLine_01_F",[-66.0664,21.3496,0],90,[true,false]],
["Land_ContainerLine_01_F",[195.047,-23.9395,0],87.9345,[true,false]],
["Land_ContainerLine_01_F",[42.6172,-23.9395,0],90.5197,[true,false]],
["Land_ContainerLine_01_F",[42.8398,27.5977,0],270,[true,false]],
//["B_G_Soldier_AR_F",[-6.74219,-78.625,-0.00143886],0,[true,false]],
//["B_G_Soldier_AR_F",[-86.3281,-5.14453,-0.00143886],0,[true,false]],
//["B_G_Soldier_AR_F",[61.4609,-1.92773,-0.00143838],0,[true,false]],
//["B_G_Soldier_AR_F",[-43.3359,54.0898,-0.00143838],0,[true,false]],
//["B_Soldier_F",[70.5156,-90.3867,-2.75806],0,[true,false]],
//["B_Soldier_F",[70.5156,-90.3867,-2.75806],0,[true,false]],
//["B_MRAP_01_hmg_F",[70.5156,-90.3867,4.76837e-007],0,[true,false]],
//["B_Soldier_F",[-78.834,72.0566,-2.20595],0,[true,false]],
//["B_MRAP_01_F",[-78.834,72.0566,4.76837e-007],0,[true,false]],
["Campfire_burning_F",[-8.68555,-2.57813,0],0,[true,false]],
["Land_ChairPlastic_F",[-2.36719,16.1875,0],0,[true,false]],
["Land_ChairPlastic_F",[-2.99609,13.2813,0],0,[true,false]],
["Land_ChairPlastic_F",[-2.84766,10.3398,0],0,[true,false]],
["Land_ChairPlastic_F",[-3.06055,8.08203,0],0,[true,false]],
["Land_ChairPlastic_F",[-2.70313,5.98047,0],0,[true,false]],
["Land_Stone_4m_F",[-5.71484,21.2051,0],0,[true,false]],
["Land_Stone_4m_F",[-1.30469,21.2266,0],0,[true,false]],
["Land_Stone_4m_F",[-10.1836,21.166,0],0,[true,false]],
["Land_Stone_4m_F",[3.01953,10.2051,0],90.8324,[true,false]],
["Land_Stone_4m_F",[2.97656,5.79492,0],90.8324,[true,false]],
["Land_Stone_4m_F",[3.04492,14.6738,0],90.8324,[true,false]],
["Land_Stone_4m_F",[-6.16992,-0.855469,0],0,[true,false]],
["Land_Stone_4m_F",[-1.75977,-0.833984,0],0,[true,false]],
["Land_Stone_4m_F",[-10.6387,-0.894531,0],0,[true,false]],
["Land_Stone_4m_F",[-15.4609,9.93164,0],90.8324,[true,false]],
["Land_Stone_4m_F",[-15.5039,5.52148,0],90.8324,[true,false]],
["Land_Stone_4m_F",[-15.4355,14.4004,0],90.8324,[true,false]]
["Flag_AAF_F",[0.935547,-24.3027,0],0,[true,false]],
["Land_SM_01_shelter_wide_F",[0.298828,4.63867,0],0,[true,false]],
["Campfire_burning_F",[-2.08789,-7.51563,0],0,[true,false]],
["Land_Stone_8m_F",[-10.0313,-6.46875,0],268.936,[true,false]],
["Land_Stone_8m_F",[-10.2402,1.90039,0],268.936,[true,false]],
["Land_Stone_8m_F",[-10.3984,10.1035,0],268.936,[true,false]],
["Land_Stone_8m_F",[10.125,-4.10156,0],270,[true,false]],
["Land_Stone_8m_F",[10.0723,4.26953,0],270,[true,false]],
["Land_Stone_8m_F",[10.0664,12.4746,0],270,[true,false]],
["Land_Stone_8m_F",[7.95117,20.252,0],0,[true,false]],
["Land_Stone_8m_F",[-0.314453,20.2656,0],0,[true,false]],
["Land_Stone_8m_F",[-8.54102,20.3066,0],0,[true,false]],
["Land_Stone_8m_F",[8.16016,-15.1113,0],0,[true,false]],
["Land_Stone_8m_F",[-0.105469,-15.0977,0],0,[true,false]],
["Land_Stone_8m_F",[-8.33203,-15.0566,0],0,[true,false]],
["Land_HBarrierWall6_F",[-50.875,38.2676,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-50.3516,21.4355,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-50.6055,29.8965,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-49.4141,1.33203,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-49.918,13.0254,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-48.5371,-15.6992,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-49.0938,-7.12305,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-47.7773,-28.3535,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[-47.1641,-36.5547,0],89.1786,[true,false]],
["Land_HBarrierWall6_F",[50.0566,-17.4785,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[50.1484,-25.9414,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[49.5039,2.64063,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[49.7852,-9.06055,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[48.9531,19.6855,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[49.3457,11.0996,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[48.4355,32.3516,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[47.9785,40.5625,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[50.2598,-34.3164,0],270.274,[true,false]],
["Land_HBarrierWall6_F",[44.7031,55.5176,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[27.8652,55.1797,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[36.3281,55.3418,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[7.75195,54.4629,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[19.4512,54.8379,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-9.28711,53.7734,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-0.705078,54.2363,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-21.9492,53.1523,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-30.1563,52.6289,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-38.5195,52.3809,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-46.9727,52.0313,0],179.807,[true,false]],
["Land_HBarrierWall6_F",[-44.418,-50.7617,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[-27.5898,-50.1348,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[-36.0488,-50.4434,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[-7.49023,-49.0723,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[-19.1816,-49.6484,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[9.5332,-48.0918,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[0.960938,-48.7012,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[22.1836,-47.252,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[30.3809,-46.5879,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[38.6406,-46.1328,0],358.823,[true,false]],
["Land_HBarrierWall6_F",[47.0762,-45.5215,0],358.823,[true,false]]
]; // list of objects to spawn as landscape; // list of objects to spawn as landscape
_hostageConfig = ["C_man_polo_6_F",

View File

@ -25,17 +25,17 @@ _markerColor = "ColorRed";
_markerMissionName = "Medical Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[0,0,0],0,[false,false]],
["Flag_AAF_F",[6,5,0],0,[false,true]],
["Land_dp_transformer_F",[1.698242,-10.4668,-0.00763702],271.32,[true,true]],
["Land_Wreck_BRDM2_F",[1.37012,13.498,0.00109863],184.487,[true,true]],
["Land_BagBunker_Small_F",[18.4512,-3.66406,0.00780487],305.003,[true,true]],
["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,[true,true]],
["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,[true,false]],
["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,[true,true]],
["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,[true,true]],
["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,[false,true]],
["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,[false,true]],
["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[false,true]],
["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[false,true]],
["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[false,false,true]],
["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[false,false,true]],
["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,[false,true]],
["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,[false,true]],
["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,[false,true]],

View File

@ -26,7 +26,6 @@ _markerColor = "ColorRed";
_markerMissionName = "Bandit Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[0,0,0],0,[false,false]],
["Land_CampingChair_V1_F",[1.32227,2.07813,8.2016e-005],108.293,[false,true]],
["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,[false,true]],
["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,[false,true]],

View File

@ -1,18 +0,0 @@
/*
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];
[blck_sm_Aircraft,_aircraftPatrol] call blck_fnc_sm_AddGroupToArray;
//diag_log format["_sm_addAircraft: updated blck_sm_Aircraft = %1",blck_sm_Aircraft];
true

View File

@ -1,17 +0,0 @@
/*
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];
[blck_sm_Emplaced,_emplacedWeapon] call blck_fnc_sm_AddGroupToArray;
//diag_log format["_sm_AddEmplaced::-> _emplacedWeapon = %1, blck_sm_Emplaced = %2",_emplacedWeapon,blck_sm_Emplaced];
true

View File

@ -1,18 +0,0 @@
/*
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];
[blck_sm_Groups,_group] call blck_fnc_sm_AddGroupToArray;
//diag_log format["_sm_AddGroup:: blck_sm_Groups = %1",blck_sm_Groups];
true

View File

@ -1,16 +0,0 @@
/*
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];
[blck_sm_Vehicles,_vehicle] call blck_fnc_sm_AddGroupToArray;
true

View File

@ -9,7 +9,7 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
diag_log "[blckeagls] GMS_fnc_sm_init_functions.sqf <Defining Variables and Compiling Functions>";
//diag_log "[blckeagls] GMS_fnc_sm_init_functions.sqf <Defining Variables and Compiling Functions>";
//blck_sm_Groups = [];
blck_sm_Infantry = [];
blck_sm_Vehicles = [];
@ -52,6 +52,6 @@ blck_fnc_sm_spawnLootContainers = compileFinal preprocessFileLineNumbers "\q\ad
blck_fnc_sm_spawnObjects = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnObjects.sqf";
blck_fnc_sm_spawnVehiclePatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnVehiclePatrols.sqf";
diag_log "[blckeagls] GMS_sm_init_functions.sqf <Variables Defined and Functions Loaded>";
//diag_log "[blckeagls] GMS_sm_init_functions.sqf <Variables Defined and Functions Loaded>";
blck_sm_functionsLoaded = true;

View File

@ -45,8 +45,7 @@ _sm_groups = +blck_sm_Aircraft;
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;

View File

@ -13,7 +13,7 @@ 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"];
_x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"];
//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];
@ -45,6 +45,7 @@ _sm_groups = +blck_sm_Emplaced;
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
// params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]]];
private _return = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray;
_group = group( (_return select 1) select 0);
_timesSpawned = _timesSpawned + 1;
@ -77,7 +78,7 @@ _sm_groups = +blck_sm_Emplaced;
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
diag_log format["_fnc_monitorEmplaced: despanwing patrol for _element %1",_element];
//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;

View File

@ -14,7 +14,7 @@ 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"];
_x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"];
//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];

View File

@ -14,7 +14,7 @@ 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"];
_x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"];
//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];

View File

@ -1,300 +0,0 @@
/*
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";
_fnc_updateGroupSpawnTimerFields = {
diag_log format["_fnc_updateGroupSpawnTimerFields::-> _this = %1",_this];
params["_array","_element",["_group",grpNull],["_spawnedAt",0]];
private _index = _array find _element;
_element set[1,_group];
_element set[2,_spawnedAt];
_array set[_index,_element];
};
private _triggerRange = 1000;
_fnc_evaluateSpawnedGroups = {
params["_patrolsArray"];
private _localpatrolsArray = +_patrolsArray;
{
// _x = [ [[22819.4,16929.5,5.33892],""red"",4,75,30], R Alpha 1-1,-1,0]"
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
// [[22819.4,16929.5,5.33892],""red"",4,75,30]
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
diag_log format["_fnc_evaluateSpawnedGroups: _x = %1",_x];
diag_log format["_fnc_evaluateSpawnedGroups: units alive in group %1 = %2",_group, {alive _x} count (units _group)];
diag_log format["_fnc_evaluateSpawnedGroups: _respawnInterval = %1",_respawnInterval];
if (_spawnedAt > 0) then
{
if (({alive _x} count (units _group) == 0)) then
{
diag_log format["all units in patrol %1 are dead | _respawnInterval = %2",_x,_respawnInterval];
if ((_respawnInterval != 0)) then // a group was spawned and all units are dead and we should respawn them after a certain interval
{
//[_patrolsArray,_x,grpNull,0,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupRepawnTimerFields;
private _index = _patrolsArray find _element;
private _element = _x;
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
diag_log format["_fnc_evaluateSpawnedGroups | element updated to %1",_element];
diag_log format["_fnc_evaluateSpawnedGroups: _patrolsArray updated to %1",_patrolsArray];
};
if (_respawnInterval == 0) then // a group was spawned and all units are dead but we should not do a respawn
{
_patrolsArray deleteAt (_patrolsArray find _x);
diag_log format["patrol %1 deleted from static patrol cue",_x];
};
};
if ({alive _x} count (units _group) > 0) then
{
// Case where a player is near and we need to update the time stamp.
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
private _index = _patrolsArray find _x;
_x set[4, diag_tickTime];
_patrolsArray set[_index,_x];
diag_log format["player near static group for element %1 timestamp updated to %2",_x, _x select 4];
} else {
// Case where no player is near and we need to test if the patrol should be de-spawned.
if ((diag_tickTime - _lastTimePlayerNear) > blck_sm_groupDespawnTime) then
{
diag_log format["despawning static group %1",_x];
private _index = _patrolsArray find _x;
_groupParameters set[2,{alive _x} count (units _group)];
_element = _x;
_element set[0,_groupParameters];
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
{
if (vehicle _x != _x) then {[vehicle _x] call blck_fnc_deleteAIVehicle};
[_x] call blck_fnc_deleteAI;
} forEach (units _group);
};
};
};
};
} forEach _localpatrolsArray;
};
blck_sm_monitoring = 1;
_sm_groups = +blck_sm_Groups;
{
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorStaticUnits::Group spawning routine:: _units = %1 | _x = %2 |_forEachIndex = %3",_units,_x,_forEachIndex];
//private _groupSpawned = false;
//diag_log format["there are %1 players in range",{_pos distance2D _x < _triggerRange} count allPlayers];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
diag_log format["testing if patrol %1 should be spawned | _spawnedAt = %2",_x,_spawnedAt];
diag_log format["_spawnedAt = %1 | _respawnAt = %2 | _respawnInterval = %3",_spawnedAt,_respawnAt, _respawnInterval];
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnInterval > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static group spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static group spawner] _units = %1 and _numAI = %2",_units,_numAI];
// // params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_group = [_pos,_pos,_numAI,_numAI,_difficulty,_patrolRadius-2,_patrolRadius,true] call blck_fnc_spawnGroup;
//diag_log format["[blckeagls static group spawner] _group %1",_group];
[blck_sm_Groups,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
};
};
}forEach _sm_groups;
[blck_sm_Groups] call _fnc_evaluateSpawnedGroups;
_sm_scubaGroups = +blck_sm_scubaGroups;
{
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, _respawnInterval, _group, _spawnAt]
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorScubaUnits:: _group = %1 | _x = %2 |_forEachIndex = %3",_group,_x,_forEachIndex];
private _groupSpawned = false;
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static scubaGroup spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static scubaGroup spawning routine] _units = %1 and _numAI = %2",_units,_numAI];
//params["_pos", "_numUnits", ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_UMS_uniforms], ["_headGear",blck_UMS_headgear],["_configureWaypoints",true],["_weapons",blck_UMS_weapons],["_vests",blck_UMS_vests]];
_group = [_pos,_difficulty,_units,_patrolRadius] call blck_fnc_spawnScubaGroup;
//diag_log format["[blckeagls static scubaGroup spawner] _group %1",_group];
[blck_sm_scubaGroups,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnInterval > 0)) then // a group was spawned and all units are dead and we should rspawn them after a certain interval
{
[blck_sm_scubaGroups,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set scubaGroup respawn time step :: blck_sm_Groups updated to %1",blck_sm_scubaGroups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead but we should not do a respawn
{
blck_sm_scubaGroups deleteAt (blck_sm_scubaGroups find _x);
};
};
}forEach _sm_scubaGroups;
_sm_Emplaced = +blck_sm_Emplaced;
{
// ["B_G_Mortar_01_F",[22944.3,16820.5,3.14243],"green",0,0,_group,_spawnAt]
//diag_log format["_sm_monitorEmplacedUnits::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static Emplaced spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
// params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols]];
_group = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray;
[blck_sm_Emplaced,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Emplaced,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0)) then // a group was spawned and all units are dead
{
blck_sm_Emplaced deleteAt (blck_sm_Emplaced find _x);
};
}forEach _sm_Emplaced;
_sm_Vehicles = +blck_sm_Vehicles;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
//diag_log format["_sm_monitorVehicles::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//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]];
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
// _return = [_vehicles, _missionAI, _abort];
_group = group (_return select 1 select 0);
[blck_sm_Vehicles,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Vehicles,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_Vehicles deleteAt (blck_sm_Vehicles find _x);
};
}forEach _sm_Vehicles;
_sm_surfaceVehicles = +blck_sm_surfaceShips;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
[_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_surfaceShips,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_surfaceShips,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_surfaceShips deleteAt (blck_sm_surfaceShips find _x);
};
}forEach _sm_surfaceVehicles;
_sm_SDVVehicles = +blck_sm_submarines;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static sub patrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
//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]];
_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;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_submarines,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_submarines,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_submarines deleteAt (blck_sm_submarines find _x);
};
}forEach _sm_SDVVehicles;
_sm_Aircraft = +blck_sm_Aircraft;
{
// ["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,0],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_aircraftType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
_weapon = [toLower _difficulty] call blck_fnc_selectAILoadout;
//params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]]]
//diag_log format["[blckeagls static aircraftePatrol spawner] _weapon = %1 and _difficulty = %2",_weapon,_difficulty];
_return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli; // Allow the spawner to fit the default AI Loadouts for blckeagls; revisit at a later time when custom uniforms are set up for these AI.
//diag_log format["[blckeagls] static aircraftePatrol spawner -> _return = %1",_return];
_return params ["_patrolHeli","_ai","_abort"];
_group = group (_ai select 0);
[blck_sm_Aircraft,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
};
if ( (isNull _group) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Aircraft,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_Aircraft deleteAt (blck_sm_Aircraft find _x);
};
}forEach _sm_Aircraft;
blck_sm_monitoring = 0;

View File

@ -1,325 +0,0 @@
/*
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";
_fnc_updateGroupSpawnTimerFields = {
diag_log format["_fnc_updateGroupSpawnTimerFields::-> _this = %1",_this];
params["_array","_element",["_group",grpNull],["_spawnedAt",0]];
private _index = _array find _element;
_element set[1,_group];
_element set[2,_spawnedAt];
_array set[_index,_element];
};
private _triggerRange = 1000;
_fnc_evaluateSpawnedGroups = {
params["_aiType","_patrolsArray"];
private _localpatrolsArray = +_patrolsArray;
{
// _x = [ [[22819.4,16929.5,5.33892],""red"",4,75,30], R Alpha 1-1,-1,0]"
diag_log format["_fnc_evaluateSpawnedGroups: _x = %1",_x];
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
if !(isNull _group) then
{
// [[22819.4,16929.5,5.33892],""red"",4,75,30]
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
diag_log format["_fnc_evaluateSpawnedGroups: typeName _groupParameters select 0 = %1",typeName (_groupParameters select 0)];
private["_pos","_difficulty","_units","_patrolRadius","_respawnInterval","_vehicleType"];
if (_aiType isEqualTo "onFoot") then {
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"]
_pos = _groupParameters select 0;
_difficulty = _groupParameters select 1;
_units = _groupParameters select 2;
_patrolRadius = _groupParameters select 3;
_respawnInterval = _groupParameters select 4;
};
if (_aiType isEqualTo "inVehicle") then
{
//_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnInterval"]};
_vehicleType = _groupParameters select 0;
_pos = _groupParameters select 1;
_difficulty = _groupParameters select 2;
_patrolRadius = _groupParameters select 3;
_respawnInterval = _groupParameters select 4;
};
diag_log format["_fnc_evaluateSpawnedGroups: _groupParameters = %1",_groupParameters];
diag_log format["_fnc_evaluateSpawnedGroups: _pos = %1 | _difficulty = %2 | _patrolRadius = %3 | _respawnInterval = %4",_pos,_difficulty,_patrolRadius,_respawnInterval];
diag_log format["_fnc_evaluateSpawnedGroups: units alive in group %1 = %2",_group, {alive _x} count (units _group)];
//diag_log format["_fnc_evaluateSpawnedGroups: _respawnInterval = %1",_respawnInterval];
if (_spawnedAt > 0) then
{
if (({alive _x} count (units _group) == 0)) then
{
diag_log format["all units in patrol %1 are dead | _respawnInterval = %2",_x,_respawnInterval];
if ((_respawnInterval != 0)) then // a group was spawned and all units are dead and we should respawn them after a certain interval
{
//[_patrolsArray,_x,grpNull,0,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupRepawnTimerFields;
private _index = _patrolsArray find _element;
private _element = _x;
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
diag_log format["_fnc_evaluateSpawnedGroups | element updated to %1",_element];
diag_log format["_fnc_evaluateSpawnedGroups: _patrolsArray updated to %1",_patrolsArray];
};
if (_respawnInterval == 0) then // a group was spawned and all units are dead but we should not do a respawn
{
_patrolsArray deleteAt (_patrolsArray find _x);
diag_log format["patrol %1 deleted from static patrol cue",_x];
};
};
if ({alive _x} count (units _group) > 0) then
{
// Case where a player is near and we need to update the time stamp.
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
private _index = _patrolsArray find _x;
_x set[4, diag_tickTime];
_patrolsArray set[_index,_x];
diag_log format["player near static group for element %1 timestamp updated to %2",_x, _x select 4];
} else {
// Case where no player is near and we need to test if the patrol should be de-spawned.
if ((diag_tickTime - _lastTimePlayerNear) > blck_sm_groupDespawnTime) then
{
diag_log format["despawning static group %1",_x];
private _index = _patrolsArray find _x;
_groupParameters set[2,{alive _x} count (units _group)];
_element = _x;
_element set[0,_groupParameters];
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
{
if (vehicle _x != _x) then {[vehicle _x] call blck_fnc_deleteAIVehicle};
[_x] call blck_fnc_deleteAI;
} forEach (units _group);
};
};
};
};
};
} forEach _localpatrolsArray;
};
blck_sm_monitoring = 1;
_sm_groups = +blck_sm_Groups;
{
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorStaticUnits::Group spawning routine:: _units = %1 | _x = %2 |_forEachIndex = %3",_units,_x,_forEachIndex];
//private _groupSpawned = false;
//diag_log format["there are %1 players in range",{_pos distance2D _x < _triggerRange} count allPlayers];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
diag_log format["testing if patrol %1 should be spawned | _spawnedAt = %2",_x,_spawnedAt];
diag_log format["_spawnedAt = %1 | _respawnAt = %2 | _respawnInterval = %3",_spawnedAt,_respawnAt, _respawnInterval];
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnInterval > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static group spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static group spawner] _units = %1 and _numAI = %2",_units,_numAI];
// // params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_group = [_pos,_pos,_numAI,_numAI,_difficulty,_patrolRadius-2,_patrolRadius,true] call blck_fnc_spawnGroup;
diag_log format["[blckeagls static group spawner] _group %1",_group];
[blck_sm_Groups,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
};
};
}forEach _sm_groups;
["onFoot",blck_sm_Groups] call _fnc_evaluateSpawnedGroups;
_sm_scubaGroups = +blck_sm_scubaGroups;
{
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, _respawnInterval, _group, _spawnAt]
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorScubaUnits:: _group = %1 | _x = %2 |_forEachIndex = %3",_group,_x,_forEachIndex];
private _groupSpawned = false;
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static scubaGroup spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static scubaGroup spawning routine] _units = %1 and _numAI = %2",_units,_numAI];
//params["_pos", "_numUnits", ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_UMS_uniforms], ["_headGear",blck_UMS_headgear],["_configureWaypoints",true],["_weapons",blck_UMS_weapons],["_vests",blck_UMS_vests]];
_group = [_pos,_difficulty,_units,_patrolRadius] call blck_fnc_spawnScubaGroup;
//diag_log format["[blckeagls static scubaGroup spawner] _group %1",_group];
[blck_sm_scubaGroups,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnInterval > 0)) then // a group was spawned and all units are dead and we should rspawn them after a certain interval
{
[blck_sm_scubaGroups,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set scubaGroup respawn time step :: blck_sm_Groups updated to %1",blck_sm_scubaGroups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead but we should not do a respawn
{
blck_sm_scubaGroups deleteAt (blck_sm_scubaGroups find _x);
};
};
}forEach _sm_scubaGroups;
_sm_Emplaced = +blck_sm_Emplaced;
{
// ["B_G_Mortar_01_F",[22944.3,16820.5,3.14243],"green",0,0,_group,_spawnAt]
//diag_log format["_sm_monitorEmplacedUnits::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static Emplaced spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
// params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols]];
_group = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray;
[blck_sm_Emplaced,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Emplaced,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0)) then // a group was spawned and all units are dead
{
blck_sm_Emplaced deleteAt (blck_sm_Emplaced find _x);
};
}forEach _sm_Emplaced;
_sm_Vehicles = +blck_sm_Vehicles;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
//diag_log format["_sm_monitorVehicles::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//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]];
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
// _return = [_vehicles, _missionAI, _abort];
_group = group (_return select 1 select 0);
[blck_sm_Vehicles,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Vehicles,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_Vehicles deleteAt (blck_sm_Vehicles find _x);
};
}forEach _sm_Vehicles;
_sm_surfaceVehicles = +blck_sm_surfaceShips;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
[_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_surfaceShips,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_surfaceShips,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_surfaceShips deleteAt (blck_sm_surfaceShips find _x);
};
}forEach _sm_surfaceVehicles;
_sm_SDVVehicles = +blck_sm_submarines;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static sub patrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
//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]];
_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;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_submarines,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_submarines,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_submarines deleteAt (blck_sm_submarines find _x);
};
}forEach _sm_SDVVehicles;
_sm_Aircraft = +blck_sm_Aircraft;
{
// ["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,0],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_aircraftType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
_weapon = [toLower _difficulty] call blck_fnc_selectAILoadout;
//params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]]]
//diag_log format["[blckeagls static aircraftePatrol spawner] _weapon = %1 and _difficulty = %2",_weapon,_difficulty];
_return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli; // Allow the spawner to fit the default AI Loadouts for blckeagls; revisit at a later time when custom uniforms are set up for these AI.
//diag_log format["[blckeagls] static aircraftePatrol spawner -> _return = %1",_return];
_return params ["_patrolHeli","_ai","_abort"];
_group = group (_ai select 0);
[blck_sm_Aircraft,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
};
if ( (isNull _group) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Aircraft,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_Aircraft deleteAt (blck_sm_Aircraft find _x);
};
}forEach _sm_Aircraft;
blck_sm_monitoring = 0;

View File

@ -1,321 +0,0 @@
/*
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";
#define onFoot 1
#define inVehicle 2
_fnc_updateGroupSpawnTimerFields = {
diag_log format["_fnc_updateGroupSpawnTimerFields::-> _this = %1",_this];
params["_array","_element",["_group",grpNull],["_spawnedAt",0]];
private _index = _array find _element;
_element set[1,_group];
_element set[2,_spawnedAt];
_array set[_index,_element];
};
private _triggerRange = 1000;
_fnc_evaluateSpawnedGroups = {
params["_aiType","_patrolsArray"];
private _localpatrolsArray = +_patrolsArray;
{
// _x = [ [[22819.4,16929.5,5.33892],""red"",4,75,30], R Alpha 1-1,-1,0]"
diag_log format["_fnc_evaluateSpawnedGroups: _x = %1",_x];
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
if !(isNull _group) then
{
// [[22819.4,16929.5,5.33892],""red"",4,75,30]
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
diag_log format["_fnc_evaluateSpawnedGroups: typeName _groupParameters select 0 = %1",typeName (_groupParameters select 0)];
private["_pos","_difficulty","_units","_patrolRadius","_respawnInterval","_vehicleType"];
if (_aiType isEqualTo onFoot) then {
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"]
_pos = _groupParameters select 0;
_difficulty = _groupParameters select 1;
_units = _groupParameters select 2;
_patrolRadius = _groupParameters select 3;
_respawnInterval = _groupParameters select 4;
};
if (_aiType isEqualTo inVehicle) then
{
//_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnInterval"]};
_vehicleType = _groupParameters select 0;
_pos = _groupParameters select 1;
_difficulty = _groupParameters select 2;
_patrolRadius = _groupParameters select 3;
_respawnInterval = _groupParameters select 4;
};
diag_log format["_fnc_evaluateSpawnedGroups: _groupParameters = %1",_groupParameters];
diag_log format["_fnc_evaluateSpawnedGroups: _pos = %1 | _difficulty = %2 | _patrolRadius = %3 | _respawnInterval = %4",_pos,_difficulty,_patrolRadius,_respawnInterval];
diag_log format["_fnc_evaluateSpawnedGroups: units alive in group %1 = %2",_group, {alive _x} count (units _group)];
//diag_log format["_fnc_evaluateSpawnedGroups: _respawnInterval = %1",_respawnInterval];
if (_spawnedAt > 0) then
{
if (({alive _x} count (units _group) == 0)) then
{
diag_log format["all units in patrol %1 are dead | _respawnInterval = %2",_x,_respawnInterval];
if ((_respawnInterval != 0)) then // a group was spawned and all units are dead and we should respawn them after a certain interval
{
//[_patrolsArray,_x,grpNull,0,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupRepawnTimerFields;
private _index = _patrolsArray find _element;
private _element = _x;
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
diag_log format["_fnc_evaluateSpawnedGroups | element updated to %1",_element];
diag_log format["_fnc_evaluateSpawnedGroups: _patrolsArray updated to %1",_patrolsArray];
};
if (_respawnInterval == 0) then // a group was spawned and all units are dead but we should not do a respawn
{
_patrolsArray deleteAt (_patrolsArray find _x);
diag_log format["patrol %1 deleted from static patrol cue",_x];
};
};
if ({alive _x} count (units _group) > 0) then
{
// Case where a player is near and we need to update the time stamp.
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
private _index = _patrolsArray find _x;
_x set[4, diag_tickTime];
_patrolsArray set[_index,_x];
diag_log format["player near static group for element %1 timestamp updated to %2",_x, _x select 4];
} else {
// Case where no player is near and we need to test if the patrol should be de-spawned.
if ((diag_tickTime - _lastTimePlayerNear) > blck_sm_groupDespawnTime) then
{
diag_log format["despawning static group %1",_x];
private _index = _patrolsArray find _x;
_groupParameters set[2,{alive _x} count (units _group)];
_element = _x;
_element set[0,_groupParameters];
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
{
if (vehicle _x != _x) then {[vehicle _x] call blck_fnc_deleteAIVehicle};
[_x] call blck_fnc_deleteAI;
} forEach (units _group);
};
};
};
};
};
} forEach _localpatrolsArray;
};
blck_sm_monitoring = 1;
_sm_groups = +blck_sm_Groups;
{
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorStaticUnits::Group spawning routine:: _units = %1 | _x = %2 |_forEachIndex = %3",_units,_x,_forEachIndex];
//private _groupSpawned = false;
//diag_log format["there are %1 players in range",{_pos distance2D _x < _triggerRange} count allPlayers];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
//diag_log format["testing if patrol %1 should be spawned | _spawnedAt = %2",_x,_spawnedAt];
//diag_log format["_spawnedAt = %1 | _respawnAt = %2 | _respawnInterval = %3",_spawnedAt,_respawnAt, _respawnInterval];
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnInterval > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static group spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static group spawner] _units = %1 and _numAI = %2",_units,_numAI];
// // params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_group = [_pos,_pos,_numAI,_numAI,_difficulty,_patrolRadius-2,_patrolRadius,true] call blck_fnc_spawnGroup;
//diag_log format["[blckeagls static group spawner] _group %1",_group];
[blck_sm_Groups,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
};
};
}forEach _sm_groups;
[onFoot,blck_sm_Groups] call _fnc_evaluateSpawnedGroups;
_sm_Vehicles = +blck_sm_Vehicles;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
//diag_log format["_sm_monitorVehicles::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//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]];
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
// _return = [_vehicles, _missionAI, _abort];
_group = group (_return select 1 select 0);
[blck_sm_Vehicles,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
}forEach _sm_Vehicles;
[inVehicle,blck_sm_Vehicles] call _fnc_evaluateSpawnedGroups;
_sm_scubaGroups = +blck_sm_scubaGroups;
{
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, _respawnInterval, _group, _spawnAt]
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorScubaUnits:: _group = %1 | _x = %2 |_forEachIndex = %3",_group,_x,_forEachIndex];
private _groupSpawned = false;
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static scubaGroup spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static scubaGroup spawning routine] _units = %1 and _numAI = %2",_units,_numAI];
//params["_pos", "_numUnits", ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_UMS_uniforms], ["_headGear",blck_UMS_headgear],["_configureWaypoints",true],["_weapons",blck_UMS_weapons],["_vests",blck_UMS_vests]];
_group = [_pos,_difficulty,_units,_patrolRadius] call blck_fnc_spawnScubaGroup;
//diag_log format["[blckeagls static scubaGroup spawner] _group %1",_group];
[blck_sm_scubaGroups,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnInterval > 0)) then // a group was spawned and all units are dead and we should rspawn them after a certain interval
{
[blck_sm_scubaGroups,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set scubaGroup respawn time step :: blck_sm_Groups updated to %1",blck_sm_scubaGroups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead but we should not do a respawn
{
blck_sm_scubaGroups deleteAt (blck_sm_scubaGroups find _x);
};
};
}forEach _sm_scubaGroups;
_sm_Emplaced = +blck_sm_Emplaced;
{
// ["B_G_Mortar_01_F",[22944.3,16820.5,3.14243],"green",0,0,_group,_spawnAt]
//diag_log format["_sm_monitorEmplacedUnits::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static Emplaced spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
// params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols]];
_group = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray;
[blck_sm_Emplaced,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Emplaced,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0)) then // a group was spawned and all units are dead
{
blck_sm_Emplaced deleteAt (blck_sm_Emplaced find _x);
};
}forEach _sm_Emplaced;
_sm_surfaceVehicles = +blck_sm_surfaceShips;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
[_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_surfaceShips,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_surfaceShips,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_surfaceShips deleteAt (blck_sm_surfaceShips find _x);
};
}forEach _sm_surfaceVehicles;
_sm_SDVVehicles = +blck_sm_submarines;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static sub patrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
//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]];
_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;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_submarines,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_submarines,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_submarines deleteAt (blck_sm_submarines find _x);
};
}forEach _sm_SDVVehicles;
_sm_Aircraft = +blck_sm_Aircraft;
{
// ["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,0],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_aircraftType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
_weapon = [toLower _difficulty] call blck_fnc_selectAILoadout;
//params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]]]
//diag_log format["[blckeagls static aircraftePatrol spawner] _weapon = %1 and _difficulty = %2",_weapon,_difficulty];
_return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli; // Allow the spawner to fit the default AI Loadouts for blckeagls; revisit at a later time when custom uniforms are set up for these AI.
//diag_log format["[blckeagls] static aircraftePatrol spawner -> _return = %1",_return];
_return params ["_patrolHeli","_ai","_abort"];
_group = group (_ai select 0);
[blck_sm_Aircraft,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
};
if ( (isNull _group) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Aircraft,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_Aircraft deleteAt (blck_sm_Aircraft find _x);
};
}forEach _sm_Aircraft;
blck_sm_monitoring = 0;

View File

@ -1,290 +0,0 @@
/*
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";
#define onFoot 1
#define inVehicle 2
_fnc_updateGroupSpawnTimerFields = {
diag_log format["_fnc_updateGroupSpawnTimerFields::-> _this = %1",_this];
params["_array","_element",["_group",grpNull],["_spawnedAt",0]];
private _index = _array find _element;
_element set[1,_group];
_element set[2,_spawnedAt];
_array set[_index,_element];
};
private _triggerRange = 1000;
_fnc_evaluateSpawnedGroups = {
params["_aiType","_patrolsArray"];
private _localpatrolsArray = +_patrolsArray;
{
// _x = [ [[22819.4,16929.5,5.33892],""red"",4,75,30], R Alpha 1-1,-1,0]"
diag_log format["_fnc_evaluateSpawnedGroups: _x = %1",_x];
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
if !(isNull _group) then
{
// [[22819.4,16929.5,5.33892],""red"",4,75,30]
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["_fnc_evaluateSpawnedGroups: typeName _groupParameters select 0 = %1",typeName (_groupParameters select 0)];
private["_pos","_difficulty","_units","_patrolRadius","_respawnInterval","_vehicleType"];
if (_aiType isEqualTo onFoot) then {
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"]
_pos = _groupParameters select 0;
_difficulty = _groupParameters select 1;
_units = _groupParameters select 2;
_patrolRadius = _groupParameters select 3;
_respawnInterval = _groupParameters select 4;
};
if (_aiType isEqualTo inVehicle) then
{
//_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnInterval"]};
_vehicleType = _groupParameters select 0;
_pos = _groupParameters select 1;
_difficulty = _groupParameters select 2;
_patrolRadius = _groupParameters select 3;
_respawnInterval = _groupParameters select 4;
};
//diag_log format["_fnc_evaluateSpawnedGroups: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_evaluateSpawnedGroups: _pos = %1 | _difficulty = %2 | _patrolRadius = %3 | _respawnInterval = %4",_pos,_difficulty,_patrolRadius,_respawnInterval];
//diag_log format["_fnc_evaluateSpawnedGroups: units alive in group %1 = %2",_group, {alive _x} count (units _group)];
//diag_log format["_fnc_evaluateSpawnedGroups: _respawnInterval = %1",_respawnInterval];
if (_spawnedAt > 0) then
{
if (({alive _x} count (units _group) == 0)) then
{
diag_log format["all units in patrol %1 are dead | _respawnInterval = %2",_x,_respawnInterval];
if ((_respawnInterval != 0)) then // a group was spawned and all units are dead and we should respawn them after a certain interval
{
//[_patrolsArray,_x,grpNull,0,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupRepawnTimerFields;
private _index = _patrolsArray find _element;
private _element = _x;
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
diag_log format["_fnc_evaluateSpawnedGroups | element updated to %1",_element];
diag_log format["_fnc_evaluateSpawnedGroups: _patrolsArray updated to %1",_patrolsArray];
};
if (_respawnInterval == 0) then // a group was spawned and all units are dead but we should not do a respawn
{
_patrolsArray deleteAt (_patrolsArray find _x);
diag_log format["patrol %1 deleted from static patrol cue",_x];
};
};
if ({alive _x} count (units _group) > 0) then
{
// Case where a player is near and we need to update the time stamp.
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
private _index = _patrolsArray find _x;
_x set[4, diag_tickTime];
_patrolsArray set[_index,_x];
diag_log format["player near static group for element %1 timestamp updated to %2",_x, _x select 4];
} else {
// Case where no player is near and we need to test if the patrol should be de-spawned.
if ((diag_tickTime - _lastTimePlayerNear) > blck_sm_groupDespawnTime) then
{
diag_log format["despawning static group %1",_x];
private _index = _patrolsArray find _x;
_groupParameters set[2,{alive _x} count (units _group)];
_element = _x;
_element set[0,_groupParameters];
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
{
if (vehicle _x != _x) then {[vehicle _x] call blck_fnc_deleteAIVehicle};
[_x] call blck_fnc_deleteAI;
} forEach (units _group);
};
};
};
};
};
} forEach _localpatrolsArray;
};
blck_sm_monitoring = 1;
_sm_groups = +blck_sm_Groups;
{
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorStaticUnits::Group spawning routine:: _units = %1 | _x = %2 |_forEachIndex = %3",_units,_x,_forEachIndex];
//private _groupSpawned = false;
//diag_log format["there are %1 players in range",{_pos distance2D _x < _triggerRange} count allPlayers];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
//diag_log format["testing if patrol %1 should be spawned | _spawnedAt = %2",_x,_spawnedAt];
//diag_log format["_spawnedAt = %1 | _respawnAt = %2 | _respawnInterval = %3",_spawnedAt,_respawnAt, _respawnInterval];
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnInterval > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static group spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static group spawner] _units = %1 and _numAI = %2",_units,_numAI];
// // params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_group = [_pos,_pos,_numAI,_numAI,_difficulty,_patrolRadius-2,_patrolRadius,true] call blck_fnc_spawnGroup;
//diag_log format["[blckeagls static group spawner] _group %1",_group];
[blck_sm_Groups,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
};
};
}forEach _sm_groups;
[onFoot,blck_sm_Groups] call _fnc_evaluateSpawnedGroups;
_sm_Vehicles = +blck_sm_Vehicles;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
//diag_log format["_sm_monitorVehicles::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//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]];
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
// _return = [_vehicles, _missionAI, _abort];
_group = group (_return select 1 select 0);
[blck_sm_Vehicles,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
}forEach _sm_Vehicles;
[inVehicle,blck_sm_Vehicles] call _fnc_evaluateSpawnedGroups;
_sm_Aircraft = +blck_sm_Aircraft;
{
// ["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,0],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_aircraftType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
_weapon = [toLower _difficulty] call blck_fnc_selectAILoadout;
//params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]]]
//diag_log format["[blckeagls static aircraftePatrol spawner] _weapon = %1 and _difficulty = %2",_weapon,_difficulty];
_return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli; // Allow the spawner to fit the default AI Loadouts for blckeagls; revisit at a later time when custom uniforms are set up for these AI.
diag_log format["[blckeagls] static aircraftePatrol spawner -> _return = %1",_return];
_return params ["_patrolHeli","_ai","_abort"];
_group = group (_ai select 0);
[blck_sm_Aircraft,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
};
}forEach _sm_Aircraft;
[inVehicle,blck_sm_Aircraft] call _fnc_evaluateSpawnedGroups;
_sm_Emplaced = +blck_sm_Emplaced;
{
// ["B_G_Mortar_01_F",[22944.3,16820.5,3.14243],"green",0,0,_group,_spawnAt]
//diag_log format["_sm_monitorEmplacedUnits::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static Emplaced spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
// params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols]];
_group = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray;
[blck_sm_Emplaced,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
};
}forEach _sm_Emplaced;
[inVehicle,blck_sm_Emplaced] call _fnc_evaluateSpawnedGroups;
_sm_scubaGroups = +blck_sm_scubaGroups;
{
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, _respawnInterval, _group, _spawnAt]
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorScubaUnits:: _group = %1 | _x = %2 |_forEachIndex = %3",_group,_x,_forEachIndex];
private _groupSpawned = false;
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static scubaGroup spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static scubaGroup spawning routine] _units = %1 and _numAI = %2",_units,_numAI];
//params["_pos", "_numUnits", ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_UMS_uniforms], ["_headGear",blck_UMS_headgear],["_configureWaypoints",true],["_weapons",blck_UMS_weapons],["_vests",blck_UMS_vests]];
_group = [_pos,_difficulty,_units,_patrolRadius] call blck_fnc_spawnScubaGroup;
//diag_log format["[blckeagls static scubaGroup spawner] _group %1",_group];
[blck_sm_scubaGroups,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
};
}forEach _sm_scubaGroups;
[onFoot,blck_sm_scubaGroups] call _fnc_evaluateSpawnedGroups;
_sm_surfaceVehicles = +blck_sm_surfaceShips;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
[_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_surfaceShips,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
}forEach _sm_surfaceVehicles;
[inVehicle,blck_sm_surfaceShips] call _fnc_evaluateSpawnedGroups;
_sm_SDVVehicles = +blck_sm_submarines;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static sub patrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
//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]];
_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;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_submarines,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_submarines,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_submarines deleteAt (blck_sm_submarines find _x);
};
}forEach _sm_SDVVehicles;
[inVehicle,blck_sm_submarines] call _fnc_evaluateSpawnedGroups;
blck_sm_monitoring = 0;

View File

@ -1,300 +0,0 @@
/*
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";
_fnc_updateGroupSpawnTimerFields = {
diag_log format["_fnc_updateGroupSpawnTimerFields::-> _this = %1",_this];
params["_array","_element",["_group",grpNull],["_spawnedAt",0]];
private _index = _array find _element;
_element set[1,_group];
_element set[2,_spawnedAt];
_array set[_index,_element];
};
private _triggerRange = 1000;
_fnc_evaluateSpawnedGroups = {
params["_patrolsArray"];
private _localpatrolsArray = +_patrolsArray;
{
// _x = [ [[22819.4,16929.5,5.33892],""red"",4,75,30], R Alpha 1-1,-1,0]"
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
// [[22819.4,16929.5,5.33892],""red"",4,75,30]
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
diag_log format["_fnc_evaluateSpawnedGroups: _x = %1",_x];
diag_log format["_fnc_evaluateSpawnedGroups: units alive in group %1 = %2",_group, {alive _x} count (units _group)];
diag_log format["_fnc_evaluateSpawnedGroups: _respawnInterval = %1",_respawnInterval];
if (_spawnedAt > 0) then
{
if (({alive _x} count (units _group) == 0)) then
{
diag_log format["all units in patrol %1 are dead | _respawnInterval = %2",_x,_respawnInterval];
if ((_respawnInterval != 0)) then // a group was spawned and all units are dead and we should respawn them after a certain interval
{
//[_patrolsArray,_x,grpNull,0,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupRepawnTimerFields;
private _index = _patrolsArray find _element;
private _element = _x;
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
diag_log format["_fnc_evaluateSpawnedGroups | element updated to %1",_element];
diag_log format["_fnc_evaluateSpawnedGroups: _patrolsArray updated to %1",_patrolsArray];
};
if (_respawnInterval == 0) then // a group was spawned and all units are dead but we should not do a respawn
{
_patrolsArray deleteAt (_patrolsArray find _x);
diag_log format["patrol %1 deleted from static patrol cue",_x];
};
};
if ({alive _x} count (units _group) > 0) then
{
// Case where a player is near and we need to update the time stamp.
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
private _index = _patrolsArray find _x;
_x set[4, diag_tickTime];
_patrolsArray set[_index,_x];
diag_log format["player near static group for element %1 timestamp updated to %2",_x, _x select 4];
} else {
// Case where no player is near and we need to test if the patrol should be de-spawned.
if ((diag_tickTime - _lastTimePlayerNear) > blck_sm_groupDespawnTime) then
{
diag_log format["despawning static group %1",_x];
private _index = _patrolsArray find _x;
_groupParameters set[2,{alive _x} count (units _group)];
_element = _x;
_element set[0,_groupParameters];
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
{
if (vehicle _x != _x) then {[vehicle _x] call blck_fnc_deleteAIVehicle};
[_x] call blck_fnc_deleteAI;
} forEach (units _group);
};
};
};
};
} forEach _localpatrolsArray;
};
blck_sm_monitoring = 1;
_sm_groups = +blck_sm_Groups;
{
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorStaticUnits::Group spawning routine:: _units = %1 | _x = %2 |_forEachIndex = %3",_units,_x,_forEachIndex];
//private _groupSpawned = false;
//diag_log format["there are %1 players in range",{_pos distance2D _x < _triggerRange} count allPlayers];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
diag_log format["testing if patrol %1 should be spawned | _spawnedAt = %2",_x,_spawnedAt];
diag_log format["_spawnedAt = %1 | _respawnAt = %2 | _respawnInterval = %3",_spawnedAt,_respawnAt, _respawnInterval];
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnInterval > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static group spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static group spawner] _units = %1 and _numAI = %2",_units,_numAI];
// // params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_group = [_pos,_pos,_numAI,_numAI,_difficulty,_patrolRadius-2,_patrolRadius,true] call blck_fnc_spawnGroup;
//diag_log format["[blckeagls static group spawner] _group %1",_group];
[blck_sm_Groups,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
};
};
}forEach _sm_groups;
[blck_sm_Groups] call _fnc_evaluateSpawnedGroups;
_sm_scubaGroups = +blck_sm_scubaGroups;
{
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, _respawnInterval, _group, _spawnAt]
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorScubaUnits:: _group = %1 | _x = %2 |_forEachIndex = %3",_group,_x,_forEachIndex];
private _groupSpawned = false;
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static scubaGroup spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static scubaGroup spawning routine] _units = %1 and _numAI = %2",_units,_numAI];
//params["_pos", "_numUnits", ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_UMS_uniforms], ["_headGear",blck_UMS_headgear],["_configureWaypoints",true],["_weapons",blck_UMS_weapons],["_vests",blck_UMS_vests]];
_group = [_pos,_difficulty,_units,_patrolRadius] call blck_fnc_spawnScubaGroup;
//diag_log format["[blckeagls static scubaGroup spawner] _group %1",_group];
[blck_sm_scubaGroups,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnInterval > 0)) then // a group was spawned and all units are dead and we should rspawn them after a certain interval
{
[blck_sm_scubaGroups,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set scubaGroup respawn time step :: blck_sm_Groups updated to %1",blck_sm_scubaGroups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead but we should not do a respawn
{
blck_sm_scubaGroups deleteAt (blck_sm_scubaGroups find _x);
};
};
}forEach _sm_scubaGroups;
_sm_Emplaced = +blck_sm_Emplaced;
{
// ["B_G_Mortar_01_F",[22944.3,16820.5,3.14243],"green",0,0,_group,_spawnAt]
//diag_log format["_sm_monitorEmplacedUnits::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static Emplaced spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
// params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols]];
_group = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray;
[blck_sm_Emplaced,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Emplaced,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0)) then // a group was spawned and all units are dead
{
blck_sm_Emplaced deleteAt (blck_sm_Emplaced find _x);
};
}forEach _sm_Emplaced;
_sm_Vehicles = +blck_sm_Vehicles;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
//diag_log format["_sm_monitorVehicles::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//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]];
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
// _return = [_vehicles, _missionAI, _abort];
_group = group (_return select 1 select 0);
[blck_sm_Vehicles,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Vehicles,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_Vehicles deleteAt (blck_sm_Vehicles find _x);
};
}forEach _sm_Vehicles;
_sm_surfaceVehicles = +blck_sm_surfaceShips;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
[_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_surfaceShips,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_surfaceShips,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_surfaceShips deleteAt (blck_sm_surfaceShips find _x);
};
}forEach _sm_surfaceVehicles;
_sm_SDVVehicles = +blck_sm_submarines;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static sub patrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
//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]];
_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;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_submarines,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_submarines,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_submarines deleteAt (blck_sm_submarines find _x);
};
}forEach _sm_SDVVehicles;
_sm_Aircraft = +blck_sm_Aircraft;
{
// ["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,0],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_aircraftType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
_weapon = [toLower _difficulty] call blck_fnc_selectAILoadout;
//params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]]]
//diag_log format["[blckeagls static aircraftePatrol spawner] _weapon = %1 and _difficulty = %2",_weapon,_difficulty];
_return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli; // Allow the spawner to fit the default AI Loadouts for blckeagls; revisit at a later time when custom uniforms are set up for these AI.
//diag_log format["[blckeagls] static aircraftePatrol spawner -> _return = %1",_return];
_return params ["_patrolHeli","_ai","_abort"];
_group = group (_ai select 0);
[blck_sm_Aircraft,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
};
if ( (isNull _group) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Aircraft,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_Aircraft deleteAt (blck_sm_Aircraft find _x);
};
}forEach _sm_Aircraft;
blck_sm_monitoring = 0;

View File

@ -1,293 +0,0 @@
/*
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";
private _triggerRange = 1000;
_fnc_evaluateSpawnedGroups = {
params["_patrolsArray"];
private _localpatrolsArray = +_patrolsArray;
{
// _x = [ [[22819.4,16929.5,5.33892],""red"",4,75,30], R Alpha 1-1,-1,0]"
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
// [[22819.4,16929.5,5.33892],""red"",4,75,30]
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
diag_log format["_fnc_evaluateSpawnedGroups: _x = %1",_x];
diag_log format["_fnc_evaluateSpawnedGroups: units alive in group %1 = %2",_group, {alive _x} count (units _group)];
diag_log format["_fnc_evaluateSpawnedGroups: _respawnInterval = %1",_respawnInterval];
if (_spawnedAt > 0) then
{
if (({alive _x} count (units _group) == 0)) then
{
diag_log format["all units in patrol %1 are dead | _respawnInterval = %2",_x,_respawnInterval];
if ((_respawnInterval != 0)) then // a group was spawned and all units are dead and we should respawn them after a certain interval
{
//[_patrolsArray,_x,grpNull,0,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupRepawnTimerFields;
private _index = _patrolsArray find _element;
private _element = _x;
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
diag_log format["_fnc_evaluateSpawnedGroups | element updated to %1",_element];
diag_log format["_fnc_evaluateSpawnedGroups: _patrolsArray updated to %1",_patrolsArray];
};
if (_respawnInterval == 0) then // a group was spawned and all units are dead but we should not do a respawn
{
_patrolsArray deleteAt (_patrolsArray find _x);
diag_log format["patrol %1 deleted from static patrol cue",_x];
};
};
if ({alive _x} count (units _group) > 0) then
{
// Case where a player is near and we need to update the time stamp.
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
private _index = _patrolsArray find _x;
_x set[4, diag_tickTime];
_patrolsArray set[_index,_x];
diag_log format["player near static group for element %1 timestamp updated to ",_x, _x select 4];
} else {
// Case where no player is near and we need to test if the patrol should be de-spawned.
if ((diag_tickTime - _lastTimePlayerNear) > blck_sm_groupDespawnTime) then
{
diag_log format["despawning static group %1",_x];
private _index = _patrolsArray find _x;
_groupParameters set[2,{alive _x} count (units _group)];
_element = _x;
_element set[0,_groupParameters];
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
{
if (vehicle _x != _x) then {[vehicle _x] call blck_fnc_deleteAIVehicle};
[_x] call blck_fnc_deleteAI;
} forEach (units _group);
};
};
};
};
} forEach _localpatrolsArray;
};
blck_sm_monitoring = 1;
_sm_groups = +blck_sm_Groups;
{
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorStaticUnits::Group spawning routine:: _units = %1 | _x = %2 |_forEachIndex = %3",_units,_x,_forEachIndex];
//private _groupSpawned = false;
//diag_log format["there are %1 players in range",{_pos distance2D _x < _triggerRange} count allPlayers];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
diag_log format["testing if patrol %1 should be spawned | _spawnedAt = %2",_x,_spawnedAt];
diag_log format["_spawnedAt = %1 | _respawnAt = %2 | _respawnInterval = %3",_spawnedAt,_respawnAt, _respawnInterval];
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnInterval > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static group spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static group spawner] _units = %1 and _numAI = %2",_units,_numAI];
// // params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_group = [_pos,_pos,_numAI,_numAI,_difficulty,_patrolRadius-2,_patrolRadius,true] call blck_fnc_spawnGroup;
//diag_log format["[blckeagls static group spawner] _group %1",_group];
[blck_sm_Groups,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
};
};
}forEach _sm_groups;
[blck_sm_Groups] call _fnc_evaluateSpawnedGroups;
_sm_scubaGroups = +blck_sm_scubaGroups;
{
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, _respawnInterval, _group, _spawnAt]
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorScubaUnits:: _group = %1 | _x = %2 |_forEachIndex = %3",_group,_x,_forEachIndex];
private _groupSpawned = false;
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static scubaGroup spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static scubaGroup spawning routine] _units = %1 and _numAI = %2",_units,_numAI];
//params["_pos", "_numUnits", ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_UMS_uniforms], ["_headGear",blck_UMS_headgear],["_configureWaypoints",true],["_weapons",blck_UMS_weapons],["_vests",blck_UMS_vests]];
_group = [_pos,_difficulty,_units,_patrolRadius] call blck_fnc_spawnScubaGroup;
//diag_log format["[blckeagls static scubaGroup spawner] _group %1",_group];
[blck_sm_scubaGroups,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnInterval > 0)) then // a group was spawned and all units are dead and we should rspawn them after a certain interval
{
[blck_sm_scubaGroups,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set scubaGroup respawn time step :: blck_sm_Groups updated to %1",blck_sm_scubaGroups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead but we should not do a respawn
{
blck_sm_scubaGroups deleteAt (blck_sm_scubaGroups find _x);
};
};
}forEach _sm_scubaGroups;
_sm_Emplaced = +blck_sm_Emplaced;
{
// ["B_G_Mortar_01_F",[22944.3,16820.5,3.14243],"green",0,0,_group,_spawnAt]
//diag_log format["_sm_monitorEmplacedUnits::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static Emplaced spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
// params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols]];
_group = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray;
[blck_sm_Emplaced,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Emplaced,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0)) then // a group was spawned and all units are dead
{
blck_sm_Emplaced deleteAt (blck_sm_Emplaced find _x);
};
}forEach _sm_Emplaced;
_sm_Vehicles = +blck_sm_Vehicles;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
//diag_log format["_sm_monitorVehicles::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//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]];
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
// _return = [_vehicles, _missionAI, _abort];
_group = group (_return select 1 select 0);
[blck_sm_Vehicles,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Vehicles,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_Vehicles deleteAt (blck_sm_Vehicles find _x);
};
}forEach _sm_Vehicles;
_sm_surfaceVehicles = +blck_sm_surfaceShips;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
[_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_surfaceShips,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_surfaceShips,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_surfaceShips deleteAt (blck_sm_surfaceShips find _x);
};
}forEach _sm_surfaceVehicles;
_sm_SDVVehicles = +blck_sm_submarines;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static sub patrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
//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]];
_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;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_submarines,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_submarines,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_submarines deleteAt (blck_sm_submarines find _x);
};
}forEach _sm_SDVVehicles;
_sm_Aircraft = +blck_sm_Aircraft;
{
// ["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,0],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_aircraftType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
_weapon = [toLower _difficulty] call blck_fnc_selectAILoadout;
//params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]]]
//diag_log format["[blckeagls static aircraftePatrol spawner] _weapon = %1 and _difficulty = %2",_weapon,_difficulty];
_return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli; // Allow the spawner to fit the default AI Loadouts for blckeagls; revisit at a later time when custom uniforms are set up for these AI.
//diag_log format["[blckeagls] static aircraftePatrol spawner -> _return = %1",_return];
_return params ["_patrolHeli","_ai","_abort"];
_group = group (_ai select 0);
[blck_sm_Aircraft,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
};
if ( (isNull _group) && (_spawnAt == -1) && (_respawnInterval > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Aircraft,_x,_group,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnInterval == 0) ) then // a group was spawned and all units are dead
{
blck_sm_Aircraft deleteAt (blck_sm_Aircraft find _x);
};
}forEach _sm_Aircraft;
blck_sm_monitoring = 0;

View File

@ -1,328 +0,0 @@
/*
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";
#define onFoot 1
#define inVehicle 2
#define groupParameters 0
#define patrolGroup 1
#define spawnedAt 2
#define respawnAt 3
#define lastTimePlayerNear 4
_fnc_updateGroupSpawnTimerFields = {
diag_log format["_fnc_updateGroupSpawnTimerFields::-> _this = %1",_this];
params["_array","_element",["_group",grpNull],["_spawnedAt",0]];
private _index = _array find _element;
if !(isNull _group) then
{
_element set[patrolGroup,_group];
_element set[spawnedAt,_spawnedAt];
_element set[respawnAt,0];
_array set[_index,_element];
};
};
triggerRange = 1000;
_fnc_evaluateSpawnedGroups = {
params["_aiType","_patrolsArray"];
private _localpatrolsArray = +_patrolsArray;
{
// _x = [ [[22819.4,16929.5,5.33892],""red"",4,75,30], R Alpha 1-1,-1,0]"
diag_log format["_fnc_evaluateSpawnedGroups: time = %2 | _x = %1",_x,diag_tickTime];
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
// [[22819.4,16929.5,5.33892],""red"",4,75,30]
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
diag_log format["_fnc_evaluateSpawnedGroups: typeName _groupParameters select 0 = %1",typeName (_groupParameters select 0)];
private["_pos","_difficulty","_units","_patrolRadius","_respawnInterval","_vehicleType"];
if (_aiType isEqualTo onFoot) then {
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"]
_pos = _groupParameters select 0;
_difficulty = _groupParameters select 1;
_units = _groupParameters select 2;
_patrolRadius = _groupParameters select 3;
_respawnInterval = _groupParameters select 4;
};
if (_aiType isEqualTo inVehicle) then
{
//_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnInterval"]};
_vehicleType = _groupParameters select 0;
_pos = _groupParameters select 1;
_difficulty = _groupParameters select 2;
_patrolRadius = _groupParameters select 3;
_respawnInterval = _groupParameters select 4;
};
if !(isNull _group) then
{
diag_log format["_fnc_evaluateSpawnedGroups: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_evaluateSpawnedGroups: _pos = %1 | _difficulty = %2 | _patrolRadius = %3 | _respawnInterval = %4",_pos,_difficulty,_patrolRadius,_respawnInterval];
diag_log format["_fnc_evaluateSpawnedGroups: units alive in group %1 = %2",_group, {alive _x} count (units _group)];
diag_log format["_fnc_evaluateSpawnedGroups: _respawnInterval = %1",_respawnInterval];
if (_spawnedAt > 0) then
{
if (({alive _x} count (units _group) == 0)) then
{
diag_log format["all units in patrol %1 are dead | _respawnInterval = %2",_x,_respawnInterval];
if ((_respawnInterval != 0)) then // a group was spawned and all units are dead and we should respawn them after a certain interval
{
//[_patrolsArray,_x,grpNull,0,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupRepawnTimerFields;
private _index = _patrolsArray find _element;
private _element = _x;
// _x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_element set[patrolGroup,grpNull];
//_element set[2,0];
if (_respawnInterval > 0) then {_element set[respawnAt,(diag_tickTime + _respawnInterval)]};
_patrolsArray set[_index,_element];
diag_log format["_fnc_evaluateSpawnedGroups | element updated to %1",_element];
diag_log format["_fnc_evaluateSpawnedGroups: _patrolsArray updated to %1",_patrolsArray];
};
if (_respawnInterval == 0) then // a group was spawned and all units are dead but we should not do a respawn
{
_patrolsArray deleteAt (_patrolsArray find _x);
diag_log format["patrol %1 deleted from static patrol cue",_x];
};
};
if ({alive _x} count (units _group) > 0) then
{
// Case where a player is near and we need to update the time stamp.
if ([_pos,triggerRange] call blck_fnc_playerInRange) then
{
private _index = _patrolsArray find _x;
// _x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_x set[lastTimePlayerNear, diag_tickTime];
_patrolsArray set[_index,_x];
diag_log format["player near static group for element %1 timestamp updated to %2",_x, _x select lastTimePlayerNear];
} else {
// Case where no player is near and we need to test if the patrol should be de-spawned.
if ((diag_tickTime - _lastTimePlayerNear) > blck_sm_groupDespawnTime) then
{
// _x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
diag_log format["despawning static group %1",_x];
private _index = _patrolsArray find _x;
_groupParameters set[2,{alive _x} count (units _group)];
_element = _x;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup,grpNull];
//_element set[2,0];
_element set[respawnAt,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
{
if (vehicle _x != _x) then {[vehicle _x] call blck_fnc_deleteAIVehicle};
[_x] call blck_fnc_deleteAI;
} forEach (units _group);
};
};
};
};
} else {
if (_respawnInterval == 0 && _spawnedAt > 0) then // a group was spawned and all units are dead but we should not do a respawn
{
_patrolsArray deleteAt (_patrolsArray find _x);
diag_log format["patrol %1 deleted from static patrol cue",_x];
};
if (_respawnInterval > 0 && _spawnedAt > 0 && _respawnAt == 0) then
{
// _x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
private _index = _patrolsArray find _x;
_element = _x;
_element set[spawnedAt,0];
_element set[respawnAt,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
};
};
} forEach _localpatrolsArray;
};
blck_sm_monitoring = 1;
[onFoot,blck_sm_Groups] call _fnc_evaluateSpawnedGroups;
[inVehicle,blck_sm_Vehicles] call _fnc_evaluateSpawnedGroups;
[inVehicle,blck_sm_Aircraft] call _fnc_evaluateSpawnedGroups;
[inVehicle,blck_sm_Emplaced] call _fnc_evaluateSpawnedGroups;
[onFoot,blck_sm_scubaGroups] call _fnc_evaluateSpawnedGroups;
[inVehicle,blck_sm_surfaceShips] call _fnc_evaluateSpawnedGroups;
[inVehicle,blck_sm_submarines] call _fnc_evaluateSpawnedGroups;
_sm_groups = +blck_sm_Groups;
{
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
diag_log format["<_sm_monitorStaticUnits::Group spawning routine:: _units = %1 | _x = %2 |_forEachIndex = %3",_units,_x,_forEachIndex];
//private _groupSpawned = false;
diag_log format["there are %1 players in range",{_pos distance2D _x < triggerRange} count allPlayers];
if ([_pos,triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
diag_log format["testing if patrol %1 should be spawned | _spawnedAt = %2",_x,_spawnedAt];
diag_log format["_spawnedAt = %1 | _respawnAt = %2 | _respawnInterval = %3",_spawnedAt,_respawnAt, _respawnInterval];
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnAt > 0)) ) then // no group has been spawned, spawn one.
{
diag_log format["[blckeagls static group spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
diag_log format["[blckeagls static group spawner] _units = %1 and _numAI = %2",_units,_numAI];
// // params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_group = [_pos,_pos,_numAI,_numAI,_difficulty,_patrolRadius-2,_patrolRadius,true] call blck_fnc_spawnGroup;
diag_log format["[blckeagls static group spawner] _group %1",_group];
[blck_sm_Groups,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
};
};
}forEach _sm_groups;
_sm_Vehicles = +blck_sm_Vehicles;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
//diag_log format["_sm_monitorVehicles::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnAt > 0)) ) then // no group has been spawned, spawn one.
{
//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]];
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
// _return = [_vehicles, _missionAI, _abort];
_group = group (_return select 1 select 0);
[blck_sm_Vehicles,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
};
}forEach _sm_Vehicles;
_sm_Aircraft = +blck_sm_Aircraft;
{
// ["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,0],
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_aircraftType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnAt > 0)) ) then // no group has been spawned, spawn one.
{
_weapon = [toLower _difficulty] call blck_fnc_selectAILoadout;
//params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]]]
//diag_log format["[blckeagls static aircraftePatrol spawner] _weapon = %1 and _difficulty = %2",_weapon,_difficulty];
_return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli; // Allow the spawner to fit the default AI Loadouts for blckeagls; revisit at a later time when custom uniforms are set up for these AI.
diag_log format["[blckeagls] static aircraftePatrol spawner -> _return = %1",_return];
_return params ["_patrolHeli","_ai","_abort"];
_group = group (_ai select 0);
[blck_sm_Aircraft,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
};
};
}forEach _sm_Aircraft;
_sm_Emplaced = +blck_sm_Emplaced;
{
// ["B_G_Mortar_01_F",[22944.3,16820.5,3.14243],"green",0,0,_group,_spawnAt]
//diag_log format["_sm_monitorEmplacedUnits::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnAt > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static Emplaced spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
// params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols]];
_group = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray;
[blck_sm_Emplaced,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
};
};
}forEach _sm_Emplaced;
_sm_scubaGroups = +blck_sm_scubaGroups;
{
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, _respawnInterval, _group, _spawnAt]
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorScubaUnits:: _group = %1 | _x = %2 |_forEachIndex = %3",_group,_x,_forEachIndex];
private _groupSpawned = false;
if ([_pos,triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnAt > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static scubaGroup spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static scubaGroup spawning routine] _units = %1 and _numAI = %2",_units,_numAI];
//params["_pos", "_numUnits", ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_UMS_uniforms], ["_headGear",blck_UMS_headgear],["_configureWaypoints",true],["_weapons",blck_UMS_weapons],["_vests",blck_UMS_vests]];
_group = [_pos,_difficulty,_units,_patrolRadius] call blck_fnc_spawnScubaGroup;
//diag_log format["[blckeagls static scubaGroup spawner] _group %1",_group];
[blck_sm_scubaGroups,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
};
};
}forEach _sm_scubaGroups;
_sm_surfaceVehicles = +blck_sm_surfaceShips;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnAt > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
[_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_surfaceShips,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
};
}forEach _sm_surfaceVehicles;
_sm_SDVVehicles = +blck_sm_submarines;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
if ([_pos,triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnAt > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static sub patrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
//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]];
_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;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_submarines,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
};
}forEach _sm_SDVVehicles;
blck_sm_monitoring = 0;

View File

@ -1,259 +0,0 @@
/*
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["Running _fnc_sm_monitorStaticUnits at Time = %1",diag_tickTime];
_fnc_updateGroupSpawnTimerFields = {
diag_log format["_fnc_updateGroupSpawnTimerFields::-> _this = %1",_this];
params["_array","_element",["_group",grpNull],["_spawnedAt",0]];
private _index = _array find _element;
_element set[1,_group];
_element set[2,_spawnedAt];
_array set[_index,_element];
};
private _triggerRange = 1000;
_fnc_evaluateSpawnedGroups = {
params["_patrolsArray"];
private _localpatrolsArray = +_patrolsArray;
{
diag_log format["_fnc_evaluateSpawnedGroups: _x = %1",_x];
// _x = [ [[22819.4,16929.5,5.33892],""red"",4,75,30], R Alpha 1-1,-1,0]"
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
// [[22819.4,16929.5,5.33892],""red"",4,75,30]
if !(isNull _group) then
{
if (isArray _groupParameters select 0) then {_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"]};
if (isText _groupParameters select 0) then {_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnInterval"]
diag_log format["_fnc_evaluateSpawnedGroups: units alive in group %1 = %2",_group, {alive _x} count (units _group)];
diag_log format["_fnc_evaluateSpawnedGroups: _respawnInterval = %1",_respawnInterval];
if (_spawnedAt > 0) then
{
if (({alive _x} count (units _group) == 0)) then
{
diag_log format["all units in patrol %1 are dead | _respawnInterval = %2",_x,_respawnInterval];
if ((_respawnInterval != 0)) then // a group was spawned and all units are dead and we should respawn them after a certain interval
{
//[_patrolsArray,_x,grpNull,0,(diag_tickTime + _respawnInterval)] call _fnc_updateGroupRepawnTimerFields;
private _index = _patrolsArray find _element;
private _element = _x;
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
diag_log format["_fnc_evaluateSpawnedGroups | element updated to %1",_element];
diag_log format["_fnc_evaluateSpawnedGroups: _patrolsArray updated to %1",_patrolsArray];
};
if (_respawnInterval == 0) then // a group was spawned and all units are dead but we should not do a respawn
{
_patrolsArray deleteAt (_patrolsArray find _x);
diag_log format["patrol %1 deleted from static patrol cue",_x];
};
};
if ({alive _x} count (units _group) > 0) then
{
// Case where a player is near and we need to update the time stamp.
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
private _index = _patrolsArray find _x;
_x set[4, diag_tickTime];
_patrolsArray set[_index,_x];
diag_log format["player near static group for element %1 timestamp updated to %2",_x, _x select 4];
} else {
// Case where no player is near and we need to test if the patrol should be de-spawned.
if ((diag_tickTime - _lastTimePlayerNear) > blck_sm_groupDespawnTime) then
{
diag_log format["despawning static mission group %1",_x];
private _index = _patrolsArray find _x;
if (isArray _groupParameters select 0) then
{
_groupParameters set[2,{alive _x} count (units _group)];
};
_element = _x;
_element set[0,_groupParameters];
_element set[1,grpNull];
_element set[2,0];
_element set[3,(diag_tickTime + _respawnInterval)];
_patrolsArray set[_index,_element];
{
if (vehicle _x != _x) then {[vehicle _x] call blck_fnc_deleteAIVehicle};
[_x] call blck_fnc_deleteAI;
} forEach (units _group);
};
};
};
};
};
} forEach _localpatrolsArray;
};
blck_sm_monitoring = 1;
_sm_groups = +blck_sm_Groups;
{
diag_log format["monitoring blck_sm_Groups: _x = %1",_x];
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorStaticUnits::Group spawning routine:: _units = %1 | _x = %2 |_forEachIndex = %3",_units,_x,_forEachIndex];
//private _groupSpawned = false;
//diag_log format["there are %1 players in range",{_pos distance2D _x < _triggerRange} count allPlayers];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group)) then
{
diag_log format["testing if patrol %1 should be spawned | _spawnedAt = %2",_x,_spawnedAt];
diag_log format["_spawnedAt = %1 | _respawnAt = %2 | _respawnInterval = %3",_spawnedAt,_respawnAt, _respawnInterval];
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnInterval > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static group spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static group spawner] _units = %1 and _numAI = %2",_units,_numAI];
// // params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_group = [_pos,_pos,_numAI,_numAI,_difficulty,_patrolRadius-2,_patrolRadius,true] call blck_fnc_spawnGroup;
//diag_log format["[blckeagls static group spawner] _group %1",_group];
[blck_sm_Groups,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
};
};
}forEach _sm_groups;
[blck_sm_Groups] call _fnc_evaluateSpawnedGroups;
_sm_Vehicles = +blck_sm_Vehicles;
{
diag_log format["_sm_monitorVehicles::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
// ["B_G_Offroad_01_armed_F",[22809.5,16699.2,8.78706],"green", 600,90]
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnInterval"];
diag_log format["_fnc_sm_monitorStaticUnits: vehicle spawn position = %1",_pos];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnInterval > 0)) ) then // no group has been spawned, spawn one.
{
//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]];
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
// _return = [_vehicles, _missionAI, _abort];
_group = group (_return select 1 select 0);
[blck_sm_Vehicles,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
}forEach _sm_Vehicles;
[blck_sm_Vehicles] call _fnc_evaluateSpawnedGroups;
_sm_Emplaced = +blck_sm_Emplaced;
{
// ["B_G_Mortar_01_F",[22944.3,16820.5,3.14243],"green",0,0,_group,_spawnAt]
//diag_log format["_sm_monitorEmplacedUnits::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnInterval > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static Emplaced spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
// params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols]];
_return = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray;
// _return = [_emplacedWeps,_emplacedAI,_abort];
// Make an assumption that only one emplaced weapon is spawned so that the group of the first AI in the list returned is the group we should monitor.
_group = group((_return select 1) select 0);
[blck_sm_Emplaced,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
};
}forEach _sm_Emplaced;
[blck_sm_Emplaced] call _fnc_evaluateSpawnedGroups;
_sm_Aircraft = +blck_sm_Aircraft;
{
// ["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,0],
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnInterval > 0)) ) then // no group has been spawned, spawn one.
{
_weapon = [toLower _difficulty] call blck_fnc_selectAILoadout;
//params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]]]
//diag_log format["[blckeagls static aircraftePatrol spawner] _weapon = %1 and _difficulty = %2",_weapon,_difficulty];
_return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli; // Allow the spawner to fit the default AI Loadouts for blckeagls; revisit at a later time when custom uniforms are set up for these AI.
//diag_log format["[blckeagls] static aircraftePatrol spawner -> _return = %1",_return];
//_return params ["_patrolHeli","_ai","_abort"];
_group = group((_return select 1) select 0);
[blck_sm_Aircraft,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
};
}forEach _sm_Aircraft;
[blck_sm_Aircraft] call _fnc_evaluateSpawnedGroups;
_sm_surfaceVehicles = +blck_sm_surfaceShips;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnInterval > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
//_return params ["_vehicles", "_missionAI", "_abort"];
_group = group((_return select 1) select 0);
[blck_sm_surfaceShips,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
}forEach _sm_surfaceVehicles;
[blck_sm_surfaceShips] call _fnc_evaluateSpawnedGroups;
_sm_SDVVehicles = +blck_sm_submarines;
{
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnInterval > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static sub patrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
_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;
//_return params ["_vehicles", "_missionAI", "_abort"];
_group = group((_return select 1) select 0);
[blck_sm_submarines,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
}forEach _sm_SDVVehicles;
[blck_sm_submarines] call _fnc_evaluateSpawnedGroups;
_sm_scubaGroups = +blck_sm_scubaGroups;
{
_x params["_groupParameters","_group","_spawnedAt","_respawnAt","_lastTimePlayerNear"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnInterval"];
//diag_log format["<_sm_monitorScubaUnits:: _group = %1 | _x = %2 |_forEachIndex = %3",_group,_x,_forEachIndex];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( ((_spawnedAt == 0) && (_respawnAt == 0)) || ((diag_tickTime > _respawnAt) && (_respawnInterval > 0)) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static scubaGroup spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static scubaGroup spawning routine] _units = %1 and _numAI = %2",_units,_numAI];
//params["_pos", "_numUnits", ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_UMS_uniforms], ["_headGear",blck_UMS_headgear],["_configureWaypoints",true],["_weapons",blck_UMS_weapons],["_vests",blck_UMS_vests]];
_group = [_pos,_difficulty,_units,_patrolRadius] call blck_fnc_spawnScubaGroup;
//diag_log format["[blckeagls static scubaGroup spawner] _group %1",_group];
[blck_sm_scubaGroups,_x,_group,diag_tickTime] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
};
}forEach _sm_scubaGroups;
[blck_sm_scubaGroups] call _fnc_evaluateSpawnedGroups;
blck_sm_monitoring = 0;

View File

@ -14,7 +14,7 @@ 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"];
_x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"];
//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];

View File

@ -14,11 +14,10 @@ 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"];
_x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"];
//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;//
@ -46,6 +45,7 @@ _sm_groups = +blck_sm_Vehicles;
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
// params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_isScubaGroup",false]];
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
//diag_log format["_fnc_monitorVehicles: _return = %1",_return];
_group = group ((_return select 1) select 0);

View File

@ -1,42 +0,0 @@
/*
by Ghostridere-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/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
blck_sm_Groups = [];
blck_sm_Vehicles = [];
blck_sm_Aircraft = [];
blck_sm_Emplaced = [];
blck_sm_lootContainers = [];
blck_fnc_sm_AddGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_AddGroup.sqf";
blck_fnc_sm_AddVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_AddVehicle.sqf";
blck_fnc_sm_AddAircraft = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_AddAircraft.sqf";
blck_fnc_sm_AddEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_AddEmplaced.sqf";
blck_fnc_sm_monitorStaticMissionUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_monitorStaticUnits.sqf";
blck_fnc_sm_spawnLootContainers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnLootContainers.sqf";
blck_fnc_sm_spawnObjects = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnObjects.sqf";
//blck_fnc_sm_monitorStaticUnit = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_monitorStaticUnits.sqf";
//blck_fnc_sm_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnVehiclePatrol.sqf";
//blck_fnc_sm_spawnAirPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnAirPatrol.sqf";
//blck_fnc_sm_spawnEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnEmplaced.sqf";
//blck_fnc_sm_spawnInfantryPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrol.sqf";
//blck_fnc_sm_checkForPlayerNearMission = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\StaticMissions_checkForPlayerNearMission.sqf";
//blck_fnc_sm_spawnAirPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnAirPatrols.sqf";
//blck_fnc_sm_spawnEmplaceds = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnEmplaced.sqf";
//blck_fnc_sm_spawnInfantryPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrols.sqf";
//blck_fnc_sm_spawnVehiclePatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnVehiclePatrols.sqf";
//diag_log "[blckeagls] GMS_sm_init_functions.sqf <Loaded>";
blck_sm_functionsLoaded = true;

View File

@ -104,7 +104,7 @@ _aiGroupParameters = [
//[[22849,16720.4,7.33123],"red",4, 75,9000],
//[[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],
//[[22809.4,16929.5,5.33892],"blue",1, 75,0],
[[22819.4,16929.5,0],"red",1, 75, 10]
];

View File

@ -33,29 +33,24 @@ if (isNil "_endCondition") then {_endCondition = blck_missionEndCondition}; /
if (isNil "_spawnCratesTiming") then {_spawnCratesTiming = blck_spawnCratesTiming}; // Choices: "atMissionSpawnGround","atMissionStartAir","atMissionEndGround","atMissionEndAir".
if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn";
if (isNil "_useMines") then {_useMines = blck_useMines;};
if (isNil "_weaponList") then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (isNil "_sideArms") then {_sideArms = blck_Pistols};
if (isNil "_vests") then {_vests = blck_vests};
if (isNil "_backpacks") then {_backpacks = blck_backpacks};
//diag_log format["_fnc_missionSpawner: -> blck_backpacks = %1", blck_backpacks];
//diag_log format["_fnc_missionSpawner: -> _backpacks = %1",_backpacks];
if (isNil "_weaponList") then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (isNil "_sideArms") then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms};
if (isNil "_uniforms") then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
if (isNil "_headGear") then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear};
if (isNil "_vests") then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests};
if (isNil "_backpacks") then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
if (isNil "_sideArms") then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms};
if (isNil "_uniforms") then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
if (isNil "_headGear") then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear};
if (isNil "_vests") then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests};
if (isNil "_backpacks") then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = [_aiDifficultyLevel] call blck_fnc_selectChanceHeliPatrol};
if (isNil "_noChoppers") then {_noChoppers = [_aiDifficultyLevel] call blck_fnc_selectNumberAirPatrols};
if (isNil "_chancePara") then {_chancePara = [_aiDifficultyLevel] call blck_fnc_selectChanceParatroops};
if (isNil "_missionHelis") then {_missionHelis = [_aiDifficultyLevel] call blck_fnc_selectMissionHelis};
if (isNil "_noPara") then {_noPara = [_aiDifficultyLevel] call blck_fnc_selectNumberParatroops};
if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = [_aiDifficultyLevel] call blck_fnc_selectChanceHeliPatrol};
if (isNil "_noChoppers") then {_noChoppers = [_aiDifficultyLevel] call blck_fnc_selectNumberAirPatrols};
if (isNil "_chancePara") then {_chancePara = [_aiDifficultyLevel] call blck_fnc_selectChanceParatroops};
if (isNil "_missionHelis") then {_missionHelis = [_aiDifficultyLevel] call blck_fnc_selectMissionHelis};
if (isNil "_noPara") then {_noPara = [_aiDifficultyLevel] call blck_fnc_selectNumberParatroops};
if (isNil "_chanceLoot") then {_chanceLoot = 0};
if (isNil "_chanceLoot") then {_chanceLoot = 0};
if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;};
if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Blue};
if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed};
if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Blue};
if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed};
_objects = [];
_mines = [];
@ -451,7 +446,9 @@ if (blck_cleanUpLootChests) then
if (_noPara > 0 && (random(1) < _chancePara) && _paraTriggerDistance == 0) then
{
diag_log format["_fnc_missionSpawner (435): spawning %1 paraunits at mission spawn",_noPara];
private _paratroops = [_coords,_noPara,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnParaUnits;
//private _paratroops = [_coords,_noPara,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnParaUnits;
// blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission
private _paratroops = [_coords,_noPara,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnParaUnits;
if !(isNull _paratroops) then
{
_blck_AllMissionAI append (units _paratroops);
@ -552,7 +549,8 @@ while {_missionComplete isEqualTo -1} do
_spawnPara = false; // The player gets one try to spawn these.
if (random(1) < _chancePara) then //
{
private _paratroops = [_coords,_noPara,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,true] call blck_fnc_spawnParaUnits;
// blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnParaUnits;] call blck_fnc_spawnParaUnits;
private _paratroops = [_coords,_noPara,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnParaUnits;
if !(isNull _paratroops) then
{
_blck_AllMissionAI append (units _paratroops);

View File

@ -5,8 +5,10 @@
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_missionCenter",
"_missionGroups","_scubaGroupParameters","_vehiclePatrolParameters","_submarinePatrolParameters","_aircraftTypes","_noAirPatrols","_airPatrols"];
"_chanceReinforcements","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_missionCenter",
"_missionGroups","_scubaGroupParameters","_vehiclePatrolParameters","_submarinePatrolParameters","_aircraftTypes","_noAirPatrols","_airPatrols",
"_vests","_backpacks","_weaponList","_sideArms","_uniforms","_headGear","_chanceHeliPatrol","_noChoppers","_chancePara","_missionHelis","_noPara",
"_chanceLoot","_paraTriggerDistance","_paraLoot","_paraLootCounts"];
params["_missionCenter","_mission"];
//_mission = "UMS mission example #2"; // Included for additional documentation. Not intended to be spawned as a mission per se.
//_missionCenter = [22584.9,15304.8,0]; // I pulled this from the position of the marker.

View File

@ -129,5 +129,5 @@ if (blck_enableBlueMissions > 0) then
[] execVM "\q\addons\custom_server\Missions\Static\GMS_StaticMissions_init.sqf";
[] execVM "q\addons\custom_server\Missions\UMS\GMS_UMS_init.sqf"; // loads functions and spawns any static missions.
diag_log "blck_init_server: ->> Static and UMS systems initialized.";
//diag_log "blck_init_server: ->> Static and UMS systems initialized.";
diag_log "[blckeagls] Mission spawner started";

View File

@ -1,6 +1,6 @@
private ["_version","_versionDate"];
blck_version = "6.84 Build 142";
blck_version = "6.84 Build 144";
_blck_version = blck_version;
_blck_versionDate = "6-19-18 5:00 PM";
_blck_versionDate = "6-21-18 5:00 PM";
blck_pvs_version = _blck_version;
publicVariable blck_pvs_version;