From a6d4e35105ccb599e128dc66731fc972108f873d Mon Sep 17 00:00:00 2001 From: Ghostrider-GRG- Date: Sat, 23 Jun 2018 06:13:49 -0400 Subject: [PATCH] Revert "Version 6.84 Build 144" This reverts commit 6b67ce4ae1c66a631802742c18407b81374129dc. --- @GMS/addons/custom_server/.vscode/launch.json | 13 - .../Functions/GMS_fnc_findSafePosn - Copy.sqf | 130 ++ .../Groups/GMS_fnc_spawnGroup - Copy.sqf | 107 ++ .../Compiles/Groups/GMS_fnc_spawnGroup.sqf | 8 +- .../Missions/GMS_fnc_crateMapMarker.sqf | 43 + .../Missions/GMS_fnc_missionAIareDead.sqf | 28 + .../GMS_fnc_missionSpawner - Copy (2).sqf | 658 +++++++++ .../GMS_fnc_missionSpawner - Copy.sqf | 608 ++++++++ .../Missions/GMS_fnc_missionSpawner.sqf | 66 +- .../GMS_fnc_selecctChanceParatroops.sqf | 12 - .../Missions/GMS_fnc_selectAIBackpacks.sqf | 12 - .../Missions/GMS_fnc_selectAIHeadgear.sqf | 12 - .../Missions/GMS_fnc_selectAISidearms.sqf | 15 +- .../Missions/GMS_fnc_selectAIUniforms.sqf | 12 - .../Missions/GMS_fnc_selectAIVests.sqf | 12 - .../GMS_fnc_selectChanceHeliPatrol.sqf | 12 - .../Missions/GMS_fnc_selectMissionHelis.sqf | 12 - .../GMS_fnc_selectNumberAirPatrols.sqf | 12 - .../GMS_fnc_selectNumberParatroops.sqf | 12 - .../Missions/GMS_fnc_spawnBaseObjects.sqf | 10 +- .../GMS_fnc_spawnEmplacedWeaponArray.sqf | 12 +- .../Missions/GMS_fnc_spawnMissionAI.sqf | 2 +- .../GMS_fnc_spawnMissionParatroops.sqf | 53 + ..._fnc_spawnMissionVehiclePatrols - Copy.sqf | 122 ++ .../GMS_fnc_spawnMissionVehiclePatrols.sqf | 25 +- .../Missions/GMS_fnc_spawnRandomLandscape.sqf | 14 +- .../GMS_fnc_placeCharacterInBuilding.sqf | 25 - .../Compiles/Units/GMS_fnc_spawnCharacter.sqf | 2 +- .../Compiles/Units/GMS_fnc_spawnHostage.sqf | 13 +- .../Compiles/Units/GMS_fnc_spawnLeader.sqf | 14 +- .../Compiles/Units/GMS_fnc_spawnParaUnits.sqf | 12 +- .../Units/GMS_fnc_spawnUnit - Copy.sqf | 210 +++ .../Compiles/Units/GMS_fnc_spawnUnit.sqf | 12 +- .../Vehicles/GMS_fnc_spawnMissionHeli.sqf | 22 +- .../GMS_fnc_spawnMissionReinforcements.sqf | 14 +- .../Vehicles/GMS_fnc_spawnParaUnits.sqf | 82 ++ .../Vehicles/GMS_fnc_spawnVehicle - Copy.sqf | 39 + .../GMS_fnc_spawnVehiclePatrol - Copy.sqf | 79 + .../custom_server/Compiles/blck_functions.sqf | 10 +- .../Configs/armed_vics_notes.txt | 91 ++ .../Configs/blck_custom_config_RC.sqf | 1269 +++++++++++++++++ .../custom_server/Missions/Blue/captive1.sqf | 22 +- .../custom_server/Missions/Blue/default.sqf | 17 +- .../custom_server/Missions/Blue/default2.sqf | 2 +- .../custom_server/Missions/Blue/hostage1.sqf | 136 +- .../Missions/Blue/medicalCamp.sqf | 22 +- .../custom_server/Missions/Blue/redCamp.sqf | 84 +- .../Missions/Blue/resupplyCamp.sqf | 12 +- .../Missions/GMS_missionLists.sqf | 5 +- .../Missions/Green/medicalCamp.sqf | 22 +- .../custom_server/Missions/Green/redCamp.sqf | 84 +- .../Missions/Green/resupplyCamp.sqf | 12 +- .../Missions/Orange/medicalCamp.sqf | 22 +- .../custom_server/Missions/Orange/redCamp.sqf | 84 +- .../Missions/Orange/resupplyCamp.sqf | 12 +- .../custom_server/Missions/Red/hostage1.sqf | 91 +- .../Missions/Red/medicalCamp.sqf | 8 +- .../custom_server/Missions/Red/redCamp.sqf | 1 + .../Static/Code/GMS_fnc_sm_AddAircraft.sqf | 18 + .../Static/Code/GMS_fnc_sm_AddEmplaced.sqf | 17 + .../Static/Code/GMS_fnc_sm_AddGroup.sqf | 18 + .../Static/Code/GMS_fnc_sm_AddVehicle.sqf | 16 + .../Static/Code/GMS_fnc_sm_init_functions.sqf | 4 +- .../Code/GMS_fnc_sm_monitorAircraft.sqf | 3 +- .../Code/GMS_fnc_sm_monitorEmplaced.sqf | 5 +- .../Static/Code/GMS_fnc_sm_monitorScuba.sqf | 2 +- .../Static/Code/GMS_fnc_sm_monitorShips.sqf | 2 +- .../GMS_fnc_sm_monitorStaticUnits - 2.sqf | 300 ++++ ...S_fnc_sm_monitorStaticUnits - Copy (2).sqf | 325 +++++ ...S_fnc_sm_monitorStaticUnits - Copy (3).sqf | 321 +++++ ...S_fnc_sm_monitorStaticUnits - Copy (4).sqf | 290 ++++ .../GMS_fnc_sm_monitorStaticUnits - Copy.sqf | 300 ++++ .../Code/GMS_fnc_sm_monitorStaticUnits-1.sqf | 293 ++++ .../Code/GMS_fnc_sm_monitorStaticUnits.sqf | 328 +++++ .../GMS_fnc_sm_monitorStaticUnits_failed.sqf | 259 ++++ .../Static/Code/GMS_fnc_sm_monitorSubs.sqf | 2 +- .../Code/GMS_fnc_sm_monitorVehicles.sqf | 4 +- .../Static/Code/GMS_sm_init_functions.sqf | 42 + .../missions/staticMissionExample2_Epoch.sqf | 2 +- .../code/GMS_fnc_spawnDynamicUMSMission.sqf | 40 +- .../Missions/UMS/dynamicMissions/default.sqf | 6 +- .../custom_server/init/blck_init_server.sqf | 2 +- @GMS/addons/custom_server/init/build.sqf | 4 +- 83 files changed, 6476 insertions(+), 679 deletions(-) delete mode 100644 @GMS/addons/custom_server/.vscode/launch.json create mode 100644 @GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn - Copy.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup - Copy.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMapMarker.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionAIareDead.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy (2).sqf create mode 100644 @GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionParatroops.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols - Copy.sqf delete mode 100644 @GMS/addons/custom_server/Compiles/Units/GMS_fnc_placeCharacterInBuilding.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit - Copy.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaUnits.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle - Copy.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol - Copy.sqf create mode 100644 @GMS/addons/custom_server/Configs/armed_vics_notes.txt create mode 100644 @GMS/addons/custom_server/Configs/blck_custom_config_RC.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - 2.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy (2).sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy (3).sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy (4).sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits-1.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits_failed.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_sm_init_functions.sqf diff --git a/@GMS/addons/custom_server/.vscode/launch.json b/@GMS/addons/custom_server/.vscode/launch.json deleted file mode 100644 index 3074411..0000000 --- a/@GMS/addons/custom_server/.vscode/launch.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - // 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" - } - ] -} \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn - Copy.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn - Copy.sqf new file mode 100644 index 0000000..e077695 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn - Copy.sqf @@ -0,0 +1,130 @@ +// 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; diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup - Copy.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup - Copy.sqf new file mode 100644 index 0000000..68a34c1 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup - Copy.sqf @@ -0,0 +1,107 @@ +/* + 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 diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf index a2447ce..c852ac7 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf @@ -14,13 +14,7 @@ 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",[]], ["_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}; +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 diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMapMarker.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMapMarker.sqf new file mode 100644 index 0000000..0e5ca32 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMapMarker.sqf @@ -0,0 +1,43 @@ +/* +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 \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionAIareDead.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionAIareDead.sqf new file mode 100644 index 0000000..8aadf40 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionAIareDead.sqf @@ -0,0 +1,28 @@ +// 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; + diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy (2).sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy (2).sqf new file mode 100644 index 0000000..51b82c0 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy (2).sqf @@ -0,0 +1,658 @@ +/* + 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: _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]; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy.sqf new file mode 100644 index 0000000..abbce3e --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy.sqf @@ -0,0 +1,608 @@ +/* + 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: _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]; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf index 4aed6ae..cb77325 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf @@ -19,6 +19,16 @@ 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; @@ -37,20 +47,21 @@ 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 = []; @@ -61,6 +72,7 @@ _blck_AllMissionAI = []; _AI_Vehicles = []; _blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType]; #define delayTime 1 +//_groupPatrolRadius = 50; #ifdef blck_debugMode diag_log "_missionSpawner: All variables initialized"; @@ -68,10 +80,12 @@ 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? @@ -101,6 +115,7 @@ 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 @@ -174,6 +189,7 @@ if (blck_debugLevel > 0) then uiSleep delayTime;; _temp = [_coords,_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles; +//uisleep 1; _crates append _temp; uiSleep delayTime; @@ -181,6 +197,7 @@ 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]; { @@ -223,25 +240,16 @@ if (blck_debugLevel > 0) then _assetSpawned = objNull; if !(_hostageConfig isEqualTo []) then { - _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); + _assetSpawned = [_coords,_hostageConfig] call blck_fnc_spawnHostage; //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 { - _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); + _assetSpawned = [_coords,_enemyLeaderConfig] call blck_fnc_spawnLeader; //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 @@ -258,6 +266,8 @@ _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 @@ -291,6 +301,7 @@ 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]}; @@ -301,7 +312,8 @@ if (_noChoppers > 0) then { if (random(1) < _chanceHeliPatrol) then { - _temp = [_coords,_aiDifficultyLevel,_missionHelis,_uniforms,_headGear,_vests,_backpacks,_weaponList, _sideArms,"none"] call blck_fnc_spawnMissionHeli; + //_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 { @@ -330,6 +342,8 @@ _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 diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selecctChanceParatroops.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selecctChanceParatroops.sqf index 4346e4e..2cfae72 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selecctChanceParatroops.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selecctChanceParatroops.sqf @@ -1,15 +1,3 @@ -/* - 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"]; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIBackpacks.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIBackpacks.sqf index ac4493b..3b22349 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIBackpacks.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIBackpacks.sqf @@ -1,15 +1,3 @@ -/* - 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"]; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIHeadgear.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIHeadgear.sqf index 8f9b638..a07a3d7 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIHeadgear.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIHeadgear.sqf @@ -1,15 +1,3 @@ -/* - 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"]; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAISidearms.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAISidearms.sqf index b73689d..0fdcc4e 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAISidearms.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAISidearms.sqf @@ -1,18 +1,5 @@ -/* - 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"]; //[["_aiDifficultyLevel",selectRandom["Red","Green"]]]; -//diag_log format["_fnc_selectAISidearms: _aiDifficultyLevel = %1",_aiDifficultyLevel]; +params["_aiDifficultyLevel"]; private["_sideArms"]; switch (toLower (_aiDifficultyLevel)) do { diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIUniforms.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIUniforms.sqf index e2e4ee6..6b4842f 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIUniforms.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIUniforms.sqf @@ -1,15 +1,3 @@ -/* - 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"]; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIVests.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIVests.sqf index 5c25fd9..7c3a75d 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIVests.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIVests.sqf @@ -1,15 +1,3 @@ -/* - 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"]; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectChanceHeliPatrol.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectChanceHeliPatrol.sqf index f0363fa..527b81d 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectChanceHeliPatrol.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectChanceHeliPatrol.sqf @@ -1,15 +1,3 @@ -/* - 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"]; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectMissionHelis.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectMissionHelis.sqf index 637f3e6..7b38689 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectMissionHelis.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectMissionHelis.sqf @@ -1,15 +1,3 @@ -/* - 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"]; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberAirPatrols.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberAirPatrols.sqf index 62434ef..2b28423 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberAirPatrols.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberAirPatrols.sqf @@ -1,15 +1,3 @@ -/* - 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"]; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberParatroops.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberParatroops.sqf index 7ca0530..ffd1685 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberParatroops.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberParatroops.sqf @@ -1,15 +1,3 @@ -/* - 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"]; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf index 558beb6..b7f3b6a 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf @@ -17,13 +17,8 @@ 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]; @@ -33,12 +28,11 @@ _newObjs pushBack _obj; _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; }; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf index 8cb34f7..9ecf20b 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf @@ -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 (_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}; +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 diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf index 706fcbc..d84ba3d 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf @@ -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",[]],["_headGear",blck_BanditHeadgear],["_vests",[]],["_backpacks",[]],["_weapons",[]],["_sideArms",[]],["_isScubaGroup",false]]; +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]]; #ifdef blck_debugMode if (blck_debugLevel >=2) then { diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionParatroops.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionParatroops.sqf new file mode 100644 index 0000000..a5cc262 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionParatroops.sqf @@ -0,0 +1,53 @@ +/* + 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 + diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols - Copy.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols - Copy.sqf new file mode 100644 index 0000000..9da35c4 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols - Copy.sqf @@ -0,0 +1,122 @@ +/* + 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 diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf index 435faef..9da35c4 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf @@ -14,23 +14,18 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; // params["_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",20], ["_maxDist",35],["_configureWaypoints",true], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_scuba",false] ]; -params["_coords","_noVehiclePatrols","_skillAI","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_isScubaGroup",false]]; -//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]]; +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","_skillAI","_missionPatrolVehicles","_useRelativePos","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms","_isScubaGroup"]; + 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; @@ -47,7 +42,7 @@ if (_missionPatrolVehicles isEqualTo []) then _useRelativePos = false; _vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius; { - _v = [_skillAI] call blck_fnc_selectPatrolVehicle; + _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; @@ -69,7 +64,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,_skillAI,1,2,false,_uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; + _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; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnRandomLandscape.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnRandomLandscape.sqf index 562d308..2076b85 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnRandomLandscape.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnRandomLandscape.sqf @@ -11,24 +11,17 @@ 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 ["RoadCone_L_F", _coords]; // To designate the mission center -_wreck allowDamage true; -_wreck enableSimulation false; -_wreck enableSimulationGlobal false; -_wreck enableDynamicSimulation false; +//_wreck = createVehicle ["Flag_AAF_F", _coords, [], 25, "NONE"]; _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, [], 2]; - //diag_log format["_fnc_spawnRandomLandscape: _x = %1 | _wreck = %2",_x,_wreck]; + _wreck = createVehicle[_x, _pos, [], 0, "CAN_COLLIDE"]; _wreck allowDamage true; _wreck enableSimulation false; _wreck enableSimulationGlobal false; @@ -36,7 +29,6 @@ _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; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_placeCharacterInBuilding.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_placeCharacterInBuilding.sqf deleted file mode 100644 index e6f2ece..0000000 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_placeCharacterInBuilding.sqf +++ /dev/null @@ -1,25 +0,0 @@ -/* - 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 \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnCharacter.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnCharacter.sqf index 8d0d7d2..a1a6d02 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnCharacter.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnCharacter.sqf @@ -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 \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnHostage.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnHostage.sqf index 3975d7e..7b11760 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnHostage.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnHostage.sqf @@ -11,13 +11,16 @@ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; params["_coords","_hostageConfigs"]; -private["_hostageGroup","_hostage","_building"]; +private["_hostageGroup","_hostage"]; _hostage = [_coords,_hostageConfigs] call blck_fnc_spawnCharacter; _hostage remoteExec["GMS_fnc_initHostage", -2, true]; _hostage setVariable["assetType",1,true]; -_building = [_hostage,_coords,_hostageConfigs select 7] call blck_fnc_placeCharacterInBuilding; -_result = [_hostage,_building]; -//diag_log format["_fnd_spawnHostage: _result = %1",_result]; -_result +/* +private _marker = createMarker [format["hostageMarger%1",getPos _hostage], getPos _hostage]; +_marker setMarkerColor "ColorBlack"; +_marker setMarkerType "mil_dot"; +_marker setMarkerText "Hostage"; +*/ +_hostage diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnLeader.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnLeader.sqf index f1ae006..418cf8a 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnLeader.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnLeader.sqf @@ -11,15 +11,17 @@ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; params["_coords","_leaderConfigs"]; -private["_leader","_building","_result"]; +private["_leader"]; _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]; -//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 +/* +private _marker = createMarker [format["hostageMarger%1",getPos _leader], getPos _leader]; +_marker setMarkerColor "ColorBlack"; +_marker setMarkerType "mil_dot"; +_marker setMarkerText "Hostage"; +*/ +_leader diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf index 1db1cb8..05c09f2 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf @@ -18,15 +18,7 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -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}; - +params["_pos","_numAI","_skillAI",["_uniforms",blck_SkinList],["_headGear",blck_headgearList],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weapons",[]],["_sideArms",blck_Pistols],["_isScuba",false]]; private["_arc","_dir","_spawnPos","_chute","_unit","_return","_paraGroup"]; private _params = ["_pos","_numAI","_skillAI"]; #ifdef blck_debugMode @@ -50,7 +42,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,_sideArms,_isScuba] call blck_fnc_spawnUnit; + _unit = [getPos _chute,_paraGroup,_skillAI,_uniforms,_headGear,_vests,_backpacks,launcherType,_weapons] call blck_fnc_spawnUnit; #ifdef blck_debugMode diag_log format["_fnc_spawnParaUnits: unit %1 = %2 dropping in chute %3",_i,_unit,_chute]; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit - Copy.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit - Copy.sqf new file mode 100644 index 0000000..4d53f0b --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit - Copy.sqf @@ -0,0 +1,210 @@ +/* + 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 + + diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf index 2c6b3fa..b542695 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf @@ -13,13 +13,8 @@ #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", []],["_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}; +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 { @@ -119,7 +114,6 @@ 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"); @@ -187,8 +181,6 @@ else _unit setVariable ["hasNVG", false,true]; }; -_unit addWeapon selectRandomWeighted["",4,"Binocular",3,"Rangefinder",1]; - #ifdef blck_debugMode if (blck_debugLevel > 2) then { diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf index 281a1dd..fcfd9e1 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf @@ -13,20 +13,12 @@ #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 (_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]; -*/ - +if (count _uniforms == 0) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; +if (count _headGear == 0) then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear}; +if (count _vests == 0) then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests}; +if (count _backpacks == 0) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks}; +if (count _weaponList == 0) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; +if (count _sideArms == 0) then {[_aiDifficultyLevel] call blck_fnc_selectAISidearms}; #ifdef blck_debugMode if (blck_debugLevel > 0) then { @@ -90,7 +82,7 @@ if !(isNull _grpPilot) then [_patrolHeli] call blck_fnc_emptyObject; _launcherType = "none"; - //params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", []],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]]; + //params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_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; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf index 00d168e..ed49767 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf @@ -15,14 +15,12 @@ // [_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 (_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}; - +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 { diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaUnits.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaUnits.sqf new file mode 100644 index 0000000..71a65b6 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaUnits.sqf @@ -0,0 +1,82 @@ +/* + 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; + + + diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle - Copy.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle - Copy.sqf new file mode 100644 index 0000000..2435b33 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle - Copy.sqf @@ -0,0 +1,39 @@ +/* + 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 + diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol - Copy.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol - Copy.sqf new file mode 100644 index 0000000..3124f14 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol - Copy.sqf @@ -0,0 +1,79 @@ +/* + 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 + + diff --git a/@GMS/addons/custom_server/Compiles/blck_functions.sqf b/@GMS/addons/custom_server/Compiles/blck_functions.sqf index ed48e72..4021752 100644 --- a/@GMS/addons/custom_server/Compiles/blck_functions.sqf +++ b/@GMS/addons/custom_server/Compiles/blck_functions.sqf @@ -60,11 +60,13 @@ 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"; @@ -80,11 +82,13 @@ 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] @@ -106,6 +110,9 @@ 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"; @@ -141,7 +148,6 @@ 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"; diff --git a/@GMS/addons/custom_server/Configs/armed_vics_notes.txt b/@GMS/addons/custom_server/Configs/armed_vics_notes.txt new file mode 100644 index 0000000..199a327 --- /dev/null +++ b/@GMS/addons/custom_server/Configs/armed_vics_notes.txt @@ -0,0 +1,91 @@ + +_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" +]; + diff --git a/@GMS/addons/custom_server/Configs/blck_custom_config_RC.sqf b/@GMS/addons/custom_server/Configs/blck_custom_config_RC.sqf new file mode 100644 index 0000000..f1540cb --- /dev/null +++ b/@GMS/addons/custom_server/Configs/blck_custom_config_RC.sqf @@ -0,0 +1,1269 @@ + +/* + for ghostridergaming + By Ghostrider [GRG] + Copyright 2016 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +diag_log "[blckeagls] Loading Configuration Overides"; + +/* + See the examples below as a guide for adding configs that are unique for each of several servers. +*/ +/* +private["_startTime"]; +_startTime = diag_tickTime; +_world = toLower format ["%1", worldName]; +private["_nightAccel","_dayAccel","_duskAccel"]; +switch (_world) do { + case "altis":{_nightAccel = 3;_dayAccel=0.5; _duskAccel = 3;}; + case "napf":{_nightAccel = 12; _dayAccel = 2;_duskAccel = 6;}; + case "namalsk":{_nightAccel = 12; _dayAccel = 2;_duskAccel = 6;}; + case "tanoa":{_nightAccel = 12; _dayAccel = 3.2;_duskAccel = 6;}; +}; + +switch (toLower (worldName)) do +{ + case "altis": + { + private ["_arr","_sunrise","_sunset","_time"]; + _arr = date call BIS_fnc_sunriseSunsetTime; + _sunrise = _arr select 0; + _sunset = _arr select 1; + _daylight = _sunset - _sunrise; + _nightTime = abs(24 - _daylight); + _time = dayTime; + #ifdef blck_milServer + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = (_daylight)/3; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = _nightTime / 6; // Nighttim time acceleration + #else + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = (_daylight)/8; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = _nightTime / 8; // Nighttim time acceleration + #endif + //blck_maxCrashSites = 3; + }; + case"tanoa": + { + blck_maxCrashSites = 2; + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = 1.4; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = 8; // Nighttim time acceleration + }; + case"namalsk": + { + private ["_arr","_sunrise","_sunset","_time"]; + _arr = date call BIS_fnc_sunriseSunsetTime; + _sunrise = _arr select 0; + _sunset = _arr select 1; + _daylight = _sunset - _sunrise; + _nightTime = abs(24 - _daylight); + _time = dayTime; + _serverUpTime = 8; + blck_enableOrangeMissions = 1; + blck_enableGreenMissions = -1; + blck_enableRedMissions = 1; + blck_enableBlueMissions = -1; + blck_enableHunterMissions = 1; + blck_enableScoutsMissions = -1; + blck_maxCrashSites = 1; // recommended settings: 3 for Altis, 2 for Tanoa, 1 for smaller maps. Set to -1 to disable + + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = ((_serverUpTime + 2)/_daylight); // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = (3/_nightTime); // Nighttim time acceleration + }; + case "esseker": + { + blck_enableOrangeMissions = 1; + blck_enableGreenMissions = -1; + blck_enableRedMissions = 1; + blck_enableBlueMissions = -1; + blck_enableHunterMissions = 1; + blck_enableScoutsMissions = -1; + blck_maxCrashSites = 1; + + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = 1; // Daytime time accelearation + blck_timeAccelerationDusk = 3; // Dawn/dusk time accelearation + blck_timeAccelerationNight = 6; // Nighttim time acceleration + }; + case "panthera3": + { + blck_maxCrashSites = 2; + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = 1.4; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = 8; // Nighttim time acceleration + }; + case "malden": + { + _arr = date call BIS_fnc_sunriseSunsetTime; + _sunrise = _arr select 0; + _sunset = _arr select 1; + _time = dayTime; + _daylight = _sunset - _sunrise; + + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = (_daylight / 2.5); // Daytime time accelearation + blck_timeAccelerationDusk = 8; // Dawn/dusk time accelearation + blck_timeAccelerationNight = ((24 - _daylight) / 1.5); // Nighttim time acceleration + blck_enableOrangeMissions = -1; + blck_enableGreenMissions = -1; + blck_enableRedMissions = -2; + blck_enableBlueMissions = -1; + blck_numberUnderwaterDynamicMissions = -3; + blck_enableHunterMissions = -1; + blck_enableScoutsMissions = -1; + blck_maxCrashSites = 3; + }; +}; +*/ + + +/* + You can define configs for additional mods or loadouts here +*/ +/* +blck_CUPWeapons = [ + "CUP_lmg_L7A2", + "CUP_lmg_L110A1", + "CUP_lmg_M240", + "CUP_lmg_M249", + "CUP_lmg_M249_ElcanM145_Laser", + "CUP_lmg_Mk48_des", + "CUP_lmg_Mk48_wdl", + "CUP_lmg_PKM", + "CUP_lmg_UK59", + "CUP_lmg_Pecheneg", + "CUP_arifle_AK74", + "CUP_arifle_AK107", + "CUP_arifle_AK107_GL", + "CUP_arifle_AKS74", + "CUP_arifle_AKS74U", + "CUP_arifle_AK74_GL", + "CUP_arifle_AKM", + "CUP_arifle_AKS", + "CUP_arifle_AKS_Gold", + "CUP_arifle_RPK74", + "CUP_arifle_CZ805_A2", + "CUP_arifle_FNFAL", + "CUP_arifle_G36A", + "CUP_arifle_G36A_camo", + "CUP_arifle_G36K", + "CUP_arifle_G36K_camo", + "CUP_arifle_G36C", + "CUP_arifle_G36C_camo", + "CUP_arifle_MG36", + "CUP_arifle_MG36_camo", + "CUP_arifle_L85A2", + "CUP_arifle_L85A2_GL", + "CUP_arifle_L86A2", + "CUP_arifle_M16A2", + "CUP_arifle_M16A2_GL", + "CUP_arifle_M4A1", + "CUP_arifle_M4A1_camo", + "CUP_arifle_M4A3_desert_Aim_Flashlight", + "CUP_arifle_M16A4_Base", + "CUP_arifle_M4A1_BUIS_GL", + "CUP_arifle_M4A1_BUIS_camo_GL", + "CUP_arifle_M4A1_BUIS_desert_GL", + "CUP_arifle_M4A1_desert", + "CUP_arifle_Sa58P", + "CUP_arifle_Sa58V", + "CUP_arifle_Mk16_CQC", + "CUP_arifle_XM8_Railed", + "CUP_arifle_XM8_Carbine", + "CUP_arifle_XM8_Carbine_FG", + "CUP_arifle_XM8_Carbine_GL", + "CUP_arifle_XM8_Compact", + "CUP_arifle_xm8_SAW", + "CUP_arifle_xm8_sharpshooter", + "CUP_arifle_CZ805_A1", + "CUP_arifle_CZ805_GL", + "CUP_arifle_CZ805_B_GL", + "CUP_arifle_CZ805_B", + "CUP_arifle_Sa58P_des", + "CUP_arifle_Sa58V_camo", + "CUP_arifle_Sa58RIS1", + "CUP_arifle_Sa58RIS2", + "CUP_arifle_Mk16_CQC_FG", + "CUP_arifle_Mk16_CQC_SFG", + "CUP_arifle_Mk16_CQC_EGLM", + "CUP_arifle_Mk16_STD", + "CUP_arifle_Mk16_STD_FG", + "CUP_arifle_Mk16_STD_SFG", + "CUP_arifle_Mk16_STD_EGLM", + "CUP_arifle_Mk16_SV", + "CUP_arifle_Mk17_CQC", + "CUP_arifle_Mk17_CQC_FG", + "CUP_arifle_Mk17_CQC_SFG", + "CUP_arifle_Mk17_CQC_EGLM", + "CUP_arifle_Mk17_STD", + "CUP_arifle_Mk17_STD_FG", + "CUP_arifle_Mk17_STD_SFG", + "CUP_arifle_Mk17_STD_EGLM", + "CUP_arifle_Mk20", + "CUP_srifle_AWM_des", + "CUP_srifle_AWM_wdl", + "CUP_srifle_CZ750", + "CUP_srifle_DMR", + "CUP_srifle_CZ550", + "CUP_srifle_LeeEnfield", + "CUP_srifle_M14", + "CUP_srifle_Mk12SPR", + "CUP_srifle_M24_des", + "CUP_srifle_M24_wdl", + "CUP_srifle_M24_ghillie", + "CUP_srifle_M40A3", + "CUP_srifle_M107_Base", + "CUP_srifle_M110", + "CUP_srifle_SVD", + "CUP_srifle_SVD_des", + "CUP_srifle_SVD_wdl_ghillie", + "CUP_srifle_SVD_NSPU", + "CUP_srifle_ksvk", + "CUP_srifle_VSSVintorez", + "CUP_srifle_AS50" +]; + +blck_CUPUniforms = [ + "CUP_U_B_CZ_WDL_TShirt", + "CUP_U_I_GUE_Anorak_01", + "CUP_U_I_GUE_Anorak_03", + "CUP_U_I_GUE_Anorak_02", + "CUP_U_B_BAF_DDPM_S2_UnRolled", + "CUP_U_B_BAF_DDPM_S1_RolledUp", + "CUP_U_B_BAF_DDPM_Tshirt", + "CUP_U_B_BAF_DPM_S2_UnRolled", + "CUP_U_B_BAF_DPM_S1_RolledUp", + "CUP_U_B_BAF_DPM_Tshirt", + "CUP_U_B_BAF_MTP_S2_UnRolled", + "CUP_U_B_BAF_MTP_S1_RolledUp", + "CUP_U_B_BAF_MTP_Tshirt", + "CUP_U_B_BAF_MTP_S4_UnRolled", + "CUP_U_B_BAF_MTP_S3_RolledUp", + "CUP_U_B_BAF_MTP_S5_UnRolled", + "CUP_U_B_BAF_MTP_S6_UnRolled", + "CUP_U_O_CHDKZ_Bardak", + "CUP_U_O_CHDKZ_Lopotev", + "CUP_U_O_CHDKZ_Kam_03", + "CUP_U_O_CHDKZ_Kam_01", + "CUP_U_O_CHDKZ_Kam_04", + "CUP_U_O_CHDKZ_Kam_02", + "CUP_U_O_CHDKZ_Commander", + "CUP_U_O_CHDKZ_Kam_08", + "CUP_U_O_CHDKZ_Kam_05", + "CUP_U_O_CHDKZ_Kam_07", + "CUP_U_O_CHDKZ_Kam_06", + "CUP_U_C_Citizen_02", + "CUP_U_C_Citizen_01", + "CUP_U_C_Citizen_04", + "CUP_U_C_Citizen_03", + "CUP_U_C_Fireman_01", + "CUP_U_B_GER_Flecktarn_2", + "CUP_U_B_GER_Tropentarn_2", + "CUP_U_B_GER_Flecktarn_1", + "CUP_U_B_GER_Tropentarn_1", + "CUP_O_TKI_Khet_Jeans_04", + "CUP_O_TKI_Khet_Jeans_02", + "CUP_O_TKI_Khet_Jeans_01", + "CUP_O_TKI_Khet_Jeans_03", + "CUP_O_TKI_Khet_Partug_04", + "CUP_O_TKI_Khet_Partug_02", + "CUP_O_TKI_Khet_Partug_01", + "CUP_O_TKI_Khet_Partug_07", + "CUP_O_TKI_Khet_Partug_08", + "CUP_O_TKI_Khet_Partug_05", + "CUP_O_TKI_Khet_Partug_06", + "CUP_O_TKI_Khet_Partug_03", + "CUP_U_C_Labcoat_02", + "CUP_U_C_Labcoat_03", + "CUP_U_C_Labcoat_01", + "CUP_U_B_USMC_Officer", + "CUP_U_B_USMC_MARPAT_WDL_RollUpKneepad", + "CUP_U_B_USMC_MARPAT_WDL_RolledUp", + "CUP_U_B_USMC_MARPAT_WDL_Kneepad", + "CUP_U_B_USMC_MARPAT_WDL_TwoKneepads", + "CUP_U_B_USMC_MARPAT_WDL_Sleeves", + "CUP_U_C_Mechanic_02", + "CUP_U_C_Mechanic_03", + "CUP_U_C_Mechanic_01", + "CUP_U_I_GUE_Flecktarn2", + "CUP_U_I_GUE_Flecktarn3", + "CUP_U_I_GUE_Flecktarn", + "CUP_U_I_GUE_Woodland1", + "CUP_B_USMC_Navy_Blue", + "CUP_B_USMC_Navy_Brown", + "CUP_B_USMC_Navy_Green", + "CUP_B_USMC_Navy_Red", + "CUP_B_USMC_Navy_Violet", + "CUP_B_USMC_Navy_White", + "CUP_B_USMC_Navy_Yellow", + "CUP_U_C_Rescuer_01", + "CUP_U_O_Partisan_TTsKO", + "CUP_U_O_Partisan_TTsKO_Mixed", + "CUP_U_O_Partisan_VSR_Mixed1", + "CUP_U_O_Partisan_VSR_Mixed2", + "CUP_U_C_Pilot_01", + "CUP_U_C_Policeman_01", + "CUP_U_C_Priest_01", + "CUP_U_C_Profiteer_02", + "CUP_U_C_Profiteer_03", + "CUP_U_C_Profiteer_01", + "CUP_U_C_Profiteer_04", + "CUP_U_I_RACS_Desert_2", + "CUP_U_I_RACS_Urban_2", + "CUP_U_I_RACS_PilotOverall", + "CUP_U_I_RACS_Desert_1", + "CUP_U_I_RACS_Urban_1", + "CUP_U_C_Rocker_01", + "CUP_U_C_Rocker_03", + "CUP_U_C_Rocker_02", + "CUP_U_C_Rocker_04", + "CUP_U_O_RUS_Gorka_Green", + "CUP_U_O_RUS_Gorka_Partizan_A", + "CUP_U_O_RUS_Gorka_Partizan", + "CUP_U_O_RUS_EMR_1_VDV", + "CUP_U_O_RUS_EMR_1", + "CUP_U_O_RUS_Flora_1_VDV", + "CUP_U_O_RUS_Flora_1", + "CUP_U_O_RUS_Commander", + "CUP_U_O_RUS_EMR_2_VDV", + "CUP_U_O_RUS_EMR_2", + "CUP_U_O_RUS_Flora_2_VDV", + "CUP_U_O_RUS_Flora_2", + "CUP_U_O_SLA_Officer_Suit", + "CUP_U_O_SLA_Overalls_Pilot", + "CUP_U_O_SLA_Overalls_Tank", + "CUP_U_O_SLA_MixedCamo", + "CUP_U_O_SLA_Desert", + "CUP_U_O_SLA_Green", + "CUP_U_O_SLA_Urban", + "CUP_U_B_FR_SpecOps", + "CUP_U_B_FR_Officer", + "CUP_U_B_FR_DirAction", + "CUP_U_B_FR_DirAction2", + "CUP_U_B_FR_Corpsman", + "CUP_U_B_FR_Light", + "CUP_U_B_FR_Scout1", + "CUP_U_B_FR_Scout2", + "CUP_U_B_FR_Scout3", + "CUP_U_B_FR_Scout", + "CUP_U_C_Suit_01", + "CUP_U_C_Suit_02", + "CUP_U_O_TK_Officer", + "CUP_U_O_SLA_Officer", + "CUP_U_O_TK_Green", + "CUP_U_O_TK_MixedCamo", + "CUP_U_B_USArmy_TwoKnee", + "CUP_U_B_USArmy_Base", + "CUP_U_B_USArmy_Soft", + "CUP_U_B_USArmy_UBACS", + "CUP_U_B_USArmy_PilotOverall", + "CUP_U_B_USMC_PilotOverall", + "CUP_U_C_Villager_01", + "CUP_U_C_Villager_04", + "CUP_U_C_Villager_02", + "CUP_U_C_Villager_03", + "CUP_U_C_Woodlander_01", + "CUP_U_C_Woodlander_02", + "CUP_U_C_Woodlander_03", + "CUP_U_C_Woodlander_04", + "CUP_U_C_Worker_03", + "CUP_U_C_Worker_04", + "CUP_U_C_Worker_02", + "CUP_U_C_Worker_01", + "CUP_U_B_BAF_DDPM_Ghillie", + "CUP_U_B_BAF_MTP_Ghillie", + "CUP_U_B_BAF_DPM_Ghillie", + "CUP_U_B_GER_Ghillie", + "CUP_U_B_GER_Fleck_Ghillie", + "CUP_U_B_USMC_Ghillie_WDL", + "CUP_U_I_Ghillie_Top", + "CUP_U_O_RUS_Ghillie", + "CUP_U_O_TK_Ghillie", + "CUP_U_O_TK_Ghillie_Top", + "CUP_U_B_USArmy_Ghillie" +]; + +blck_CUPVests = [ + "CUP_V_BAF_Osprey_Mk2_DDPM_Grenadier", + "CUP_V_BAF_Osprey_Mk2_DDPM_Medic", + "CUP_V_BAF_Osprey_Mk2_DDPM_Officer", + "CUP_V_BAF_Osprey_Mk2_DDPM_Sapper", + "CUP_V_BAF_Osprey_Mk2_DDPM_Scout", + "CUP_V_BAF_Osprey_Mk2_DDPM_Soldier1", + "CUP_V_BAF_Osprey_Mk2_DDPM_Soldier2", + "CUP_V_BAF_Osprey_Mk2_DPM_Grenadier", + "CUP_V_BAF_Osprey_Mk2_DPM_Medic", + "CUP_V_BAF_Osprey_Mk2_DPM_Officer", + "CUP_V_BAF_Osprey_Mk2_DPM_Sapper", + "CUP_V_BAF_Osprey_Mk2_DPM_Scout", + "CUP_V_BAF_Osprey_Mk2_DPM_Soldier1", + "CUP_V_BAF_Osprey_Mk2_DPM_Soldier2", + "CUP_V_BAF_Osprey_Mk4_MTP_Grenadier", + "CUP_V_BAF_Osprey_Mk4_MTP_MachineGunner", + "CUP_V_BAF_Osprey_Mk4_MTP_Rifleman", + "CUP_V_BAF_Osprey_Mk4_MTP_SquadLeader", + "CUP_V_B_GER_Carrier_Rig", + "CUP_V_B_GER_Carrier_Rig_2", + "CUP_V_B_GER_Carrier_Vest", + "CUP_V_B_GER_Carrier_Vest_2", + "CUP_V_B_GER_Carrier_Vest_3", + "CUP_V_B_GER_Vest_1", + "CUP_V_B_GER_Vest_2", + "CUP_V_B_LHDVest_Blue", + "CUP_V_B_LHDVest_Brown", + "CUP_V_B_LHDVest_Green", + "CUP_V_B_LHDVest_Red", + "CUP_V_B_LHDVest_Violet", + "CUP_V_B_LHDVest_White", + "CUP_V_B_LHDVest_Yellow", + "CUP_V_B_MTV", + "CUP_V_B_MTV_LegPouch", + "CUP_V_B_MTV_MG", + "CUP_V_B_MTV_Marksman", + "CUP_V_B_MTV_Mine", + "CUP_V_B_MTV_Patrol", + "CUP_V_B_MTV_PistolBlack", + "CUP_V_B_MTV_Pouches", + "CUP_V_B_MTV_TL", + "CUP_V_B_MTV_noCB", + "CUP_V_B_PilotVest", + "CUP_V_B_RRV_DA1", + "CUP_V_B_RRV_DA2", + "CUP_V_B_RRV_Light", + "CUP_V_B_RRV_MG", + "CUP_V_B_RRV_Medic", + "CUP_V_B_RRV_Officer", + "CUP_V_B_RRV_Scout", + "CUP_V_B_RRV_Scout2", + "CUP_V_B_RRV_Scout3", + "CUP_V_B_RRV_TL", + "CUP_V_I_Carrier_Belt", + "CUP_V_I_Guerilla_Jacket", + "CUP_V_I_RACS_Carrier_Vest", + "CUP_V_I_RACS_Carrier_Vest_2", + "CUP_V_I_RACS_Carrier_Vest_3", + "CUP_V_OI_TKI_Jacket1_01", + "CUP_V_OI_TKI_Jacket1_02", + "CUP_V_OI_TKI_Jacket1_03", + "CUP_V_OI_TKI_Jacket1_04", + "CUP_V_OI_TKI_Jacket1_05", + "CUP_V_OI_TKI_Jacket1_06", + "CUP_V_OI_TKI_Jacket2_01", + "CUP_V_OI_TKI_Jacket2_02", + "CUP_V_OI_TKI_Jacket2_03", + "CUP_V_OI_TKI_Jacket2_04", + "CUP_V_OI_TKI_Jacket2_05", + "CUP_V_OI_TKI_Jacket2_06", + "CUP_V_OI_TKI_Jacket3_01", + "CUP_V_OI_TKI_Jacket3_02", + "CUP_V_OI_TKI_Jacket3_03", + "CUP_V_OI_TKI_Jacket3_04", + "CUP_V_OI_TKI_Jacket3_05", + "CUP_V_OI_TKI_Jacket3_06", + "CUP_V_OI_TKI_Jacket4_01", + "CUP_V_OI_TKI_Jacket4_02", + "CUP_V_OI_TKI_Jacket4_03", + "CUP_V_OI_TKI_Jacket4_04", + "CUP_V_OI_TKI_Jacket4_05", + "CUP_V_OI_TKI_Jacket4_06", + "CUP_V_O_SLA_Carrier_Belt", + "CUP_V_O_SLA_Carrier_Belt02", + "CUP_V_O_SLA_Carrier_Belt03", + "CUP_V_O_SLA_Flak_Vest01", + "CUP_V_O_SLA_Flak_Vest02", + "CUP_V_O_SLA_Flak_Vest03", + "CUP_V_O_TK_CrewBelt", + "CUP_V_O_TK_OfficerBelt", + "CUP_V_O_TK_OfficerBelt2", + "CUP_V_O_TK_Vest_1", + "CUP_V_O_TK_Vest_2" +]; + +blck_CUPBackpacks = [ + "CUP_B_ACRPara_m95", + "CUP_B_AssaultPack_ACU", + "CUP_B_AssaultPack_Black", + "CUP_B_AssaultPack_Coyote", + "CUP_B_Bergen_BAF", + "CUP_B_CivPack_WDL", + "CUP_B_GER_Pack_Flecktarn", + "CUP_B_GER_Pack_Tropentarn", + "CUP_B_HikingPack_Civ", + "CUP_B_MOLLE_WDL", + "CUP_B_RUS_Backpack", + "CUP_B_USMC_AssaultPack", + "CUP_B_USMC_MOLLE", + "CUP_B_USPack_Black", + "CUP_B_USPack_Coyote" +]; + +blck_CUPHeadgear = [ + "CUP_H_BAF_Helmet_1_DDPM", + "CUP_H_BAF_Helmet_1_DPM", + "CUP_H_BAF_Helmet_1_MTP", + "CUP_H_BAF_Helmet_2_DDPM", + "CUP_H_BAF_Helmet_2_DPM", + "CUP_H_BAF_Helmet_2_MTP", + "CUP_H_BAF_Helmet_3_DDPM", + "CUP_H_BAF_Helmet_3_DPM", + "CUP_H_BAF_Helmet_3_MTP", + "CUP_H_BAF_Helmet_4_DDPM", + "CUP_H_BAF_Helmet_4_DPM", + "CUP_H_BAF_Helmet_4_MTP", + "CUP_H_BAF_Officer_Beret_PRR_O", + "CUP_H_C_Beanie_01", + "CUP_H_C_Beanie_02", + "CUP_H_C_Beanie_03", + "CUP_H_C_Beanie_04", + "CUP_H_C_Beret_01", + "CUP_H_C_Beret_02", + "CUP_H_C_Beret_03", + "CUP_H_C_Beret_04", + "CUP_H_C_Ushanka_01", + "CUP_H_C_Ushanka_02", + "CUP_H_C_Ushanka_03", + "CUP_H_C_Ushanka_04", + "CUP_H_FR_BandanaGreen", + "CUP_H_FR_BandanaWdl", + "CUP_H_FR_Bandana_Headset", + "CUP_H_FR_BeanieGreen", + "CUP_H_FR_BoonieMARPAT", + "CUP_H_FR_BoonieWDL", + "CUP_H_FR_Cap_Headset_Green", + "CUP_H_FR_Cap_Officer_Headset", + "CUP_H_FR_ECH", + "CUP_H_FR_Headband_Headset", + "CUP_H_FR_Headset", + "CUP_H_FR_PRR_BoonieWDL", + "CUP_H_GER_Boonie_Flecktarn", + "CUP_H_GER_Boonie_desert", + "CUP_H_NAPA_Fedora", + "CUP_H_Navy_CrewHelmet_Blue", + "CUP_H_Navy_CrewHelmet_Brown", + "CUP_H_Navy_CrewHelmet_Green", + "CUP_H_Navy_CrewHelmet_Red", + "CUP_H_Navy_CrewHelmet_Violet", + "CUP_H_Navy_CrewHelmet_White", + "CUP_H_Navy_CrewHelmet_Yellow", + "CUP_H_PMC_Cap_Grey", + "CUP_H_PMC_Cap_PRR_Grey", + "CUP_H_PMC_Cap_PRR_Tan", + "CUP_H_PMC_Cap_Tan", + "CUP_H_PMC_EP_Headset", + "CUP_H_PMC_PRR_Headset", + "CUP_H_RACS_Beret_Blue", + "CUP_H_RACS_Helmet_DPAT", + "CUP_H_RACS_Helmet_Des", + "CUP_H_RACS_Helmet_Goggles_DPAT", + "CUP_H_RACS_Helmet_Goggles_Des", + "CUP_H_RACS_Helmet_Headset_DPAT", + "CUP_H_RACS_Helmet_Headset_Des", + "CUP_H_SLA_BeenieGreen", + "CUP_H_SLA_Beret", + "CUP_H_SLA_Boonie", + "CUP_H_SLA_Helmet", + "CUP_H_SLA_OfficerCap", + "CUP_H_SLA_Pilot_Helmet", + "CUP_H_SLA_SLCap", + "CUP_H_SLA_TankerHelmet", + "CUP_H_TKI_Lungee_01", + "CUP_H_TKI_Lungee_02", + "CUP_H_TKI_Lungee_03", + "CUP_H_TKI_Lungee_04", + "CUP_H_TKI_Lungee_05", + "CUP_H_TKI_Lungee_06", + "CUP_H_TKI_Lungee_Open_01", + "CUP_H_TKI_Lungee_Open_02", + "CUP_H_TKI_Lungee_Open_03", + "CUP_H_TKI_Lungee_Open_04", + "CUP_H_TKI_Lungee_Open_05", + "CUP_H_TKI_Lungee_Open_06", + "CUP_H_TKI_Pakol_1_01", + "CUP_H_TKI_Pakol_1_02", + "CUP_H_TKI_Pakol_1_03", + "CUP_H_TKI_Pakol_1_04", + "CUP_H_TKI_Pakol_1_05", + "CUP_H_TKI_Pakol_1_06", + "CUP_H_TKI_Pakol_2_01", + "CUP_H_TKI_Pakol_2_02", + "CUP_H_TKI_Pakol_2_03", + "CUP_H_TKI_Pakol_2_04", + "CUP_H_TKI_Pakol_2_05", + "CUP_H_TKI_Pakol_2_06", + "CUP_H_TKI_SkullCap_01", + "CUP_H_TKI_SkullCap_02", + "CUP_H_TKI_SkullCap_03", + "CUP_H_TKI_SkullCap_04", + "CUP_H_TKI_SkullCap_05", + "CUP_H_TKI_SkullCap_06", + "CUP_H_TK_Beret", + "CUP_H_TK_Helmet", + "CUP_H_TK_Lungee", + "CUP_H_TK_PilotHelmet", + "CUP_H_TK_TankerHelmet", + "CUP_H_USMC_Crew_Helmet", + "CUP_H_USMC_Goggles_HelmetWDL", + "CUP_H_USMC_HeadSet_GoggleW_HelmetWDL", + "CUP_H_USMC_HeadSet_HelmetWDL", + "CUP_H_USMC_HelmetWDL", + "CUP_H_USMC_Helmet_Pilot", + "CUP_H_USMC_Officer_Cap" +]; +blck_RHS_Weapons = [ + "rhs_weap_hk416d10", + "rhs_weap_hk416d10_LMT", + "rhs_weap_hk416d10_m320", + "rhs_weap_hk416d145", + "rhs_weap_hk416d145_m320", + "rhs_weap_m16a4", + "rhs_weap_m16a4_carryhandle", + "rhs_weap_m16a4_carryhandle_M203", + "rhs_weap_m16a4_carryhandle_pmag", + "rhs_weap_m4_carryhandle", + "rhs_weap_m4_carryhandle_pmag", + "rhs_weap_m4_m203", + "rhs_weap_m4_m320", + "rhs_weap_m4a1", + "rhs_weap_m4a1_blockII", + "rhs_weap_m4a1_blockII_KAC", + "rhs_weap_m4a1_blockII_KAC_bk", + "rhs_weap_m4a1_blockII_KAC_d", + "rhs_weap_m4a1_blockII_KAC_wd", + "rhs_weap_m4a1_blockII_M203", + "rhs_weap_m4a1_blockII_M203_bk", + "rhs_weap_m4a1_blockII_M203_d", + "rhs_weap_m4a1_blockII_M203_wd", + "rhs_weap_m4a1_blockII_bk", + "rhs_weap_m4a1_blockII_d", + "rhs_weap_m4a1_blockII_wd", + "rhs_weap_m4a1_carryhandle", + "rhs_weap_m4a1_carryhandle_m203", + "rhs_weap_m4a1_carryhandle_pmag", + "rhs_weap_m4a1_m203", + "rhs_weap_m4a1_m320", + "rhs_weap_mk18", + "rhs_weap_mk18", + "rhs_weap_mk18_KAC", + "rhs_weap_mk18_KAC_bk", + "rhs_weap_mk18_KAC_d", + "rhs_weap_mk18_KAC_wd", + "rhs_weap_mk18_bk", + "rhs_weap_mk18_d", + "rhs_weap_mk18_m320", + "rhs_weap_mk18_wd", + "rhs_weap_m249_pip_L", + "rhs_weap_m249_pip_L_para", + "rhs_weap_m249_pip_L_vfg", + "rhs_weap_m249_pip_S", + "rhs_weap_m249_pip_S_para", + "rhs_weap_m249_pip_S_vfg", + "rhs_weap_m240B", + "rhs_weap_m240B_CAP", + "rhs_weap_m240G", + "rhs_weap_pkm", + "rhs_weap_pkp", + // Added by ElShotte - 1 Item + "rhs_weap_m27iar" +]; + +blck_RHS_UniformsUSAF = [ + "rhs_uniform_FROG01_m81", + "rhs_uniform_FROG01_d", + "rhs_uniform_FROG01_wd", + "rhs_uniform_cu_ocp", + "rhs_uniform_cu_ucp", + "rhs_uniform_cu_ocp_101st", + "rhs_uniform_cu_ocp_10th", + "rhs_uniform_cu_ocp_1stcav", + "rhs_uniform_cu_ocp_82nd", + "rhs_uniform_cu_ucp_101st", + "rhs_uniform_cu_ucp_10th", + "rhs_uniform_cu_ucp_1stcav", + "rhs_uniform_cu_ucp_82nd", + "rhs_uniform_cu_ocp_patchless", + "rhs_uniform_cu_ucp_patchless", + // Added by ElShotte - 5 Items + "rhs_uniform_g3_m81", + "rhs_uniform_g3_blk", + "rhs_uniform_g3_mc", + "rhs_uniform_g3_rgr", + "rhs_uniform_g3_tan" + +]; + +blck_RHS_VestsUSAF = [ + "rhsusf_iotv_ucp", + "rhsusf_iotv_ucp_grenadier", + "rhsusf_iotv_ucp_medic", + "rhsusf_iotv_ucp_repair", + "rhsusf_iotv_ucp_rifleman", + "rhsusf_iotv_ucp_SAW", + "rhsusf_iotv_ucp_squadleader", + "rhsusf_iotv_ucp_teamleader", + "rhsusf_iotv_ocp", + "rhsusf_iotv_ocp_grenadier", + "rhsusf_iotv_ocp_medic", + "rhsusf_iotv_ocp_repair", + "rhsusf_iotv_ocp_rifleman", + "rhsusf_iotv_ocp_SAW", + "rhsusf_iotv_ocp_squadleader", + "rhsusf_iotv_ocp_teamleader", + //added by chainsaw - 2 + "rhsusf_spc", + "rhsusf_spc_mg", + // Added by ElShotte - 12 Items + "rhsusf_spc_marksman", + "rhsusf_spc_corpsman", + "rhsusf_spc_patchless", + "rhsusf_spc_squadleader", + "rhsusf_spc_teamleader", + "rhsusf_spc_light", + "rhsusf_spc_rifleman", + "rhsusf_spc_iar", + "rhsusf_spcs_ocp_rifleman", + "rhsusf_spcs_ocp", + "rhsusf_spcs_ucp_rifleman", + "rhsusf_spcs_ucp" + +]; + +blck_RHS_BackpacksUSAF = [ + "rhsusf_assault_eagleaiii_coy", + "rhsusf_assault_eagleaiii_ocp", + "rhsusf_assault_eagleaiii_ucp", + "rhsusf_falconii_coy", + "rhsusf_falconii_mc", + "rhsusf_falconii", + "RHS_M2_Gun_Bag" + +]; + +blck_RHS_HeadgearUSAF = [ + "rhs_Booniehat_m81", + "rhs_Booniehat_marpatd", + "rhs_Booniehat_marpatwd", + "rhs_Booniehat_ocp", + "rhs_Booniehat_ucp", + "rhsusf_Bowman", + "rhsusf_ach_bare", + "rhsusf_ach_bare_des", + "rhsusf_ach_bare_des_ess", + "rhsusf_ach_bare_des_headset", + "rhsusf_ach_bare_des_headset_ess", + "rhsusf_ach_bare_ess", + "rhsusf_ach_bare_headset", + "rhsusf_ach_bare_headset_ess", + "rhsusf_ach_bare_semi", + "rhsusf_ach_bare_semi_ess", + "rhsusf_ach_bare_semi_headset", + "rhsusf_ach_bare_semi_headset_ess", + "rhsusf_ach_bare_tan", + "rhsusf_ach_bare_tan_ess", + "rhsusf_ach_bare_tan_headset", + "rhsusf_ach_bare_tan_headset_ess", + "rhsusf_ach_bare_wood", + "rhsusf_ach_bare_wood_ess", + "rhsusf_ach_bare_wood_headset", + "rhsusf_ach_bare_wood_headset_ess", + "rhsusf_ach_helmet_ESS_ocp", + "rhsusf_ach_helmet_ESS_ucp", + "rhsusf_ach_helmet_M81", + "rhsusf_ach_helmet_camo_ocp", + "rhsusf_ach_helmet_headset_ess_ocp", + "rhsusf_ach_helmet_headset_ess_ucp", + "rhsusf_ach_helmet_headset_ocp", + "rhsusf_ach_helmet_headset_ucp", + "rhsusf_ach_helmet_ocp", + "rhsusf_ach_helmet_ocp_norotos", + "rhsusf_ach_helmet_ucp", + "rhsusf_ach_helmet_ucp_norotos", + "rhsusf_bowman_cap", + "rhsusf_lwh_helmet_M1942", + "rhsusf_lwh_helmet_marpatd", + "rhsusf_lwh_helmet_marpatd_ess", + "rhsusf_lwh_helmet_marpatd_headset", + "rhsusf_lwh_helmet_marpatwd", + "rhsusf_lwh_helmet_marpatwd_ess", + "rhsusf_lwh_helmet_marpatwd_headset", + "rhsusf_mich_bare", + "rhsusf_mich_bare_alt", + "rhsusf_mich_bare_alt_semi", + "rhsusf_mich_bare_alt_tan", + "rhsusf_mich_bare_headset", + "rhsusf_mich_bare_norotos", + "rhsusf_mich_bare_norotos_alt", + "rhsusf_mich_bare_norotos_alt_headset", + "rhsusf_mich_bare_norotos_alt_semi", + "rhsusf_mich_bare_norotos_alt_semi_headset", + "rhsusf_mich_bare_norotos_alt_tan", + "rhsusf_mich_bare_norotos_alt_tan_headset", + "rhsusf_mich_bare_norotos_arc", + "rhsusf_mich_bare_norotos_arc_alt", + "rhsusf_mich_bare_norotos_arc_alt_headset", + "rhsusf_mich_bare_norotos_arc_alt_semi", + "rhsusf_mich_bare_norotos_arc_alt_semi_headset", + "rhsusf_mich_bare_norotos_arc_alt_tan", + "rhsusf_mich_bare_norotos_arc_alt_tan_headset", + "rhsusf_mich_bare_norotos_arc_headset", + "rhsusf_mich_bare_norotos_arc_semi", + "rhsusf_mich_bare_norotos_arc_semi_headset", + "rhsusf_mich_bare_norotos_arc_tan", + "rhsusf_mich_bare_norotos_headset", + "rhsusf_mich_bare_norotos_semi", + "rhsusf_mich_bare_norotos_semi_headset", + "rhsusf_mich_bare_norotos_tan", + "rhsusf_mich_bare_norotos_tan_headset", + "rhsusf_mich_bare_semi", + "rhsusf_mich_bare_semi_headset", + "rhsusf_mich_bare_tan", + "rhsusf_mich_bare_tan_headset", + "rhsusf_mich_helmet_marpatd_alt_headset", + "rhsusf_mich_helmet_marpatd_headset", + "rhsusf_mich_helmet_marpatd_norotos", + "rhsusf_mich_helmet_marpatd_norotos_arc", + "rhsusf_mich_helmet_marpatd_norotos_arc_headset", + "rhsusf_mich_helmet_marpatd_norotos_headset", + "rhsusf_mich_helmet_marpatwd", + "rhsusf_mich_helmet_marpatwd_alt", + "rhsusf_mich_helmet_marpatwd_alt_headset", + "rhsusf_mich_helmet_marpatwd_headset", + "rhsusf_mich_helmet_marpatwd_norotos", + "rhsusf_mich_helmet_marpatwd_norotos_arc", + "rhsusf_mich_helmet_marpatwd_norotos_arc_headset", + "rhsusf_mich_helmet_marpatwd_norotos_headset", + // added by chainsaw - 13 + "rhsusf_patrolcap_ocp", + "rhsusf_patrolcap_ucp", + "rhsusf_opscore_01", + "rhsusf_opscore_01_tan", + "rhsusf_opscore_02_tan", + "rhsusf_opscore_03_ocp", + "rhsusf_opscore_04_ocp", + "rhsusf_cvc_helmet", + "rhsusf_cvc_ess", + "rhsusf_hgu56p", + "rhsusf_hgu56p_mask", + "rhsusf_cvc_green_helmet", + "rhsusf_cvc_green_ess", + // Added by ElShotte - 41 Items + "rhsusf_opscore_bk_pelt", + "rhsusf_opscore_bk", + "rhsusf_opscore_coy_cover", + "rhsusf_opscore_coy_cover_pelt", + "rhsusf_opscore_fg", + "rhsusf_opscore_fg_pelt", + "rhsusf_opscore_fg_pelt_cam", + "rhsusf_opscore_fg_pelt_nsw", + "rhsusf_opscore_mc", + "rhsusf_opscore_mc_pelt", + "rhsusf_opscore_mc_pelt_nsw", + "rhsusf_opscore_mc_cover", + "rhsusf_opscore_mc_cover_pelt", + "rhsusf_opscore_mc_cover_pelt_nsw", + "rhsusf_opscore_mc_cover_pelt_cam", + "rhsusf_opscore_paint", + "rhsusf_opscore_paint_pelt", + "rhsusf_opscore_paint_pelt_nsw", + "rhsusf_opscore_paint_pelt_nsw_cam", + "rhsusf_opscore_rg_cover", + "rhsusf_opscore_rg_cover_pelt", + "rhsusf_opscore_ut", + "rhsusf_opscore_ut_pelt", + "rhsusf_opscore_ut_pelt_cam", + "rhsusf_opscore_ut_pelt_nsw", + "rhsusf_opscore_ut_pelt_nsw_cam", + "rhsusf_opscore_mar_ut_pelt", + "rhsusf_opscore_mar_ut", + "rhsusf_opscore_mar_fg_pelt", + "rhsusf_opscore_mar_fg", + "rhsusf_protech_helmet", + "rhsusf_protech_helmet_ess", + "rhsusf_protech_helmet_rhino", + "rhsusf_protech_helmet_rhino_ess" +]; + +blck_RHS_UniformsGREF = [ + "rhsgref_uniform_alpenflage", + "rhsgref_uniform_flecktarn", + "rhsgref_uniform_para_ttsko_mountain", + "rhsgref_uniform_para_ttsko_oxblood", + "rhsgref_uniform_para_ttsko_urban", + "rhsgref_uniform_reed", + "rhsgref_uniform_specter", + "rhsgref_uniform_tigerstripe", + "rhsgref_uniform_ttsko_forest", + "rhsgref_uniform_ttsko_mountain", + "rhsgref_uniform_ttsko_urban", + "rhsgref_uniform_vsr", + "rhsgref_uniform_woodland", + "rhsgref_uniform_woodland_olive" +]; + +blck_RHS_VestsGREF = [ + "rhsgref_6b23", + "rhsgref_6b23_khaki", + "rhsgref_6b23_khaki_medic", + "rhsgref_6b23_khaki_nco", + "rhsgref_6b23_khaki_officer", + "rhsgref_6b23_khaki_rifleman", + "rhsgref_6b23_khaki_sniper", + "rhsgref_6b23_ttsko_digi", + "rhsgref_6b23_ttsko_digi_medic", + "rhsgref_6b23_ttsko_digi_nco", + "rhsgref_6b23_ttsko_digi_officer", + "rhsgref_6b23_ttsko_digi_rifleman", + "rhsgref_6b23_ttsko_digi_sniper", + "rhsgref_6b23_ttsko_forest", + "rhsgref_6b23_ttsko_forest_rifleman", + "rhsgref_6b23_ttsko_mountain", + "rhsgref_6b23_ttsko_mountain_medic", + "rhsgref_6b23_ttsko_mountain_nco", + "rhsgref_6b23_ttsko_mountain_officer", + "rhsgref_6b23_ttsko_mountain_rifleman", + "rhsgref_6b23_ttsko_mountain_sniper", + "rhsgref_otv_digi", + "rhsgref_otv_khaki" +]; + +blck_RHS_HeadgearGREF = [ + "rhsgref_6b27m", + "rhsgref_6b27m_ttsko_digi", + "rhsgref_6b27m_ttsko_forest", + "rhsgref_6b27m_ttsko_mountain", + "rhsgref_6b27m_ttsko_urban", + "rhsgref_Booniehat_alpen", + "rhsgref_fieldcap", + "rhsgref_fieldcap_ttsko_digi", + "rhsgref_fieldcap_ttsko_forest", + "rhsgref_fieldcap_ttsko_mountain", + "rhsgref_fieldcap_ttsko_urban", + "rhsgref_patrolcap_specter", + "rhsgref_ssh68", + "rhsgref_ssh68_emr", + "rhsgref_ssh68_ttsko_digi", + "rhsgref_ssh68_ttsko_forest", + "rhsgref_ssh68_ttsko_mountain", + "rhsgref_ssh68_un" +]; +blck_RHS_WeaponsGREF = [ + "rhs_weap_kar98k", + "rhs_weap_m21a", + "rhs_weap_m21a_fold", + "rhs_weap_m21a_pr", + "rhs_weap_m21s", + "rhs_weap_m21s_fold", + "rhs_weap_m21s_pr", + "rhs_weap_m38", + "rhs_weap_m70ab2", + "rhs_weap_m70ab2_fold", + "rhs_weap_m70b1", + "rhs_weap_m76", + "rhs_weap_m92", + "rhs_weap_m92_fold" +]; + +blck_RHS_HeadgearSAF = [ + "rhssaf_helmet_m59_85_nocamo", + "rhssaf_helmet_m59_85_oakleaf", + "rhssaf_helmet_m97_olive_nocamo", + "rhssaf_helmet_m97_olive_nocamo_black_ess", + "rhssaf_helmet_m97_olive_nocamo_black_ess_bare", + "rhssaf_helmet_m97_black_nocamo", + "rhssaf_helmet_m97_black_nocamo_black_ess", + "rhssaf_helmet_m97_black_nocamo_black_ess_bare", + "rhssaf_Helmet_m97_woodland", + "rhssaf_Helmet_m97_digital", + "rhssaf_Helmet_m97_md2camo", + "rhssaf_Helmet_m97_oakleaf", + "rhssaf_helmet_m97_nostrap_blue", + "rhssaf_helmet_m97_nostrap_blue_tan_ess", + "rhssaf_helmet_m97_nostrap_blue_tan_ess_bare", + "rhssaf_helmet_m97_woodland_black_ess", + "rhssaf_helmet_m97_woodland_black_ess_bare", + "rhssaf_helmet_m97_digital_black_ess", + "rhssaf_helmet_m97_digital_black_ess_bare", + "rhssaf_helmet_m97_md2camo_black_ess", + "rhssaf_helmet_m97_md2camo_black_ess_bare", + "rhssaf_helmet_m97_oakleaf_black_ess", + "rhssaf_helmet_m97_oakleaf_black_ess_bare", + "rhssaf_helmet_hgu56p", + "rhssaf_beret_green", + "rhssaf_beret_red", + "rhssaf_beret_black", + "rhssaf_beret_blue_un", + "rhssaf_booniehat_digital", + "rhssaf_booniehat_md2camo", + "rhssaf_booniehat_woodland" +]; + +blck_RHS_UniformsSAF = [ + "rhssaf_uniform_m10_digital", + "rhssaf_uniform_m10_digital_summer", + "rhssaf_uniform_m10_digital_desert", + "rhssaf_uniform_m10_digital_tan_boots", + "rhssaf_uniform_m93_oakleaf", + "rhssaf_uniform_m93_oakleaf_summer", + "rhssaf_uniform_heli_pilot" +]; + +blck_RHS_VestsSAF = [ + "rhssaf_vest_md98_woodland", + "rhssaf_vest_md98_md2camo", + "rhssaf_vest_md98_digital", + "rhssaf_vest_md98_officer", + "rhssaf_vest_md98_rifleman", + "rhssaf_vest_otv_md2camo", + "rhssaf_vest_md99_md2camo_rifleman", + "rhssaf_vest_md99_digital_rifleman", + "rhssaf_vest_md99_woodland_rifleman", + "rhssaf_vest_md99_md2camo", + "rhssaf_vest_md99_digital", + "rhssaf_vest_md99_woodland" +]; + +blck_RHS_BackpacksSAF = [ + "rhssaf_30rnd_556x45_EPR_G36", + "rhssaf_30rnd_556x45_SOST_G36", + "rhssaf_100rnd_556x45_EPR_G36", + "rhssaf_30rnd_556x45_SPR_G36", + "rhssaf_30rnd_556x45_Tracers_G36", + "rhssaf_30rnd_556x45_MDIM_G36", + "rhssaf_30rnd_556x45_TDIM_G36", + "150Rnd_556x45_Drum_Mag_F", + "150Rnd_556x45_Drum_Mag_Tracer_F", + "rhs_30Rnd_762x39mm", + "rhs_30Rnd_762x39mm_tracer", + "rhs_30Rnd_762x39mm_89", + "rhs_30Rnd_762x39mm_U", + "rhsgref_30rnd_556x45_m21", + "rhsgref_30rnd_556x45_m21_t", + "rhs_100Rnd_762x54mmR", + "rhs_100Rnd_762x54mmR_green", + "rhssaf_250Rnd_762x54R" +]; + +blck_RHS_WeaponsSAF = [ + "rhs_weap_m70ab2_fold", + "rhs_weap_m70b1", + "rhs_weap_m70b1n", + "rhs_weap_m70b3n", + "rhs_weap_m70b3n_pbg40", + "rhs_weap_m92", + "rhs_weap_m92_fold", + "rhs_weap_m76", + "rhs_weap_m21a", + "rhs_weap_m21a_pr", + "rhs_weap_m21a_pr_pbg40", + "rhs_weap_m21a_fold", + "rhs_weap_m21a_pbg40", + "rhs_weap_m21s", + "rhs_weap_m21s_pr", + "rhs_weap_m21s_fold", + "rhs_weap_m82a1", + "rhs_weap_minimi_para_railed", + "rhs_weap_g36c", + "rhs_weap_g36kv", + "rhs_weap_g36kv_ag36", + "rhs_weap_m84" +]; + +blck_NIA_WeaponsLMG = [ + "hlc_lmg_M249E2", + "hlc_lmg_M249E2", + "hlc_lmg_M60E4", + "hlc_lmg_MG3KWS_b", + "hlc_lmg_MG3KWS_g", + "hlc_lmg_MG42", + "hlc_lmg_MG42KWS_t", + "hlc_lmg_m249para", + "hlc_lmg_m249para", + "hlc_lmg_m60", + "hlc_lmg_mg42kws_b", + "hlc_lmg_mg42kws_g", + "hlc_lmg_minimi", + "hlc_lmg_minimi_railed", + "hlc_lmg_minimipara", + "hlc_lmg_mk48", + "hlc_m249_pip1", + "hlc_m249_pip2", + "hlc_m249_pip3", + "hlc_m249_pip4", + "hlc_rifle_rpk", + "hlc_rifle_rpk12", + "hlc_rifle_rpk74n" +]; + +blck_NIA_WeaponsSMG = [ + "hlc_smg_9mmar", + "hlc_smg_MP5N", + "hlc_smg_mp510", + "hlc_smg_mp5a2", + "hlc_smg_mp5a3", + "hlc_smg_mp5a4", + "hlc_smg_mp5k", + "hlc_smg_mp5k_PDW", + "hlc_smg_mp5sd5", + "hlc_smg_mp5sd6" +]; + +blck_NIA_WeaponsAR = [ + "HLC_Rifle_g3ka4_GL", + "hlc_barrel_carbine", + "hlc_barrel_hbar", + "hlc_barrel_standard", + "hlc_rifle_Bushmaster300", + "hlc_rifle_Colt727", + "hlc_rifle_Colt727_GL", + "hlc_rifle_FAL5000", + "hlc_rifle_FAL5000Rail", + "hlc_rifle_FAL5000_RH", + "hlc_rifle_FAL5061", + "hlc_rifle_FAL5061Rail", + "hlc_rifle_G36A1", + "hlc_rifle_G36A1AG36", + "hlc_rifle_G36C", + "hlc_rifle_G36CMLIC", + "hlc_rifle_G36CTAC", + "hlc_rifle_G36CV", + "hlc_rifle_G36E1", + "hlc_rifle_G36E1AG36", + "hlc_rifle_G36KA1", + "hlc_rifle_G36KE1", + "hlc_rifle_G36KMLIC", + "hlc_rifle_G36KTAC", + "hlc_rifle_G36KV", + "hlc_rifle_G36MLIAG36", + "hlc_rifle_G36MLIC", + "hlc_rifle_G36TAC", + "hlc_rifle_G36V", + "hlc_rifle_G36VAG36", + "hlc_rifle_LAR", + "hlc_rifle_M14", + "hlc_rifle_M14DMR", + "hlc_rifle_M21", + "hlc_rifle_MG36", + "hlc_rifle_RK62", + "hlc_rifle_RU556", + "hlc_rifle_RU5562", + "hlc_rifle_SAMR", + "hlc_rifle_SLR", + "hlc_rifle_SLRchopmod", + "hlc_rifle_STG58F", + "hlc_rifle_STGW57", + "hlc_rifle_aek971", + "hlc_rifle_aek971_mtk", + "hlc_rifle_ak12", + "hlc_rifle_ak12gl", + "hlc_rifle_ak47", + "hlc_rifle_ak74", + "hlc_rifle_ak74_MTK", + "hlc_rifle_ak74_dirty", + "hlc_rifle_ak74_dirty2", + "hlc_rifle_ak74m", + "hlc_rifle_ak74m_MTK", + "hlc_rifle_ak74m_gl", + "hlc_rifle_akm", + "hlc_rifle_akm_MTK", + "hlc_rifle_akmgl", + "hlc_rifle_aks74", + "hlc_rifle_aks74_GL", + "hlc_rifle_aks74_MTK", + "hlc_rifle_aks74u", + "hlc_rifle_aks74u_MTK", + "hlc_rifle_aku12", + "hlc_rifle_amt", + "hlc_rifle_aug", + "hlc_rifle_auga1_B", + "hlc_rifle_auga1_t", + "hlc_rifle_auga1carb", + "hlc_rifle_auga1carb_b", + "hlc_rifle_auga1carb_t", + "hlc_rifle_auga2", + "hlc_rifle_auga2_b", + "hlc_rifle_auga2_t", + "hlc_rifle_auga2carb", + "hlc_rifle_auga2carb_b", + "hlc_rifle_auga2carb_t", + "hlc_rifle_auga2lsw", + "hlc_rifle_auga2lsw_b", + "hlc_rifle_auga2lsw_t", + "hlc_rifle_auga3", + "hlc_rifle_auga3_GL", + "hlc_rifle_auga3_GL_B", + "hlc_rifle_auga3_GL_BL", + "hlc_rifle_auga3_b", + "hlc_rifle_auga3_bl", + "hlc_rifle_aughbar", + "hlc_rifle_aughbar_b", + "hlc_rifle_aughbar_t", + "hlc_rifle_augsr", + "hlc_rifle_augsr_b", + "hlc_rifle_augsr_t", + "hlc_rifle_augsrcarb", + "hlc_rifle_augsrcarb_b", + "hlc_rifle_augsrcarb_t", + "hlc_rifle_augsrhbar", + "hlc_rifle_augsrhbar_b", + "hlc_rifle_augsrhbar_t", + "hlc_rifle_bcmblackjack", + "hlc_rifle_bcmjack", + "hlc_rifle_c1A1", + "hlc_rifle_falosw", + "hlc_rifle_g3a3", + "hlc_rifle_g3a3ris", + "hlc_rifle_g3a3v", + "hlc_rifle_g3ka4", + "hlc_rifle_g3sg1", + "hlc_rifle_hk33a2", + "hlc_rifle_hk33a2RIS", + "hlc_rifle_hk51", + "hlc_rifle_hk53", + "hlc_rifle_hk53RAS", + "hlc_rifle_honeybadger", + "hlc_rifle_l1a1slr", + "hlc_rifle_m14sopmod", + "hlc_rifle_osw_GL", + "hlc_rifle_rpk74n", + "hlc_rifle_sig5104", + "hlc_rifle_slr107u", + "hlc_rifle_slr107u_MTK", + "hlc_rifle_stgw57_RIS", + "hlc_rifle_stgw57_commando", + "hlc_rifle_vendimus" +]; + +blck_NIA_WeaponsSniper = [ + "hlc_rifle_M1903A1", + "hlc_rifle_M1903A1OMR", + "hlc_rifle_M1903A1_unertl", + "hlc_rifle_PSG1A1_RIS", + "hlc_rifle_awMagnum_BL_ghillie", + "hlc_rifle_awMagnum_FDE_ghillie", + "hlc_rifle_awMagnum_OD_ghillie", + "hlc_rifle_awcovert", + "hlc_rifle_awcovert_BL", + "hlc_rifle_awcovert_FDE", + "hlc_rifle_awmagnum", + "hlc_rifle_awmagnum_BL", + "hlc_rifle_awmagnum_FDE", + "hlc_rifle_psg1", + "hlc_rifle_psg1A1" +]; +*/ \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Blue/captive1.sqf b/@GMS/addons/custom_server/Missions/Blue/captive1.sqf index 243ba61..7d8a0db 100644 --- a/@GMS/addons/custom_server/Missions/Blue/captive1.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/captive1.sqf @@ -25,6 +25,7 @@ _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]], @@ -62,26 +63,11 @@ _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", // select 0 - [-7.83789,13.1465,-0.00143886], // select 1 - 126.345, // select 2 - [true,false], // select 3 + ["I_G_resistanceLeader_F",[-7.83789,13.1465,-0.00143886],126.345,[true,false], ["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 - [selectRandom _buildings,[-3.79102,2.56055,0],0,[true,false]] + ["U_OrestesBody"] // array of uniform choices ]; _enemyLeaderConfig set[ 1, selectRandom [[-7.83789,13.1465,-0.00143886]] @@ -137,7 +123,7 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Blue; //_headgear = blck_headgear; _chanceReinforcements = blck_chanceParaBlue; _noPara = blck_noParaBlue; -_chanceHeliPatrol = 0; +_chanceHeliPatrol = blck_chanceHeliPatrolBlue; _spawnCratesTiming = "atMissionEndAir"; _endCondition = "assetSecured"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear", "assetSecured" //_timeOut = -1; diff --git a/@GMS/addons/custom_server/Missions/Blue/default.sqf b/@GMS/addons/custom_server/Missions/Blue/default.sqf index 46e3a86..ee6b769 100644 --- a/@GMS/addons/custom_server/Missions/Blue/default.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/default.sqf @@ -68,26 +68,11 @@ _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. -/* -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" - ]; -}; +_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 _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. diff --git a/@GMS/addons/custom_server/Missions/Blue/default2.sqf b/@GMS/addons/custom_server/Missions/Blue/default2.sqf index 52531cc..e051f91 100644 --- a/@GMS/addons/custom_server/Missions/Blue/default2.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/default2.sqf @@ -59,7 +59,7 @@ _markerColor = "ColorBlue"; _markerMissionName = "Bandit Patrol"; _missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" _missionLandscape = [ - ["Flag_AAF_F",[3,3,0],0,[false,false]], + ["Flag_AAF_F",[0,0,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]], diff --git a/@GMS/addons/custom_server/Missions/Blue/hostage1.sqf b/@GMS/addons/custom_server/Missions/Blue/hostage1.sqf index 94290d4..2fc0c51 100644 --- a/@GMS/addons/custom_server/Missions/Blue/hostage1.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/hostage1.sqf @@ -24,85 +24,69 @@ _markerColor = "ColorBlue"; _markerMissionName = "Rescue Hostage"; _missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" _missionLandscape = [ - //["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]] + ["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 -_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 - [selectRandom _buildings,[-0.279297,-15.9199,0],0,[true,false]] + ["U_NikosBody"] // array of uniform choices ]; // Sitting Animation // Use the animation view to see other choices: http://killzonekid.com/arma-3-animation-viewer-jumping-animation/ _missionLootBoxes = [ @@ -130,7 +114,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 = [ @@ -155,7 +139,7 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Blue; //_headgear = blck_headgear; _noPara = blck_noParaBlue; -_chanceHeliPatrol = 0; +//_chanceHeliPatrol = blck_chanceHeliPatrolBlue; _spawnCratesTiming = "atMissionEndAir"; _endCondition = "assetSecured"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear", "assetSecured" //_timeOut = -1; diff --git a/@GMS/addons/custom_server/Missions/Blue/medicalCamp.sqf b/@GMS/addons/custom_server/Missions/Blue/medicalCamp.sqf index 4c17075..f9e7641 100644 --- a/@GMS/addons/custom_server/Missions/Blue/medicalCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/medicalCamp.sqf @@ -26,23 +26,23 @@ _markerColor = "ColorBlue"; _markerMissionName = "Medical Camp"; _missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" _missionLandscape = [ - ["Flag_AAF_F",[5,5,0],0,[false,true]], + ["Flag_AAF_F",[3,3,0],0,[false,false]], ["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,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]] + ["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]] ]; // 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. diff --git a/@GMS/addons/custom_server/Missions/Blue/redCamp.sqf b/@GMS/addons/custom_server/Missions/Blue/redCamp.sqf index 3134019..d44ac22 100644 --- a/@GMS/addons/custom_server/Missions/Blue/redCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/redCamp.sqf @@ -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,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]] + ["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]] ]; // 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. diff --git a/@GMS/addons/custom_server/Missions/Blue/resupplyCamp.sqf b/@GMS/addons/custom_server/Missions/Blue/resupplyCamp.sqf index 7a89b53..d9c34a5 100644 --- a/@GMS/addons/custom_server/Missions/Blue/resupplyCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/resupplyCamp.sqf @@ -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,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]] + ["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]] ]; // 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. diff --git a/@GMS/addons/custom_server/Missions/GMS_missionLists.sqf b/@GMS/addons/custom_server/Missions/GMS_missionLists.sqf index 95b7996..b7ded51 100644 --- a/@GMS/addons/custom_server/Missions/GMS_missionLists.sqf +++ b/@GMS/addons/custom_server/Missions/GMS_missionLists.sqf @@ -14,13 +14,12 @@ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; _pathBlue = "Blue"; -//_missionListBlue = ["captive1"]; -_missionListBlue = ["default","captive1","hostage1"/*,"default2"/*,"medicalCamp","redCamp","resupplyCamp"*/]; +_missionListBlue = ["default"]; +//_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"]; diff --git a/@GMS/addons/custom_server/Missions/Green/medicalCamp.sqf b/@GMS/addons/custom_server/Missions/Green/medicalCamp.sqf index 9d9e14d..93713d4 100644 --- a/@GMS/addons/custom_server/Missions/Green/medicalCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Green/medicalCamp.sqf @@ -26,23 +26,23 @@ _markerColor = "ColorGreen"; _markerMissionName = "Medical Camp"; _missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" _missionLandscape = [ - ["Flag_AAF_F",[5,5,0],0,[false,true]], + ["Flag_AAF_F",[3,3,0],0,[false,false]], ["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,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]] + ["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]] ]; // 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. diff --git a/@GMS/addons/custom_server/Missions/Green/redCamp.sqf b/@GMS/addons/custom_server/Missions/Green/redCamp.sqf index cac1777..75f3cf0 100644 --- a/@GMS/addons/custom_server/Missions/Green/redCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Green/redCamp.sqf @@ -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,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]] + ["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]] ]; // 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. diff --git a/@GMS/addons/custom_server/Missions/Green/resupplyCamp.sqf b/@GMS/addons/custom_server/Missions/Green/resupplyCamp.sqf index 63d31c1..3935f8e 100644 --- a/@GMS/addons/custom_server/Missions/Green/resupplyCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Green/resupplyCamp.sqf @@ -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,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]] + ["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]] ]; // 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. diff --git a/@GMS/addons/custom_server/Missions/Orange/medicalCamp.sqf b/@GMS/addons/custom_server/Missions/Orange/medicalCamp.sqf index c915f10..7f2dc2b 100644 --- a/@GMS/addons/custom_server/Missions/Orange/medicalCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Orange/medicalCamp.sqf @@ -25,23 +25,23 @@ _markerColor = "ColorOrange"; _markerMissionName = "Medical Camp"; _missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" _missionLandscape = [ - ["Flag_AAF_F",[5,6,0],0,[false,true]], + ["Flag_AAF_F",[3,3,0],0,[false,false]], ["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,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]] + ["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]] ]; // 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. diff --git a/@GMS/addons/custom_server/Missions/Orange/redCamp.sqf b/@GMS/addons/custom_server/Missions/Orange/redCamp.sqf index 63f3d42..c66e42d 100644 --- a/@GMS/addons/custom_server/Missions/Orange/redCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Orange/redCamp.sqf @@ -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,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]] + ["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]] ]; // 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. diff --git a/@GMS/addons/custom_server/Missions/Orange/resupplyCamp.sqf b/@GMS/addons/custom_server/Missions/Orange/resupplyCamp.sqf index a6aaabb..0bf6469 100644 --- a/@GMS/addons/custom_server/Missions/Orange/resupplyCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Orange/resupplyCamp.sqf @@ -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,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]] + ["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]] ]; // 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. diff --git a/@GMS/addons/custom_server/Missions/Red/hostage1.sqf b/@GMS/addons/custom_server/Missions/Red/hostage1.sqf index f96c510..176967a 100644 --- a/@GMS/addons/custom_server/Missions/Red/hostage1.sqf +++ b/@GMS/addons/custom_server/Missions/Red/hostage1.sqf @@ -25,61 +25,42 @@ _markerColor = "ColorRed"; _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",[-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]] ]; // list of objects to spawn as landscape; // list of objects to spawn as landscape _hostageConfig = ["C_man_polo_6_F", diff --git a/@GMS/addons/custom_server/Missions/Red/medicalCamp.sqf b/@GMS/addons/custom_server/Missions/Red/medicalCamp.sqf index 3f7fc6e..07f2762 100644 --- a/@GMS/addons/custom_server/Missions/Red/medicalCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Red/medicalCamp.sqf @@ -25,17 +25,17 @@ _markerColor = "ColorRed"; _markerMissionName = "Medical Camp"; _missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" _missionLandscape = [ - ["Flag_AAF_F",[6,5,0],0,[false,true]], + ["Flag_AAF_F",[0,0,0],0,[false,false]], ["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_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,[true,true]], ["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,false,true]], - ["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[false,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",[-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]], diff --git a/@GMS/addons/custom_server/Missions/Red/redCamp.sqf b/@GMS/addons/custom_server/Missions/Red/redCamp.sqf index 6368efb..52476b6 100644 --- a/@GMS/addons/custom_server/Missions/Red/redCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Red/redCamp.sqf @@ -26,6 +26,7 @@ _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]], diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf new file mode 100644 index 0000000..868f2c0 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf @@ -0,0 +1,18 @@ +/* + 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 diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf new file mode 100644 index 0000000..4faa5cd --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf @@ -0,0 +1,17 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +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 \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf new file mode 100644 index 0000000..1123509 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf @@ -0,0 +1,18 @@ +/* + 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 \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf new file mode 100644 index 0000000..1e3ecf5 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_vehicle"]; +//blck_sm_Vehicles pushBack [_vehicle,grpNull,0]; +[blck_sm_Vehicles,_vehicle] call blck_fnc_sm_AddGroupToArray; +true \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf index 086f3f9..17a1485 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf @@ -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 "; +diag_log "[blckeagls] GMS_fnc_sm_init_functions.sqf "; //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 "; +diag_log "[blckeagls] GMS_sm_init_functions.sqf "; blck_sm_functionsLoaded = true; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorAircraft.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorAircraft.sqf index c803d24..5c3820f 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorAircraft.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorAircraft.sqf @@ -45,7 +45,8 @@ _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; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorEmplaced.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorEmplaced.sqf index cbe1aee..248744f 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorEmplaced.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorEmplaced.sqf @@ -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","_maxRespawns"]; + _x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"]; //diag_log format["_fnc_monitorEmplaced: _x %1",_x]; //diag_log format["_fnc_monitorEmplaced: _groupParameters = %1",_groupParameters]; //diag_log format["_fnc_monitorEmplaced (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; @@ -45,7 +45,6 @@ _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; @@ -78,7 +77,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; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorScuba.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorScuba.sqf index 2282f98..5e30d9a 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorScuba.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorScuba.sqf @@ -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","_maxRespawns"]; + _x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"]; //diag_log format["_fnc_monitorScubaGroups: _x %1",_x]; //diag_log format["_fnc_monitorScubaGroups: _groupParameters = %1",_groupParameters]; //diag_log format["_fnc_monitorScubaGroups (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorShips.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorShips.sqf index 18f6083..138bb6e 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorShips.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorShips.sqf @@ -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","_maxRespawns"]; + _x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"]; //diag_log format["_fnc_monitorShips: _x %1",_x]; //diag_log format["_fnc_monitorShips: _groupParameters = %1",_groupParameters]; //diag_log format["_fnc_monitorShips (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - 2.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - 2.sqf new file mode 100644 index 0000000..841ff4b --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - 2.sqf @@ -0,0 +1,300 @@ +/* + 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; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy (2).sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy (2).sqf new file mode 100644 index 0000000..79b6d22 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy (2).sqf @@ -0,0 +1,325 @@ +/* + 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; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy (3).sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy (3).sqf new file mode 100644 index 0000000..894a04e --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy (3).sqf @@ -0,0 +1,321 @@ +/* + 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; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy (4).sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy (4).sqf new file mode 100644 index 0000000..d5665eb --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy (4).sqf @@ -0,0 +1,290 @@ +/* + 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; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy.sqf new file mode 100644 index 0000000..841ff4b --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits - Copy.sqf @@ -0,0 +1,300 @@ +/* + 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; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits-1.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits-1.sqf new file mode 100644 index 0000000..56dc691 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits-1.sqf @@ -0,0 +1,293 @@ +/* + 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; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf new file mode 100644 index 0000000..0e078f1 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf @@ -0,0 +1,328 @@ +/* + 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; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits_failed.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits_failed.sqf new file mode 100644 index 0000000..54729bf --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits_failed.sqf @@ -0,0 +1,259 @@ +/* + 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; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorSubs.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorSubs.sqf index 5be9759..a3ca3a8 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorSubs.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorSubs.sqf @@ -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","_maxRespawns"]; + _x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"]; //diag_log format["_fnc_monitorSubs: _x %1",_x]; //diag_log format["_fnc_monitorSubs: _groupParameters = %1",_groupParameters]; //diag_log format["_fnc_monitorSubs (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorVehicles.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorVehicles.sqf index 470a1fb..358cdc8 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorVehicles.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorVehicles.sqf @@ -14,10 +14,11 @@ 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","_maxRespawns"]; + _x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"]; //diag_log format["_fnc_monitorVehicles: _x %1",_x]; //diag_log format["_fnc_monitorVehicles: _groupParameters = %1",_groupParameters]; //diag_log format["_fnc_monitorVehicles (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + //_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"]; _groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime"]; //diag_log format["_fnc_monitorVehicles: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime]; private _element = +_x;// @@ -45,7 +46,6 @@ _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); diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_init_functions.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_init_functions.sqf new file mode 100644 index 0000000..df61a11 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_init_functions.sqf @@ -0,0 +1,42 @@ +/* + 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 "; + +blck_sm_functionsLoaded = true; diff --git a/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf b/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf index 1b5fbbc..7a4b5bc 100644 --- a/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf +++ b/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf @@ -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] ]; diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission.sqf index dea9cf6..7b38e7a 100644 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission.sqf @@ -33,24 +33,29 @@ 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 = [_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 = 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 "_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 = []; @@ -446,9 +451,7 @@ 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; - // 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; + private _paratroops = [_coords,_noPara,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnParaUnits; if !(isNull _paratroops) then { _blck_AllMissionAI append (units _paratroops); @@ -549,8 +552,7 @@ while {_missionComplete isEqualTo -1} do _spawnPara = false; // The player gets one try to spawn these. if (random(1) < _chancePara) then // { - // 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; + private _paratroops = [_coords,_noPara,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,true] call blck_fnc_spawnParaUnits; if !(isNull _paratroops) then { _blck_AllMissionAI append (units _paratroops); diff --git a/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf b/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf index 5fbabd7..08390a9 100644 --- a/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf @@ -5,10 +5,8 @@ */ private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_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"]; + "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_missionCenter", + "_missionGroups","_scubaGroupParameters","_vehiclePatrolParameters","_submarinePatrolParameters","_aircraftTypes","_noAirPatrols","_airPatrols"]; 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. diff --git a/@GMS/addons/custom_server/init/blck_init_server.sqf b/@GMS/addons/custom_server/init/blck_init_server.sqf index 07fe973..b2e818c 100644 --- a/@GMS/addons/custom_server/init/blck_init_server.sqf +++ b/@GMS/addons/custom_server/init/blck_init_server.sqf @@ -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"; diff --git a/@GMS/addons/custom_server/init/build.sqf b/@GMS/addons/custom_server/init/build.sqf index 877675d..13c03d7 100644 --- a/@GMS/addons/custom_server/init/build.sqf +++ b/@GMS/addons/custom_server/init/build.sqf @@ -1,6 +1,6 @@ private ["_version","_versionDate"]; -blck_version = "6.84 Build 144"; +blck_version = "6.84 Build 142"; _blck_version = blck_version; -_blck_versionDate = "6-21-18 5:00 PM"; +_blck_versionDate = "6-19-18 5:00 PM"; blck_pvs_version = _blck_version; publicVariable blck_pvs_version;