V 6.81 Build 126

See Change Log
This commit is contained in:
Ghostrider-GRG- 2018-04-19 00:11:03 -04:00
parent 4022e21129
commit cfd32b806d
100 changed files with 5459 additions and 1640 deletions

View File

@ -59,11 +59,7 @@ while {true} do
if (blck_dynamicUMS_MissionsRuning < blck_numberUnderwaterDynamicMissions) then
{
//diag_log "Adding dynamic UMS Mission";
//private ["_spawnPos"];
//_spawnPos = call blck_fnc_findShoreLocation;
//[_spawnPos] spawn blck_fnc_addDyanamicUMS_Mission;
[] spawn blck_fnc_addDyanamicUMS_Mission;
//_spawnPos call compileFinal preprocessFileLineNumbers format["q\addons\custom_server\Missions\UMS\dynamicMissiones\%1.sqf";
};
//diag_log format["_fnc_mainThread: control returned to _fnc_mainThread from _fnc_addDynamicUMS_Mission at %1",diag_tickTime];
if (blck_useHC) then
@ -71,14 +67,7 @@ while {true} do
//diag_log format["_mainThread:: calling blck_fnc_passToHCs at diag_tickTime = %1",diag_tickTime];
[] call blck_fnc_passToHCs;
};
//[] call blck_fnc_missionGroupMonitor;
/*
// No longer needed
if (_modType isEqualTo "Epoch") then
{
[] call blck_fnc_cleanEmptyGroups;
}; // Exile cleans up empty groups automatically so this should not be needed with that mod.
*/
#ifdef blck_debugMode
//diag_log format["_fnc_mainThread: active SQFscripts include: %1",diag_activeSQFScripts];
diag_log format["_fnc_mainThread: active scripts include: %1",diag_activeScripts];

View File

@ -0,0 +1,30 @@
/*
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["_groupSpawned"];
_groupSpawned = createGroup [blck_AI_Side, true];
_groupSpawned setVariable["groupVehicle",objNull];
#ifdef useDynamicSimulation
_groupSpawned enableDynamicSimulation true;
#endif
_groupSpawned setcombatmode "RED";
_groupSpawned setBehaviour "COMBAT";
_groupSpawned allowfleeing 0;
_groupSpawned setspeedmode "FULL";
_groupSpawned setFormation blck_groupFormation;
_groupSpawned setVariable ["blck_group",true,true];
diag_log format["_fnc_create_AI_Group: _groupSpawned = %1",_groupSpawned];
_groupSpawned

View File

@ -0,0 +1,122 @@
/*
blck_fnc_spawnGroup
for ghostridergaming
By Ghostrider [GRG]
Copyright 2016
Last modified 11/12/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["_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
#ifdef blck_debugMode
if (blck_debugLevel >= 1) then
{
diag_log format["spawnGroup.sqf: _groupSpawned = %1",_groupSpawned];
};
#endif
if !(isNull _groupSpawned) then
{
#ifdef blck_debugMode
if (blck_debugLevel >= 1) then {diag_log format["_fnc_spawnGroup:: -- >> Group created = %1",_groupSpawned]};
#endif
_groupSpawned setVariable["groupVehicle",objNull];
#ifdef useDynamicSimulation
_groupSpawned enableDynamicSimulation true;
#endif
_groupSpawned setcombatmode "RED";
_groupSpawned setBehaviour "COMBAT";
_groupSpawned allowfleeing 0;
_groupSpawned setspeedmode "FULL";
_groupSpawned setFormation blck_groupFormation;
_groupSpawned setVariable ["blck_group",true,true];
//diag_log format["spawnGroup:: group is %1",_groupSpawned];
_useLauncher = blck_useLaunchers;
if (count _weaponList == 0) then
{
_weaponList = [_skillLevel] call blck_fnc_selectAILoadout;
};
//Spawns the correct number of AI Groups, each with the correct number of units
//Counter variable
_i = 0;
while {_i < _numbertospawn} do {
_i = _i + 1;
if (blck_useLaunchers && _i <= blck_launchersPerGroup) then
{
_launcherType = selectRandom blck_launcherTypes;
} else {
_launcherType = "none";
};
//Finds a safe positon to spawn the AI in the area given
//_safepos = [_pos,0,30,2,0,20,0] call BIS_fnc_findSafePos;
//Spawns the AI unit
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["spawnGroup:: spawning unit #%1",_i];
};
#endif
//params["_pos","_aiGroup",_skillLevel,_uniforms, _headGear,_vests,_backpacks,_Launcher,_weaponList,_sideArms,_scuba];
[_pos,_groupSpawned,_skillLevel,_uniforms,_headGear,_vests,_backpacks,_launcherType, _weaponList, _sideArms, _scuba] call blck_fnc_spawnUnit;
};
_groupSpawned selectLeader (units _groupSpawned select 0);
// params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]];
if (_configureWaypoints) then
{
if (_scuba) then {_infantryType = "scuba"} else {_infantryType = "infantry"};
[_pos,_minDist,_maxDist,_groupSpawned,"random","SAD","infantry"] spawn blck_fnc_setupWaypoints;
};
//[_pos,_minDist,_maxDist,_groupSpawned,"random","SENTRY"] spawn blck_fnc_setupWaypoints;
//diag_log format["_fnc_spawnGroup: blck_fnc_setupWaypoints called for group %1",_groupSpawned];
#ifdef blck_debugMode
if (blck_debugLevel >= 1) then
{
diag_log format["fnc_spawnGroup:: Group spawned was %1 with units of %2",_groupSpawned, units _groupSpawned];
};
#endif
} else {
diag_log "_fnc_spawnGroup:: ERROR CONDITION : NULL GROUP CREATED";
};
_groupSpawned

View File

@ -1,9 +1,7 @@
/*
Spawn and configure a group
for ghostridergaming
blck_fnc_spawnGroup
By Ghostrider [GRG]
Copyright 2016
Last modified 11/12/17
--------------------------
License
@ -13,19 +11,20 @@
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
if (blck_debugLevel >= 2) then
{
diag_log format["_fnc_spawnGroup: _this = %1",_this];
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
private["_numbertospawn","_groupSpawned","_safepos","_weaponList","_useLauncher","_launcherType"];
params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true],["_weaponList",[]],["_vests",blck_vests],["_scuba",false] ];
if (blck_debugLevel >= 1) then
{
diag_log format["[blckeagls] _fnc_spawnGroup called parameters: _numai1 %1, _numbai2 %2, _skillLevel %3, _center %4",_numai1,_numai2,_skillLevel,_center];
};
//Spawns correct number of AI
if (_numai2 > _numai1) then
{
@ -41,8 +40,9 @@ if (blck_debugLevel >= 1) then
};
#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 = 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
{
@ -51,25 +51,10 @@ if (blck_debugLevel >= 1) then
#endif
if !(isNull _groupSpawned) then
{
#ifdef blck_debugMode
if (blck_debugLevel >= 1) then {diag_log format["_fnc_spawnGroup:: -- >> Group created = %1",_groupSpawned]};
#endif
_groupSpawned setVariable["groupVehicle",objNull];
#ifdef useDynamicSimulation
_groupSpawned enableDynamicSimulation true;
#endif
_groupSpawned setcombatmode "RED";
_groupSpawned setBehaviour "COMBAT";
_groupSpawned allowfleeing 0;
_groupSpawned setspeedmode "FULL";
_groupSpawned setFormation blck_groupFormation;
_groupSpawned setVariable ["blck_group",true,true];
//diag_log format["spawnGroup:: group is %1",_groupSpawned];
diag_log format["spawnGroup:: group is %1",_groupSpawned];
_useLauncher = blck_useLaunchers;
if (count _weaponList == 0) then
if (_weaponList isEqualTo []) then
{
_weaponList = [_skillLevel] call blck_fnc_selectAILoadout;
};
@ -96,8 +81,8 @@ if !(isNull _groupSpawned) then
diag_log format["spawnGroup:: spawning unit #%1",_i];
};
#endif
// params["_pos","_weaponList","_aiGroup",["_skillLevel","red"],["_Launcher","none"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]];
[_pos,_weaponList,_groupSpawned,_skillLevel,_launcherType,_uniforms,_headGear,_vests,_scuba] call blck_fnc_spawnAI;
//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"]]];
@ -115,7 +100,8 @@ if !(isNull _groupSpawned) then
};
#endif
} else {
} else
{
diag_log "_fnc_spawnGroup:: ERROR CONDITION : NULL GROUP CREATED";
};
_groupSpawned

View File

@ -28,8 +28,8 @@ for "_i" from 1 to _noMissions do
}forEach _missionList;
_mission = [_compiledMissionsList,format["%1%2",_marker,_i],_difficulty,_tMin,_tMax,_waitTime,[0,0,0]];
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {
//diag_log format["-fnc_addMissionToQue::-->> _mission = %1",[_mission select 0, _mission select 1, _mission select 2, _mission select 3, _mission select 4, _mission select 5, _mission select 6]];
if (blck_debugLevel >= 2) then {
diag_log format["-fnc_addMissionToQue::-->> _mission = %1",[/*_mission select 0, */_mission select 1, _mission select 2, _mission select 3, _mission select 4, _mission select 5, _mission select 6]];
};
#endif
//diag_log format["-fnc_addMissionToQue::-->> _mission = %1",[ _mission select 1, _mission select 2, _mission select 3, _mission select 4, _mission select 5, _mission select 6]];
@ -37,5 +37,5 @@ for "_i" from 1 to _noMissions do
};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["_fnc_addMissionToQue:: -- >> Result - blck_pendingMissions = %1",blck_pendingMissions];};
if (blck_debugLevel >= 4) then {diag_log format["_fnc_addMissionToQue:: -- >> Result - blck_pendingMissions = %1",blck_pendingMissions];};
#endif

View File

@ -0,0 +1,633 @@
/*
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;
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 "_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 = 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 "_uniforms") then {_uniforms = blck_SkinList};
if (isNil "_headGear") then {_headgear = blck_headgear};
if (isNil "_chanceHeliPatrol") then
{
switch (toLower(_aiDifficultyLevel)) do
{
case "blue": {_chanceHeliPatrol = blck_chanceHeliPatrolBlue};
case "red": {_chanceHeliPatrol = blck_noPatblck_chanceHeliPatrolRed};
case "green": {_chanceHeliPatrol = blck_noPatblck_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 = 0};
if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;};
if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Blue};
if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed};
_objects = [];
_mines = [];
_crates = [];
_aiGroup = [];
_missionAIVehicles = [];
_blck_AllMissionAI = [];
_AI_Vehicles = [];
_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType];
_delayTime = 1;
_groupPatrolRadius = 50;
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?
[["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:: (77) message players and spawn a mission marker";};
if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (77) _marker = %1",_marker];};
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (77) 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"};
#endif
while {_wait} do
{
#ifdef blck_debugMode
//diag_log "missionSpawner:: top of mission trigger loop";
if (blck_debugLevel > 2) exitWith {_playerInRange = true;};
#endif
if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;};
if ([_missionStartTime] 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] call blck_fnc_timedOut];
};
#endif
};
if (_missionTimedOut) exitWith
{
// Deal with the case in which the mission timed out.
blck_recentMissionCoords pushback [_coords,diag_tickTime];
blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords];
[_markerClass, "inactive",[0,0,0]] call blck_fnc_updateMissionQue;
blck_missionsRunning = blck_missionsRunning - 1;
[_blck_localMissionMarker select 0] call blck_fnc_deleteMarker;
[_objects, 0.1] spawn blck_fnc_cleanupObjects;
};
////////
// Spawn the mission objects, loot chest, and AI
////////
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (142) -- >> 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:: (190) 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 :: (209) 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 :: (214) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1;
};
#endif
if (_abort) exitWith
{
if (blck_debugLevel > 1) then {
diag_log "missionSpawner:: (220) 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:: (235) 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:: (298) 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:: (361) 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 (435): 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
{
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;};
};
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};
diag_log format["_fnc_missionSpawner (476): _spawnPara = %1 | _chancePara = %2",_spawnPara,_chancePara];
{
_locations pushback (getPos _x);
_x setVariable["crateSpawnPos", (getPos _x)];
} forEach _crates;
while {_missionComplete isEqualTo -1} do
{
if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 180};
if (_endIfPlayerNear) then
{
if ([_locations,10,true] call blck_fnc_playerInRangeArray) then {_missionComplete = 1};
};
if (_endIfAIKilled) then
{
if (({alive _x} count _blck_AllMissionAI) < 1) 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};
};
};
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 2;
};
if (_crateStolen) exitWith
{
diag_log format["missionSpawner:: (491) 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:: (496) Mission completion criteria fulfilled: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
diag_log format["missionSpawner :: (497) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled];
diag_log format["[blckeagls] missionSpawner:: (498) calling endMission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
private["_result"];
// Force passing the mission name for informational purposes.
_blck_localMissionMarker set [2, _markerMissionName];
if (blck_showCountAliveAI) then
{
_marker setMarkerText format["%1: All AI Dead",_markerMissionName];
{
if ((_x select 1) isEqualTo _markerMissionName) exitWith{blck_missionMarkers deleteAt _forEachIndex};
}forEach blck_missionMarkers;
};
diag_log format["_fnc_missionSpawner (557) Build 123: _secureAsset = %1 | {alive _assetSpawned} = %2 | assetType = %3",_secureAsset,alive _assetSpawned, _assetSpawned getVariable["assetType",-1]];
if (_assetSpawned getVariable["assetType",0] isEqualTo 1) then
{
diag_log "Processing Mission End for Hostage Rescue";
_assetSpawned setCaptive false;
_assetSpawned setVariable["GMSAnimations",[""],true];
[_assetSpawned,""] remoteExec["switchMove",-2];;
uiSleep 0.1;
_assetSpawned enableAI "ALL";
private _newPos = (getPos _assetSpawned) getPos [1000, random(360)];
diag_log format["processing domove for hostage with current pos = %1 and new pos = %2",getPos _assetSpawned, _newPos];
(group _assetSpawned) setCurrentWaypoint [group _assetSpawned, 0];
[group _assetSpawned,0] setWaypointPosition [_newPos,0];
[group _assetSpawned,0] setWaypointType "MOVE";
};
if (_assetSpawned getVariable["assetType",0] isEqualTo 2) then
{
diag_log format["Processing Mission End for Arrest of Leader %1 with endAnimation %2",_assetSpawned,_assetSpawned getVariable["endAnimation",""]];
[_assetSpawned,""] remoteExec["switchMove",-2];
_assetSpawned setVariable["GMSAnimations",_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]],true];
[_assetSpawned,selectRandom(_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]])] remoteExec["switchMove",-2];
};
diag_log format["_fnc_missionSpawner (579) Build 123: <calling blck_fnc_endMission> _secureAsset = %1 | {alive _assetSpawned} = %2 | assetType = %3",_secureAsset,alive _assetSpawned, _assetSpawned getVariable["assetType",-1]];
_result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 0] call blck_fnc_endMission;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["[blckeagls] missionSpawner:: (507)end of mission: blck_fnc_endMission has returned control to _fnc_missionSpawner"]};
#endif

View File

@ -0,0 +1,633 @@
/*
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;
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 "_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 = 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 "_uniforms") then {_uniforms = blck_SkinList};
if (isNil "_headGear") then {_headgear = blck_headgear};
if (isNil "_chanceHeliPatrol") then
{
switch (toLower(_aiDifficultyLevel)) do
{
case "blue": {_chanceHeliPatrol = blck_chanceHeliPatrolBlue};
case "red": {_chanceHeliPatrol = blck_noPatblck_chanceHeliPatrolRed};
case "green": {_chanceHeliPatrol = blck_noPatblck_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 = 0};
if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;};
if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Blue};
if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed};
_objects = [];
_mines = [];
_crates = [];
_aiGroup = [];
_missionAIVehicles = [];
_blck_AllMissionAI = [];
_AI_Vehicles = [];
_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType];
_delayTime = 1;
_groupPatrolRadius = 50;
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?
[["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:: (77) message players and spawn a mission marker";};
if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (77) _marker = %1",_marker];};
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (77) 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"};
#endif
while {_wait} do
{
#ifdef blck_debugMode
//diag_log "missionSpawner:: top of mission trigger loop";
if (blck_debugLevel > 2) exitWith {_playerInRange = true;};
#endif
if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;};
if ([_missionStartTime] 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] call blck_fnc_timedOut];
};
#endif
};
if (_missionTimedOut) exitWith
{
// Deal with the case in which the mission timed out.
blck_recentMissionCoords pushback [_coords,diag_tickTime];
blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords];
[_markerClass, "inactive",[0,0,0]] call blck_fnc_updateMissionQue;
blck_missionsRunning = blck_missionsRunning - 1;
[_blck_localMissionMarker select 0] call blck_fnc_deleteMarker;
[_objects, 0.1] spawn blck_fnc_cleanupObjects;
};
////////
// Spawn the mission objects, loot chest, and AI
////////
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (142) -- >> 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:: (190) 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 :: (209) 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 :: (214) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1;
};
#endif
if (_abort) exitWith
{
if (blck_debugLevel > 1) then {
diag_log "missionSpawner:: (220) 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:: (235) 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:: (298) 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:: (361) 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 (435): 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
{
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;};
};
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};
diag_log format["_fnc_missionSpawner (476): _spawnPara = %1 | _chancePara = %2",_spawnPara,_chancePara];
{
_locations pushback (getPos _x);
_x setVariable["crateSpawnPos", (getPos _x)];
} forEach _crates;
while {_missionComplete isEqualTo -1} do
{
if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 180};
if (_endIfPlayerNear) then
{
if ([_locations,10,true] call blck_fnc_playerInRangeArray) then {_missionComplete = 1};
};
if (_endIfAIKilled) then
{
if (({alive _x} count _blck_AllMissionAI) < 1) 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};
};
};
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 2;
};
if (_crateStolen) exitWith
{
diag_log format["missionSpawner:: (491) 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:: (496) Mission completion criteria fulfilled: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
diag_log format["missionSpawner :: (497) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled];
diag_log format["[blckeagls] missionSpawner:: (498) calling endMission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
private["_result"];
// Force passing the mission name for informational purposes.
_blck_localMissionMarker set [2, _markerMissionName];
if (blck_showCountAliveAI) then
{
//_marker setMarkerText format["%1: All AI Dead",_markerMissionName];
{
if ((_x select 1) isEqualTo _markerMissionName) exitWith{blck_missionMarkers deleteAt _forEachIndex};
}forEach blck_missionMarkers;
};
diag_log format["_fnc_missionSpawner (557) Build 123: _secureAsset = %1 | {alive _assetSpawned} = %2 | assetType = %3",_secureAsset,alive _assetSpawned, _assetSpawned getVariable["assetType",-1]];
if (_assetSpawned getVariable["assetType",0] isEqualTo 1) then
{
diag_log "Processing Mission End for Hostage Rescue";
_assetSpawned setCaptive false;
_assetSpawned setVariable["GMSAnimations",[""],true];
[_assetSpawned,""] remoteExec["switchMove",-2];;
uiSleep 0.1;
_assetSpawned enableAI "ALL";
private _newPos = (getPos _assetSpawned) getPos [1000, random(360)];
diag_log format["processing domove for hostage with current pos = %1 and new pos = %2",getPos _assetSpawned, _newPos];
(group _assetSpawned) setCurrentWaypoint [group _assetSpawned, 0];
[group _assetSpawned,0] setWaypointPosition [_newPos,0];
[group _assetSpawned,0] setWaypointType "MOVE";
};
if (_assetSpawned getVariable["assetType",0] isEqualTo 2) then
{
diag_log format["Processing Mission End for Arrest of Leader %1 with endAnimation %2",_assetSpawned,_assetSpawned getVariable["endAnimation",""]];
[_assetSpawned,""] remoteExec["switchMove",-2];
_assetSpawned setVariable["GMSAnimations",_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]],true];
[_assetSpawned,selectRandom(_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]])] remoteExec["switchMove",-2];
};
diag_log format["_fnc_missionSpawner (579) Build 123: <calling blck_fnc_endMission> _secureAsset = %1 | {alive _assetSpawned} = %2 | assetType = %3",_secureAsset,alive _assetSpawned, _assetSpawned getVariable["assetType",-1]];
_result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 0] call blck_fnc_endMission;
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then {diag_log format["[blckeagls] missionSpawner:: (507)end of mission: blck_fnc_endMission has returned control to _fnc_missionSpawner"]};
#endif

View File

@ -12,10 +12,10 @@
*/
#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","_reinforcementLootCounts","_chanceLoot","_heliCrew","_loadCratesTiming","_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius",
"_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_noChoppers","_chancePara","_marker"];
private ["_abort","_crates","_aiGroup","_objects","_mines","_blck_AllMissionAI","_blck_localMissionMarker",
"_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups","_loadCratesTiming","_spawnCratesTiming","_assetSpawned",
"_blck_AllMissionAI","_delayTime","_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_marker"];
params["_coords","_markerClass","_aiDifficultyLevel"];
@ -37,6 +37,7 @@ 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};
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 = []};
@ -44,6 +45,74 @@ 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 = 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 "_uniforms") then {_uniforms = blck_SkinList};
if (isNil "_headGear") then {_headgear = blck_headgear};
if (isNil "_chanceHeliPatrol") then
{
switch (toLower(_aiDifficultyLevel)) do
{
case "blue": {_chanceHeliPatrol = blck_chanceHeliPatrolBlue};
case "red": {_chanceHeliPatrol = blck_noPatblck_chanceHeliPatrolRed};
case "green": {_chanceHeliPatrol = blck_noPatblck_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 = 0};
if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;};
if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Blue};
if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed};
_objects = [];
_mines = [];
@ -53,8 +122,10 @@ _missionAIVehicles = [];
_blck_AllMissionAI = [];
_AI_Vehicles = [];
_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType];
_delayTime = 1;
_groupPatrolRadius = 50;
//_delayTime = 1;
//_groupPatrolRadius = 50;
diag_log "_missionSpawner: All variables initialized";
if (blck_labelMapMarkers select 0) then
{
@ -118,13 +189,6 @@ if (_missionTimedOut) exitWith
blck_missionsRunning = blck_missionsRunning - 1;
[_blck_localMissionMarker select 0] call blck_fnc_deleteMarker;
[_objects, 0.1] spawn blck_fnc_cleanupObjects;
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (133) Mission Timed Out: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
};
////////
@ -146,13 +210,13 @@ if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crat
};
};
uiSleep _delayTime;
uiSleep delayTime;
if (_useMines) then
{
_mines = [_coords] call blck_fnc_spawnMines;
};
uiSleep _delayTime;
uiSleep delayTime;
_temp = [];
if (_missionLandscapeMode isEqualTo "random") then
@ -174,17 +238,26 @@ if (blck_debugLevel > 0) then
};
#endif
uiSleep _delayTime;;
uiSleep delayTime;;
_temp = [_coords,_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles;
//uisleep 1;
_crates append _temp;
uiSleep _delayTime;
uiSleep delayTime;
_abort = false;
_temp = [[],[],false];
_temp = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear,_missionGroups] call blck_fnc_spawnMissionAI;
// 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 {
@ -237,20 +310,17 @@ if !(_enemyLeaderConfig isEqualTo []) then
};
#endif
uiSleep _delayTime;
uiSleep delayTime;
_temp = [[],[],false];
_abort = false;
_vehToSpawn = [_noVehiclePatrols] call blck_fnc_getNumberFromRange;
if (blck_useVehiclePatrols && ((_vehToSpawn > 0) || count _missionPatrolVehicles > 0)) then
{
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_missionPatrolVehicles] call blck_fnc_spawnMissionVehiclePatrols;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {
diag_log format["missionSpawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp];
};
#endif
#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
{
@ -260,97 +330,59 @@ if (blck_useVehiclePatrols && ((_vehToSpawn > 0) || count _missionPatrolVehicles
{
_patrolVehicles = _temp select 0;
_blck_AllMissionAI append (_temp select 1);
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (267) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
};
};
if (_abort) exitWith
{
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {
diag_log "missionSpawner:: (279) grpNull returned, mission termination criteria met, calling blck_endMission";
};
#endif
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
};
uiSleep _delayTime;
uiSleep delayTime;
_temp = [[],[],false];
_abort = false;
// Deal with helicopter patrols
_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout;
_temp = [];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["[blckeagls] missionSpawner:: (298) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
diag_log format["[blckeagls] missionSpawner:: (298) calling in heli patrol: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
switch (toLower _aiDifficultyLevel) do
{
case "blue":{
_noChoppers = [blck_noPatrolHelisBlue] call blck_fnc_getNumberFromRange;
_chancePara = [blck_chanceParaBlue] call blck_fnc_getNumberFromRange;
};
case "red":{
_noChoppers = [blck_noPatrolHelisRed] call blck_fnc_getNumberFromRange;
_chancePara = [blck_chanceParaRed] call blck_fnc_getNumberFromRange;
};
case "green":{
_noChoppers = [blck_noPatrolHelisGreen] call blck_fnc_getNumberFromRange;
_chancePara = [blck_chanceParaGreen] call blck_fnc_getNumberFromRange;
};
case "orange":{
_noChoppers = [blck_noPatrolHelisOrange] call blck_fnc_getNumberFromRange;
_chancePara = [blck_chanceParaOrange] call blck_fnc_getNumberFromRange;
};
default {
_chancePara = 0.5;
_noChoppers = 0;
};
};
_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
for "_i" from 1 to (_noChoppers) do
if (_noChoppers > 0) then
{
_temp = [_coords,_aiDifficultyLevel,_weaponList,_uniforms,_headGear,_chancePara] call blck_fnc_spawnMissionReinforcements;
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;
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
{
diag_log format["missionSpawner(334):: blck_fnc_spawnMissionReinforcements call for chopper # %1 out of a total of %2 choppers",_i, _noChoppers];
diag_log format["missionSpawner(335):: _temp = %1",_temp];
};
#endif
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
{
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log "missionSpawner:: (349) grpNul or ERROR in blck_fnc_spawnMissionReinforcements, mission termination criteria met, calling blck_endMission"};
#endif
_objects pushback (_temp select 0);
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
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
@ -359,44 +391,29 @@ if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (361) preparing
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
{
_temp = [_missionEmplacedWeapons,_noEmplacedToSpawn,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format ["missionSpawner:: (375) blck_fnc_spawnEmplacedWeaponArray returned _temp = %1",_temp]};
#endif
// _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;
};
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format ["missionSpawner:: (387) _abort = %1",_abort]};
#endif
if !(_abort) then
{
_objects append (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log format["[blckeagls] missionSpawner:: (400) Static Weapons Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]};
#endif
};
};
if (_abort) exitWith
{
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log "missionSpawner:: (410) grpNull ERROR in blck_fnc_spawnEmplacedWeaponArray, mission termination criteria met, calling blck_endMission"};
#endif
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["_fnc_missionSpawner: _spawnCratesTiming = %1", _spawnCratesTiming]};
#endif
uiSleep _delayTime;
uiSleep delayTime;
if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then
{
if (count _missionLootBoxes > 0) then
@ -413,16 +430,26 @@ if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then
{
_objects append _crates;
};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["[blckeagls] missionSpawner:: (428) Crates Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
};
// Trigger for mission end
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;
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;
};
};
};
// Define Triggers for mission end
private["_missionComplete","_endIfPlayerNear","_endIfAIKilled","_secureAsset","_crateStolen","_locations"];
_missionComplete = -1;
_startTime = diag_tickTime;
@ -435,13 +462,6 @@ switch (_endCondition) do
case "assetSecured": {_secureAsset = true; _endIfPlayerNear = false; _endIfAIKilled = false;};
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {
diag_log format["_missionSpawner (464): _endCondition = %1",_endCondition];
diag_log format["missionSpawner :: (449) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled];
};
#endif
if (blck_showCountAliveAI) then
{
if !(_marker isEqualTo "") then
@ -453,21 +473,16 @@ if (blck_showCountAliveAI) then
_crateStolen = false;
_locations = [_coords];
private _spawnPara = if (random(1) < _chancePara) then {true} else {false};
diag_log format["_fnc_missionSpawner (476): _spawnPara = %1 | _chancePara = %2",_spawnPara,_chancePara];
{
_locations pushback (getPos _x);
_x setVariable["crateSpawnPos", (getPos _x)];
} forEach _crates;
#ifdef blck_debugMode
diag_log format["missionSpawner (458):: _coords = %1 | _crates = %2 | _locations = %3",_coords,_crates,_locations];
diag_log format["missionSpawner(462):: Waiting for player to satisfy mission end criteria of _endIfPlayerNear %1 with _endIfAIKilled %2",_endIfPlayerNear,_endIfAIKilled];
diag_log format["_fnc_missionSpawner(495) starting mission completion loop with _assetSpawned = %1",_assetSpawned];
#endif
while {_missionComplete isEqualTo -1} do
{
//if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 180};
if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 180};
if (_endIfPlayerNear) then
{
if ([_locations,10,true] call blck_fnc_playerInRangeArray) then {_missionComplete = 1};
@ -488,12 +503,6 @@ while {_missionComplete isEqualTo -1} do
};
if (_secureAsset) then
{
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["_fnc_missionSpawner (494): _assetSpawned = %1 with _blck_AIState = %2",_assetSpawned,_assetSpawned getVariable["blck_AIState",0]];
};
#endif
if !(alive _assetSpawned) then
{
_missionComplete = 1
@ -501,6 +510,30 @@ while {_missionComplete isEqualTo -1} do
if (_assetSpawned getVariable["blck_AIState",0] > 0 && (({alive _x} count _blck_AllMissionAI) isEqualTo 1)) then {_missionComplete = 1};
};
};
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 2;
};
@ -561,7 +594,7 @@ private["_result"];
_blck_localMissionMarker set [2, _markerMissionName];
if (blck_showCountAliveAI) then
{
_marker setMarkerText format["%1: All AI Dead",_markerMissionName];
//_marker setMarkerText format["%1: All AI Dead",_markerMissionName];
{
if ((_x select 1) isEqualTo _markerMissionName) exitWith{blck_missionMarkers deleteAt _forEachIndex};
}forEach blck_missionMarkers;
@ -597,5 +630,5 @@ diag_log format["_fnc_missionSpawner (579) Build 123: <calling blck_fnc_endMissi
_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"]};
if (blck_debugLevel >= 2) then {diag_log format["[blckeagls] missionSpawner:: (507)end of mission: blck_fnc_endMission has returned control to _fnc_missionSpawner"]};
#endif

View File

@ -0,0 +1,47 @@
/*
spawn a crate at a specific location
returns the object (crate) that was created.
for ghostridergaming
By Ghostrider [GRG]
Copyright 2016
Last updated 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 ["_crate"];
params["_coords",["_crateType","Box_NATO_Wps_F"]];
_crate = createVehicle [_crateType,_coords,[], 0, "CAN_COLLIDE"];
_crate setVariable ["LAST_CHECK", 100000];
_crate allowDamage false;
_crate enableRopeAttach false;
[_crate] call blck_fnc_emptyObject;
_crate setPosATL _coords;
_crate setVectorUp [0,0,0];
if ((_coords select 2) < 0 || surfaceIsWater (_coords)) then
{
private["_lantern","_bbr","_p1","_p2","_maxHeight"];
//_lantern = createVehicle ["PortableHelipadLight_01_red_F", [0,0,0],[],0,"CAN_COLLIDE"];// Land_Camping_Light_F
//_lantern enableSimulationGlobal true;
//_lantern switchLight "on";
_light = "#lightpoint" createVehicle (getPos _crate);
_light setLightDayLight true;
_light setLightBrightness 1.0;
_light setLightAmbient [0.0, 1.0, 0.0];
_light setLightColor [0.0, 1.0, 0.0];
_bbr = boundingBoxReal _crate;
_p1 = _bbr select 0;
_p2 = _bbr select 1;
_maxHeight = abs ((_p2 select 2) - (_p1 select 2));
//diag_log format["_fnc_spawnCrate: _bbr = %1 | _maxHeight = %2",_bbr,_maxHeight];
_light attachTo [_crate, [0,0,(_maxHeight + 0.5)]];
};
_crate;

View File

@ -13,8 +13,16 @@
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"];
//diag_log format["_fnc_spawnEmplacedWeaponArray:: _this = %1",_this];
params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols]];
#ifdef blck_debugMode
if (blck_debugLevel >=2) then
{
private _params = ["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms"];
{
diag_log format["blck_fnc_spawnEmplacedWeaponArray:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex];
}forEach _this;
};
#endif
private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner","_abort","_pos","_mode","_useRelativePos","_useRelativePos"];
_emplacedWeps = [];
@ -30,7 +38,6 @@ _pos = [];
// Define _missionEmplacedWeapons if not already configured.
if (_missionEmplacedWeapons isEqualTo []) then
{
_useRelativePos = false;
_missionEmplacedWeaponPositions = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
@ -44,9 +51,8 @@ if (_missionEmplacedWeapons isEqualTo []) then
_missionEmplacedWeapons pushback [_static,_x];
//diag_log format["_fnc_spawnEmplacedWeaponArray: _mi updated to %1",_missionEmplacedWeapons];
} forEach _missionEmplacedWeaponPositions;
} else {
_useRelativePos = true;
};;
_useRelativePos = false;
};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
@ -69,9 +75,14 @@ if (blck_debugLevel > 1) then
diag_log format["_fnc_spawnEmplacedWeaponArray(67):: _coords = %1 | offset = %2 | final _pos = %3",_coords,_x select 1, _pos];
};
#endif
#define configureWaypoints false
#define minAI 1
#define maxAI 1
#define minDist 1
#define maxDist 2
// params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear] ];
_empGroup = [_pos,1,1,_aiDifficultyLevel,(_x select 1),1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup;
/// // params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_empGroup = [(_x select 1),_pos,minAI,maxAI,_aiDifficultyLevel,minDist,maxDist,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnGroup;
_empGroup setcombatmode "RED";
_empGroup setBehaviour "COMBAT";

View File

@ -1,14 +1,7 @@
/*
blck_fnc_spawnMissionAI
by Ghostrider [GRG]
8/13/17
[_coords, // center of the area within which to spawn AI
_minNoAI, // minimum number of AI to spawn
_maxNoAI, // Max number of AI to spawn
_aiDifficultyLevel, // AI level [blue, red, etc]
_uniforms, // Uniforms to use - note default is blck_sSkinList
_headGear // headgear to use - blck_BanditHeager is the default
] call blck_fnc_spawnMissionAI
returns an array of the units spawned
--------------------------
@ -19,18 +12,21 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#define configureWaypoints true
// [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,_scubaGroupParameters,blck_UMS_weapons,blck_UMS_vests,isScubaGroup]
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
{
diag_log format["_fnc_spawnMissionAI: _this = %1",_this];
private _params = ["_coords","_minNoAI","_maxNoAI","_missionGroups","_aiDifficultyLevel","_uniforms","_headGear","_vests","_backpacks","_weapons","_sideArms","_isScubaGroup"];
{
diag_log format["_fnc_spawnMissionAI:: _this select %1 = %2",_forEachIndex,_x];
diag_log format["_fnc_spawnMissionAI:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex];
}forEach _this;
};
#endif
// [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,_scubaGroupParameters,blck_UMS_weapons,blck_UMS_vests,isScubaGroup]
params["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear],"_missionGroups",["_weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]];
private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup","_blck_AllMissionAI","_abort","_return","_adjusttedGroupSize"];
private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup","_blck_AllMissionAI","_abort","_return","_adjusttedGroupSize","_minDist","_maxDist"];
_unitsToSpawn = 0;
_unitsPerGroup = 0;
_ResidualUnits = 0;
@ -58,8 +54,9 @@ if ( (count _missionGroups > 0) && _noAIGroups > 0) then
{ //[[-98.9121,-35.9824,-1.20243],5,7,"Green",5,12],[[1,-1,-1],"red",4, 5,10]
_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"];
_groupSpawnPos = _coords vectorAdd _position;
// params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true],["_weaponList",[]],["_vests",blck_vests],["_scuba",false] ];
_newGroup = [_groupSpawnPos,_minAI,_maxAI,_skillLevel,_coords,_minPatrolRadius,_maxPatrolRadius,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
// params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_newGroup = [_groupSpawnPos,_coords,_minAI,_maxAI,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup;
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
@ -90,6 +87,9 @@ if ( (count _missionGroups > 0) && _noAIGroups > 0) then
};
if (_missionGroups isEqualTo [] && _noAIGroups > 0) then
{
private _minPatrolRadius = blck_minimumPatrolRadius;
private _maxPatrolRadius = blck_maximumPatrolRadius;
switch (_noAIGroups) do
{
case 1: { // spawn the group near the mission center
@ -101,10 +101,10 @@ if (_missionGroups isEqualTo [] && _noAIGroups > 0) then
diag_log format["missionSpawner: Spawning Groups: _noAIGroups=1"];
};
#endif
_minDist = 20;
_maxDist = 35;
_newGroup = [_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
//_newGroup = [_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
// params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_newGroup = [_coords,_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup;
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
{
@ -139,8 +139,6 @@ if (_missionGroups isEqualTo [] && _noAIGroups > 0) then
diag_log format["_fnc_spawnMissionAI(47): Spawning Groups: _noAIGroups=2"]; // spawn groups on either side of the mission area
};
#endif
_minDist = 20;
_maxDist = 35;
_groupLocations = [_coords,_noAIGroups,15,30] call blck_fnc_findPositionsAlongARadius;
{
if (_ResidualUnits > 0) then
@ -150,8 +148,9 @@ if (_missionGroups isEqualTo [] && _noAIGroups > 0) then
} else {
_adjusttedGroupSize = _unitsPerGroup;
};
_newGroup = [_x,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
// params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
//_newGroup = [_x,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_coords,_minPatrolRadius,_maxPatrolRadius,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
_newGroup = [_x,_coords,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup;
if (isNull _newGroup) then
{
_abort = true;
@ -180,10 +179,9 @@ if (_missionGroups isEqualTo [] && _noAIGroups > 0) then
diag_log format["_fnc_spawnMissionAI (68): Spawning Groups: _noAIGroups=3"];
};
#endif
_minDist = 20;
_maxDist = 35;
_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
// params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
//_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,_minPatrolRadius,_maxPatrolRadius,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
_newGroup = [_coords,_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup;
if (isNull _newGroup) then
{
_abort = true;
@ -203,7 +201,9 @@ if (_missionGroups isEqualTo [] && _noAIGroups > 0) then
_groupLocations = [_coords,2,20,35] call blck_fnc_findPositionsAlongARadius;
{
_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
// params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
//_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,_minPatrolRadius,_maxPatrolRadius,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
_newGroup = [_x,_coords,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup;
if (isNull _newGroup) then
{
_abort = true;
@ -232,8 +232,9 @@ if (_missionGroups isEqualTo [] && _noAIGroups > 0) then
diag_log format["_fnc_spawnMissionAI (88): case 4:"];
};
#endif
_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
// params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
//_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
_newGroup = [_x,_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup;
if (isNull _newGroup) then
{
_abort = true;
@ -250,9 +251,9 @@ if (_missionGroups isEqualTo [] && _noAIGroups > 0) then
_blck_AllMissionAI append _newAI;
_groupLocations = [_coords,(_noAIGroups - 1),20,40] call blck_fnc_findPositionsAlongARadius;
{
_minDist = 20;
_maxDist = 35;
_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
// params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
//_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,_minPatrolRadius,_maxPatrolRadius,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
_newGroup = [_x,_coords,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup;
if (isNull _newGroup) then
{
_abort = true;

View File

@ -1,5 +1,4 @@
/*
Spawn some crates using an array containing crate types and their offsets relative to a reference position and prevent their cleanup.
By Ghostrider [GRG]
Copyright 2018
@ -16,7 +15,7 @@ private ["_cratesSpawned","_pos","_crate"];
params[ ["_coords", [0,0,0]], ["_cratesToSpawn",[]], ["_loadCrateTiming","atMissionSpawn"],["_spawnCrateTiming","atMissionSpawn"],["_missionState","start"], ["_difficulty","red"] ];
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
if (blck_debugLevel >= 2) then
{
{
diag_log format["_fnc_spawnMissionCrates: _this select %1 = %2",_foreachindex, _this select _foreachindex];
@ -47,12 +46,13 @@ _cratesSpawned = [];
};
_cratesSpawned pushback _crate;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
if (blck_debugLevel >= 2) then
{
diag_log format["_fnc_spawnMissionCrates: _crateType = %1 | _crateOffset = %2 | _lootArray = %3 | _lootCounts = %4",_crateType,_crateOffset,_lootArray,_lootCounts];
_marker = createMarker [format["crateMarker%1",random(1000000)], _pos];
_marker setMarkerType "mil_triangle";
_marker setMarkerColor "colorGreen";
_marker setMarkerColor "colorGreen";
_crate setVariable["crateMarker",_marker];
};
#endif
}forEach _cratesToSpawn;
@ -73,14 +73,11 @@ _fnc_dropMissionCrates = {
uiSleep 1;
{
// (((getPos _crate) select 2) < 3)
if ((getPos _x) select 2< 5) then
if ((getPos _x) select 2 < 5) then
{
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["_fnc_spawnMissionCrates: objects attached to %1 = %2",_x, attachedObjects _x]};
#endif
_airborneCrates = _airborneCrates - [_x];
_chute = _x getVariable["chute",objNull];
detach _crate;
detach _x;
deleteVehicle _chute;
_location = getPos _x;
_blck_localMissionMarker = [format["crateMarker%1%2",_location select 0, _location select 1],_location,"","","ColorBlack",["mil_dot",[]]];
@ -101,7 +98,7 @@ _fnc_dropMissionCrates = {
}forEach _markers
};
if (_spawnCrateTiming isEqualTo "atMissionEndAir") then
if (_spawnCrateTiming in ["atMissionEndAir","atMissionStartAir"]) then
{
[_cratesSpawned] spawn _fnc_dropMissionCrates;
};

View File

@ -1,8 +1,6 @@
/*
[_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles;
returns _vehs, an array of vehicles spawned.
by Ghostridere-DbD-
3/20/17
by Ghostridere-GRG-
Copyright 2016
--------------------------
License

View File

@ -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

View File

@ -1,5 +1,5 @@
/*
[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionVehiclePatrols
blck_fnc_spawnMissionVehiclePatrols
by Ghostrider [GRG]
3/17/17
returns [] if no groups could be created
@ -13,14 +13,16 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear","_missionPatrolVehicles",["_useRelativePos",true],["_weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]];
if (count _weapons == 0) then {_weapons = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
// params["_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",20], ["_maxDist",35],["_configureWaypoints",true], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_scuba",false] ];
params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]];
if (count _weaponList == 0) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
if (blck_debugLevel >=2) then
{
diag_log format["_fnc_spawnMissionVehiclePatrols: _this = %1",_this];
diag_log format["_fnc_spawnMissionVehiclePatrols:: _coords = %1 | _noVehiclePatrols = %2 | _aiDifficultyLevel = %3",_coords,_noVehiclePatrols,_aiDifficultyLevel];
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
@ -39,7 +41,7 @@ if (_missionPatrolVehicles isEqualTo []) then
_missionPatrolVehicles pushBack [_v, _x];
}forEach _vehiclePatrolSpawns;
};
#define configureWaypoints false
{
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
@ -55,8 +57,8 @@ if (_missionPatrolVehicles isEqualTo []) then
_spawnPos = _x select 1;
};
_vehicle = _x select 0;
_vehGroup = [_spawnPos,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear,false,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
// 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;
@ -83,7 +85,7 @@ if (_missionPatrolVehicles isEqualTo []) then
#endif
//params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]];
_patrolVehicle = [_coords,_spawnPos,_vehicle,30,45,_vehGroup] call blck_fnc_spawnVehiclePatrol;
_patrolVehicle = [_coords,_spawnPos,_vehicle,30,45,_vehGroup,true] call blck_fnc_spawnVehiclePatrol;
_vehGroup setVariable["groupVehicle",_vehicle];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then

View File

@ -16,8 +16,8 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#ifdef blck_debugMode
if (blck_debugLevel > 3) then {
diag_log format["_fnc_spawnPendingMissions:: blck_pendingMissions = %1", blck_pendingMissions];
if (blck_debugLevel >= 2) then {
diag_log format["_fnc_spawnPendingMissions:: count blck_pendingMissions = %1", count blck_pendingMissions];
};
#endif
@ -34,28 +34,29 @@ private["_coords","_compiledMission","_search","_readyToSpawnQue","_missionToSpa
_readyToSpawnQue = [];
{ // 0 1 2 3 3 5 6
// _mission = [_compiledMissionsList,format["%1%2",_marker,_i],_difficulty,_tMin,_tMax,_waitTime,[0,0,0]];
//diag_log format["_fnc_spawnPendingMissions: diag_tickTime %6 _marker %1 _difficulty %2 _tMin %3 _tMax %4 _waitTime %5",_x select 1, _x select 2, _x select 3, _x select 4, _x select 5, diag_tickTime];
if ( (diag_tickTime > (_x select 5)) && ((_x select 5) > 0) ) then
{
_readyToSpawnQue pushback _x;
//diag_log format["_fnc_spawnPendingMissions: adding mission with _marker %1 _difficulty %2",_x select 1, _x select 2];
//diag_log format["_fnc_spawnPendingMissions: count _readyToSpawnQue = %1",count _readyToSpawnQue];
};
} forEach blck_pendingMissions;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_spawnPendingMissions:: --- >> _readyToSpawnQue = %1",_readyToSpawnQue];
diag_log format["_fnc_spawnPendingMissions: count _readyToSpawnQue = %1", count _readyToSpawnQue];
diag_log format["_fnc_spawnPendingMissions:: --- >> _readyToSpawnQue diag_tickTime %6 _marker %1 _difficulty %2 _tMin %3 _tMax %4 _waitTime %5",_readyToSpawnQue select 1, _readyToSpawnQue select 2, _readyToSpawnQue select 3, _readyToSpawnQue select 4, _readyToSpawnQue select 5, diag_tickTime];
};
#endif
if (count _readyToSpawnQue > 0) then
{
_missionToSpawn = selectRandom _readyToSpawnQue;
//{
//if (_foreachindex > 0) then {diag_log format["_fnc_spawnPendingMissions: _missionToSpawn %1 = %2",_foreachindex, _missionToSpawn select _foreachindex]};
//}forEach _missionToSpawn;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnPendingMissions:: -- >> blck_missionsRunning = %1 and blck_maxSpawnedMissions = %2 so _canSpawn = %3",blck_missionsRunning,blck_maxSpawnedMissions, (blck_maxSpawnedMissions - blck_missionsRunning)];
};
if (_foreachindex > 0) then {diag_log format["_fnc_spawnPendingMissions: _missionToSpawn %1 = %2",_foreachindex, _missionToSpawn select _foreachindex]};
}forEach _missionToSpawn;
#endif
_coords = [] call blck_fnc_FindSafePosn;
@ -64,8 +65,9 @@ if (count _readyToSpawnQue > 0) then
// _mission = [_compiledMissionsList,format["%1%2",_marker,_i],_difficulty,_tMin,_tMax,_waitTime,[0,0,0]];
_missionMarker = _missionToSpawn select 1;
_missionDifficulty = _missionToSpawn select 2;
//diag_log format["_fnc_spawnPendingMissions: _missionParameters = %1",_missionParameters];
//[_coords,_missionToSpawn,_allowReinforcements] execVM format["\q\addons\custom_server\Missions\%1\%2.sqf",_missionPath,_missionName];
//diag_log format["_fnc_spawnPendingMissions: _missionMarker %1",_missionMarker];
//diag_log format["_fnc_spawnPendingMissions: _missionDifficulty %1",_missionDifficulty];
//diag_log format["_fnc_spawnPendingMissions: _compiledMission %1",_compiledMission];
[_coords,_missionMarker,_missionDifficulty] spawn _compiledMission;
blck_missionsRunning = blck_missionsRunning + 1;
};

View File

@ -79,18 +79,19 @@ if ( blck_VK_GunnerDamage ) then
else {
if ((currentWeapon _killer) in blck_forbidenVehicleGuns) then { _legal = false;};
};
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["!!---!! Unit was killed by a forbidden vehicle or gun",_unit];
};
#endif
if (blck_VK_Gear) then {[_unit] call _fn_deleteAIGear;};
if !(_legal) then
{
[_unit, vehicle _killer] call _fn_targetVehicle;
[vehicle _killer] call _fn_applyVehicleDamage;
[_killer] call _fn_msgIED;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["!!---!! Unit was killed by a forbidden vehicle or gun",_unit];
};
#endif
};
};

View File

@ -0,0 +1,83 @@
/*
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;
// params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]];
_unit = [[_spawnPos select 0, _spawnPos select 1, 100],_paraGroup,_skillAI,_uniforms,_headGear,blck_vests,blck_backpacks,_launcherType,_weapons] call blck_fnc_spawnUnit;
_chute setPos [_spawnPos select 0, _spawnPos select 1, 125]; //(_offset select 2) - 10];
_unit assignAsDriver _chute;
_unit moveInDriver _chute;
_unit allowDamage true;
_dir = _dir + _arc;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnParaUnits:: spawned unit %1, at location %2 and vehicle _unit %1",_unit,getPos _unit, vehicle _unit];
};
#endif
uiSleep 2;
};
_paraGroup selectLeader ((units _paraGroup) select 0);
//params["_pos","_minDis","_maxDis","_group"];
// [_pos,_minDist,_maxDist,_groupSpawned,"random","SAD"] spawn blck_fnc_setupWaypoints;
[_missionPos,20,30,_paraGroup,"random","SAD","paraUnits"] call blck_fnc_setupWaypoints;
blck_monitoredMissionAIGroups pushback _paraGroup;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log "_fnc_spawnParaUnits (44): All Units spawned";
};
#endif
};
#ifdef blck_debugMode
diag_log format["_fnc_spawnParaUnits: _aborted = %1",_aborted];
#endif
_aborted;

View File

@ -0,0 +1,58 @@
/*
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["_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"];
{
diag_log format["_fnc_spawnParaUnits: %1 = %2",_x, _this select _forEachIndex];
}forEach _params;
_paraGroup = call blck_fnc_create_AI_Group;
diag_log format["_fnc_spawnParaUnits: _paraGroup = %1",_paraGroup];
// [_pos,_minDist,_maxDist,_groupSpawned,"random","SAD"] spawn blck_fnc_setupWaypoints;
[_pos,20,30,_paraGroup,"random","SAD","paraUnits"] call blck_fnc_setupWaypoints;
#define launcherType "none"
private ["_arc","_spawnPos"];
_arc = 45;
_dir = 0;
for "_i" from 1 to _numAI do
{
_spawnPos = _pos getPos[1,_dir];
_chute = createVehicle ["Steerable_Parachute_F", [_spawnPos select 0, _spawnPos select 1, 250], [], 0, "FLY"];
[_chute] call blck_fnc_protectVehicle;
// ["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]];
_unit = [getPos _chute,_paraGroup,_skillAI,_uniforms,_headGear,_vests,_backpacks,launcherType,_weapons] call blck_fnc_spawnUnit;
diag_log format["_fnc_spawnParaUnits: unit %1 = %2 dropping in chute %3",_i,_unit,_chute];
//_chute setPos [_spawnPos select 0, _spawnPos select 1, 125]; //(_offset select 2) - 10];
_unit assignAsDriver _chute;
_unit moveInDriver _chute;
//_unit allowDamage true;
_unit setVariable["chute",_chute];
_dir = _dir + _arc;
uiSleep 2;
};
blck_monitoredMissionAIGroups pushback _paraGroup;
_paraGroup

View File

@ -0,0 +1,192 @@
/*
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","_ai1","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices","_modType","_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;
//{
//diag_log format["_fnc_spawnUnit:: _this select %1 = %2",_forEachIndex,_x];
//}forEach _this;
};
#endif
if (isNull _aiGroup) exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnUnit"};
_ai1 = ObjNull;
_modType = call blck_fnc_getModType;
if (_modType isEqualTo "Epoch") then
{
"I_Soldier_EPOCH" createUnit [_pos, _aiGroup, "_ai1 = this", blck_baseSkill, "COLONEL"];
_ai1 setVariable ["LAST_CHECK",28800,true];
switch(_skillLevel) do
{
case "blue":{_ai1 setVariable["Crypto",1 + floor(random(blck_maxMoneyBlue)),true];};
case "red":{_ai1 setVariable["Crypto",2 + floor(random(blck_maxMoneyRed)),true];};
case "green":{_ai1 setVariable["Crypto",3 + floor(random(blck_maxMoneyGreen)),true];};
case "orange":{_ai1 setVariable["Crypto",4 + floor(random(blck_maxMoneyOrange)),true];};
};
};
if (_modType isEqualTo "Exile") then
{
"i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_ai1 = this", blck_baseSkill, "COLONEL"];
switch(_skillLevel) do
{
case "blue":{_ai1 setVariable["ExileMoney",2 + floor(random(blck_maxMoneyBlue)),true];};
case "red":{_ai1 setVariable["ExileMoney",4 + floor(random(blck_maxMoneyRed)),true];};
case "green":{_ai1 setVariable["ExileMoney",6 + floor(random(blck_maxMoneyGreen)),true];};
case "orange":{_ai1 setVariable["ExileMoney",8 + floor(random(blck_maxMoneyOrange)),true];};
};
};
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
{
diag_log format["_fnc_spawnUnit::-->> unit spawned = %1",_ai1];
};
#endif
[_ai1] call blck_fnc_removeGear;
if (_scuba) then
{
_ai1 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 _ai1];
};
#endif
};
_skin = "";
_counter = 1;
diag_log format["_fnc_spawnUnit: _uniforms = %1",_uniforms];
while {_skin isEqualTo "" && _counter < 10} do
{
_ai1 forceAddUniform (selectRandom _uniforms);
_skin = uniform _ai1;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_spawnUnit::-->> for unit _ai1 % uniform is %2",_ai1, uniform _ai1];
};
#endif
_counter =+1;
};
//Sets AI Tactics
_ai1 enableAI "ALL";
_ai1 allowDammage true;
_ai1 setBehaviour "COMBAT";
_ai1 setunitpos "AUTO";
if (count _headGear > 0) then {_ai1 addHeadgear (selectRandom _headGear)};
if (count _vests > 0) then {_ai1 addVest (selectRandom _vests)};
if (count _weaponList isEqualTo 0) then {_weaponList = call blck_fnc_selectAILoadout};
_weap = selectRandom _weaponList;
_ai1 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;
_ai1 addMagazines [selectRandom _ammoChoices, 3];
if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _muzzles)};
if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _legalOptics)};
if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _pointers)};
if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _muzzles)};
if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _underbarrel)};
if ((count(getArray (configFile >> "cfgWeapons" >> _weap >> "muzzles"))) > 1) then
{
_ai1 addMagazine "1Rnd_HE_Grenade_shell";
};
if (count _sideArms > 0) then
{
_weap = selectRandom _sideArms;
//diag_log format["[spawnUnit.sqf] _weap os %1",_weap];
_ai1 addWeaponGlobal _weap;
_ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines");
_ai1 addMagazines [selectRandom _ammoChoices, 2];
};
for "_i" from 1 to (1+floor(random(4))) do
{
_ai1 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];
_ai1 addItem selectRandom blck_specialItems;
};
if (_Launcher != "none" and (count _backpacks > 0)) then
{
private["_bpck"];
_ai1 addWeaponGlobal _Launcher;
_ai1 addBackpack (selectRandom _backpacks);
for "_i" from 1 to 3 do
{
_ai1 addItemToBackpack (getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines") select 0); // call BIS_fnc_selectRandom;
};
_ai1 setVariable["Launcher",_launcher,true];
} else {
if ( random (1) < blck_chanceBackpack and (count _backpacks > 0)) then
{
_ai1 addBackpack selectRandom _backpacks;
};
};
if(sunOrMoon < 0.2 && blck_useNVG)then
{
_ai1 addWeapon selectRandom blck_NVG;
_ai1 setVariable ["hasNVG", true,true];
}
else
{
_ai1 setVariable ["hasNVG", false,true];
};
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_spawnUnit:: --> unit loadout = %1", getUnitLoadout _ai1];
};
#endif
_ai1 addEventHandler ["Reloaded", {_this call compile preprocessfilelinenumbers blck_EH_unitWeaponReloaded;}];
_ai1 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; }];
_ai1 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;};
};
[_ai1,_aiSkills] call blck_fnc_setSkill;
_ai1 setVariable ["alertDist",blck_AIAlertDistance select _index,true];
_ai1 setVariable ["intelligence",blck_AIIntelligence select _index,true];
_ai1 setVariable ["GMS_AI",true,true];
_ai1

View File

@ -1,4 +1,5 @@
/*
blck_fnc_spawnUnit
Original Code by blckeagls
Modified by Ghostrider
@ -11,110 +12,88 @@
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
private ["_i","_weap","_skin","_ai1","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices","_modType","_optics","_pointers","_muzzles","_underbarrel","_legalOptics"];
params["_pos","_weaponList","_aiGroup",["_skillLevel","red"],["_Launcher","none"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_scuba",false]];
private ["_i","_weap","_skin","_unit","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices","_modType","_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
if (blck_debugLevel >= 2) then
{
private _params = ["_pos","_weaponList","_aiGroup","_skillLevel","_Launcher","_uniforms","_headGear","_vests","_scuba"];
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;
//_pos = _this select 0; // Position at which to spawn AI
//_weaponList = _this select 1; // List of weapons with which to arm the AI
//_aiGroup = _this select 2; // Group to which AI belongs
//_skillLevel = [_this,3,"red"] call BIS_fnc_param; // Assign a skill level in case one was not passed."blue", "red", "green", "orange"
//_Launcher = [_this, 4, "none"] call BIS_fnc_param; // Set launchers to "none" if no setting was passed.
//_uniforms = [_this, 5, blck_SkinList] call BIS_fnc_param; // skins to add to AI
//_headGear = [_this, 6, _shemag] call BIS_fnc_param;// headGear to add to AI
{
diag_log format["_fnc_spawnUnit:: _this select %1 = %2",_forEachIndex,_x];
}forEach _this;
};
#endif
if (isNull _aiGroup) exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnUnit"};
_ai1 = ObjNull;
_unit = ObjNull;
_modType = call blck_fnc_getModType;
if (_modType isEqualTo "Epoch") then
{
"I_Soldier_EPOCH" createUnit [_pos, _aiGroup, "_ai1 = this", blck_baseSkill, "COLONEL"];
_ai1 setVariable ["LAST_CHECK",28800,true];
// _unit = group player createUnit ["B_RangeMaster_F", position player, [], 0, "FORM"];
//_ai1 = _aiGroup createUnit ["I_Soldier_EPOCH", _pos, [], blck_baseSkill, "FORM"];
"I_Soldier_EPOCH" createUnit [_pos, _aiGroup, "_unit = this", blck_baseSkill, "COLONEL"];
_unit setVariable ["LAST_CHECK",28800,true];
switch(_skillLevel) do
{
case "blue":{_ai1 setVariable["Crypto",1 + floor(random(blck_maxMoneyBlue)),true];};
case "red":{_ai1 setVariable["Crypto",2 + floor(random(blck_maxMoneyRed)),true];};
case "green":{_ai1 setVariable["Crypto",3 + floor(random(blck_maxMoneyGreen)),true];};
case "orange":{_ai1 setVariable["Crypto",4 + floor(random(blck_maxMoneyOrange)),true];};
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 (_modType isEqualTo "Exile") then
{
"i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_ai1 = this", blck_baseSkill, "COLONEL"];
//_ai1 = _aiGroup createUnit ["i_g_soldier_unarmed_f", _pos, [], blck_baseSkill, "FORM"];
"i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_unit = this", blck_baseSkill, "COLONEL"];
switch(_skillLevel) do
{
case "blue":{_ai1 setVariable["ExileMoney",2 + floor(random(blck_maxMoneyBlue)),true];};
case "red":{_ai1 setVariable["ExileMoney",4 + floor(random(blck_maxMoneyRed)),true];};
case "green":{_ai1 setVariable["ExileMoney",6 + floor(random(blck_maxMoneyGreen)),true];};
case "orange":{_ai1 setVariable["ExileMoney",8 + floor(random(blck_maxMoneyOrange)),true];};
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];};
};
};
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
{
diag_log format["_fnc_spawnUnit::-->> unit spawned = %1",_ai1];
diag_log format["_fnc_spawnUnit::-->> unit spawned = %1",_unit];
};
#endif
[_ai1] call blck_fnc_removeGear;
[_unit] call blck_fnc_removeGear;
if (_scuba) then
{
_ai1 swiminDepth (_pos select 2);
_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 _ai1];
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
{
_ai1 forceAddUniform (selectRandom _uniforms);
_skin = uniform _ai1;
_unit forceAddUniform (selectRandom _uniforms);
_skin = uniform _unit;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_spawnUnit::-->> for unit _ai1 % uniform is %2",_ai1, uniform _ai1];
diag_log format["_fnc_spawnUnit::-->> for unit _unit % uniform is %2",_unit, uniform _unit];
};
#endif
_counter =+1;
};
//Sets AI Tactics
/*
_ai1 enableAI "TARGET";
_ai1 enableAI "AUTOTARGET";
_ai1 enableAI "MOVE";
_ai1 enableAI "ANIM";
*/
_ai1 enableAI "ALL";
_ai1 allowDammage true;
_ai1 setBehaviour "COMBAT";
_ai1 setunitpos "AUTO";
_ai1 addHeadgear (selectRandom _headGear);
_ai1 addVest selectRandom _vests;
if ( random (1) < blck_chanceBackpack) then
{
_ai1 addBackpack selectRandom blck_backpacks;
};
_unit enableAI "ALL";
_unit allowDammage true;
_unit setBehaviour "COMBAT";
_unit setunitpos "AUTO";
if (_headGear isEqualTo []) then {_unit addHeadgear (selectRandom _headGear)};
if (_vests isEqualTo []) then {_unit addVest (selectRandom _vests)};
if (_weaponList isEqualTo []) then {_weaponList = call blck_fnc_selectAILoadout};
_weap = selectRandom _weaponList;
_ai1 addWeaponGlobal _weap;
_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");
@ -122,67 +101,74 @@ _muzzles = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >>
_underbarrel = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "UnderBarrelSlot" >> "compatibleItems");
_legalOptics = _optics - blck_blacklistedOptics;
_ai1 addMagazines [selectRandom _ammoChoices, 3];
_unit addMagazines [selectRandom _ammoChoices, 3];
if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _muzzles)};
if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _legalOptics);};
if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _pointers);};
if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _muzzles);};
if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _underbarrel);};
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
{
_ai1 addMagazine "1Rnd_HE_Grenade_shell";
_unit addMagazine "1Rnd_HE_Grenade_shell";
};
_weap = selectRandom blck_Pistols;
//diag_log format["[spawnUnit.sqf] _weap os %1",_weap];
_ai1 addWeaponGlobal _weap;
_ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines");
_ai1 addMagazines [selectRandom _ammoChoices, 2];
for "_i" from 1 to (1+floor(random(3))) do
if !(_sideArms isEqualTo []) then
{
_ai1 addItem (selectRandom blck_ConsumableItems);
_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];
_ai1 addItem selectRandom blck_specialItems;
_unit addItem selectRandom blck_specialItems;
};
if (_Launcher != "none") then
//diag_log format["_spawnUnit: _Launcher = %1",_Launcher];
if ( !(_Launcher isEqualTo "none") && !(_backpacks isEqualTo [])) then
{
private["_bpck"];
_ai1 addWeaponGlobal _Launcher;
_unit addWeaponGlobal _Launcher;
_unit addBackpack (selectRandom _backpacks);
for "_i" from 1 to 3 do
{
_ai1 addItemToBackpack (getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines") select 0); // call BIS_fnc_selectRandom;
_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;
};
_ai1 setVariable["Launcher",_launcher,true];
};
if(sunOrMoon < 0.2 && blck_useNVG)then
{
_ai1 addWeapon selectRandom blck_NVG;
_ai1 setVariable ["hasNVG", true,true];
_unit addWeapon selectRandom blck_NVG;
_unit setVariable ["hasNVG", true,true];
}
else
{
_ai1 setVariable ["hasNVG", false,true];
_unit setVariable ["hasNVG", false,true];
};
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_spawnUnit:: --> unit loadout = %1", getUnitLoadout _ai1];
diag_log format["_fnc_spawnUnit:: --> unit loadout = %1", getUnitLoadout _unit];
};
#endif
_ai1 addEventHandler ["Reloaded", {_this call compile preprocessfilelinenumbers blck_EH_unitWeaponReloaded;}];
_ai1 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; }];
_ai1 addMPEventHandler ["MPHit",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIHit;}];
_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
{
@ -193,14 +179,11 @@ switch (_skillLevel) do
default {_index = 0;_aiSkills = blck_SkillsBlue;};
};
//_alertDist = blck_AIAlertDistance select _index;
//_intelligence = blck_AIIntelligence select _index;
[_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];
[_ai1,_aiSkills] call blck_fnc_setSkill;
_ai1 setVariable ["alertDist",blck_AIAlertDistance select _index,true];
_ai1 setVariable ["intelligence",blck_AIIntelligence select _index,true];
_ai1 setVariable ["GMS_AI",true,true];
_ai1
_unit

View File

@ -0,0 +1,200 @@
/*
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["_grpPilot","_chopperType","_patrolHeli","_launcherType","_unitPilot","_unitCrew","_mags","_turret","_return","_abort","_supplyHeli"];
params["_coords","_skillAI","_weapons","_uniforms","_headGear","_helis",["_chanceParas",0]];
//diag_log format["_fnc_spawnMissionHeli:: _this = %1",_this];
//diag_log format["_fnc_spawnMissionHeli:: _helis = %1 && _chanceParas = %2",_helis,_chanceParas];
/*
Handles upper level functions of reinforcements utilizing helicoptor patrols and/or spawned from a helicopter.
Calls on functions that spawn paratroops and/or loot chests at the heli's location.
Tasks are:
1) spawn a heli over the mission center.
2) add crew and gunners
3) spawn paratroops if needed
4) configure waypointScript
5) return the _heli that was spawned.
*/
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["_fnc_spawnMissionHeli (38):: _helis = %1",_helis];
};
#endif
_abort = false;
_grpPilot = createGroup blck_AI_Side;
if (isNull _grpPilot) then
{
diag_log "BLCK_ERROR: _fnc_spawnMissionHeli::_->> NULL GROUP Returned for _grpPilot";
_abort = true;
};
if !(isNull _grpPilot) then
{
_grpPilot setBehaviour "COMBAT";
_grpPilot setCombatMode "RED";
_grpPilot setSpeedMode "NORMAL";
_grpPilot allowFleeing 0;
_grpPilot setVariable["patrolCenter",_coords];
_grpPilot setVariable["minDis",15];
_grpPilot setVariable["maxDis",30];
_grpPilot setVariable["timeStamp",diag_tickTime];
_grpPilot setVariable["arc",0];
_grpPilot setVariable["wpRadius",30];
_grpPilot setVariable["wpMode","SAD"];
//create helicopter and spawn it
if (( typeName _helis) isEqualTo "ARRAY") then
{
_chopperType = selectRandom _helis
} else {
_chopperType = _helis
};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (78):: _chopperType selected = %1",_chopperType];
};
#endif
_patrolHeli = createVehicle [_chopperType, _coords, [], 90, "FLY"];
_grpPilot setVariable["groupVehicle",_patrolHeli];
[_patrolHeli] call blck_fnc_protectVehicle;
_patrolHeli setFuel 1;
_patrolHeli engineOn true;
_patrolHeli flyInHeight 100;
_patrolHeli setVehicleLock "LOCKED";
//_patrolHeli addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage 1;}];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (93):: heli %1 spawned",_patrolHeli];
};
#endif
[_patrolHeli] call blck_fnc_emptyObject;
_launcherType = "none";
//params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]];
_unitPilot = [[100,100,100],_grpPilot,_skillAI,_uniforms,_headGear_weapons] call blck_fnc_spawnUnit;
_unitPilot setSkill 1;
_unitPilot assignAsDriver _patrolHeli;
_unitPilot moveInDriver _patrolHeli;
_grpPilot selectLeader _unitPilot;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (113):: pilot %1 spawned",_unitPilot];
};
#endif
_turrets = allTurrets [_patrolHeli,false];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log "_fnc_spawnMissionHeli (103): preparing to clear out blacklisted turrets";
};
#endif
{
if ( (_patrolHeli weaponsTurret _x) in blck_blacklisted_heli_weapons) then
{
private["_mags","_turret"];
_mags = _patrolHeli magazinesTurret _x;
_turret = _x;
{
_patrolHeli removeMagazines [_x,_turret];
} forEach _mags;
_patrolHeli removeWeaponTurret _turret;
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (118)::-->> weapon %1 and its ammo removed from heli %2 for turret %3",_patrolHeli weaponsTurret _x,_patrolHeli, _x];
};
}
else
{
//params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]];
_unitCrew = [(getPosATL _patrolHeli),_grpPilot,_skillAI,_uniforms,_headGear] call blck_fnc_spawnUnit;
_unitCrew assignAsTurret [_patrolHeli, _x];
_unitCrew moveInTurret [_patrolHeli, _x];
#ifdef blck_debugMode
diag_log format["_fnc_spawnMissionHeli (12798)::-- >> unit %1 moved into turret %2 of vehicle %3",_unitCrew,_x,_patrolHeli];
#endif
};
}forEach _turrets;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (133)::-->> Heli %1 outfited with a crew numbering %2",_patrolHeli, crew _patrolHeli];
};
#endif
/*
if (random(1) < _chanceParas) then
{
_grpParatroops = createGroup blck_AI_Side;
if (isNull _grpParatroops) then
{
diag_log "BLCK_ERROR: _fnc_spawnMissionHeli::_->> NULL GROUP Returned for _grpParatroops";
_abort = true;
};
// params["_missionPos","_paraGroup",["_numAI",3],"_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull],_grpParatroops];
//params["_coords","_skillAI","_weapons","_uniforms","_headGear",["_grpParatroops",grpNull],["_heli",objNull]];
if !(isNull _grpParatroops) then
{
[_coords,_skillAI,_weapons,_uniforms,_headGear,_grpParatroops,_patrolHeli] call blck_fnc_spawnMissionParatroops;
};
};
//set waypoint for helicopter
[_coords,30,35,_grpPilot,"random","SAD"] spawn blck_fnc_setupWaypoints;
*/
blck_monitoredMissionAIGroups pushBack _grpPilot;
/*
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (153):: initial pilot waypoints set"];
[_patrolHeli] spawn {
params["_patrolHeli"];
diag_log "_fnc_spawnMissionHeli:-> spawning crew monitoring loop";
while {!isNull _patrolHeli} do
{
uiSleep 120;
diag_log format["_fnc_spawnMissionHeli:-> heli %1 has %2 crew alive",_patrolHeli, {alive _x} count crew _patrolHeli];
diag_log format["_fnc_spawnMissionHeli:-> heli %1 fullCrew = %2",_patrolHeli, fullCrew _patrolHeli];
};
};
};
#endif
*/
};
diag_log format["[blckeagls] _fnc_spawnMissionHeli:: _patrolHeli %1 | _grpPilot %2 | _abort %3",_patrolHeli,_grpPilot,_abort];
_return = [_patrolHeli,units _grpPilot,_abort];
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["_fnc_spawnMissionHeli:: function returning value for _return of %1",_return];
};
#endif
diag_log format["_fnc_spawnMissionHeli:: function returning value for _return of %1",_return];
_return;

View File

@ -0,0 +1,151 @@
/*
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["_grpPilot","_chopperType","_patrolHeli","_launcherType","_unitPilot","_unitCrew","_mags","_turret","_return","_abort","_supplyHeli"];
params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]], ["_sideArms",[]] ];
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["_fnc_spawnMissionHeli (38):: _helis = %1",_helis];
};
#endif
_abort = false;
_grpPilot = createGroup blck_AI_Side;
if (isNull _grpPilot) then
{
diag_log "BLCK_ERROR: _fnc_spawnMissionHeli::_->> NULL GROUP Returned for _grpPilot";
_abort = true;
};
if !(isNull _grpPilot) then
{
_grpPilot setBehaviour "COMBAT";
_grpPilot setCombatMode "RED";
_grpPilot setSpeedMode "NORMAL";
_grpPilot allowFleeing 0;
_grpPilot setVariable["patrolCenter",_coords];
_grpPilot setVariable["minDis",15];
_grpPilot setVariable["maxDis",30];
_grpPilot setVariable["timeStamp",diag_tickTime];
_grpPilot setVariable["arc",0];
_grpPilot setVariable["wpRadius",30];
_grpPilot setVariable["wpMode","SAD"];
//create helicopter and spawn it
if (( typeName _helis) isEqualTo "ARRAY") then
{
_chopperType = selectRandom _helis
} else {
_chopperType = _helis
};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (78):: _chopperType selected = %1",_chopperType];
};
#endif
_patrolHeli = createVehicle [_chopperType, _coords, [], 90, "FLY"];
_grpPilot setVariable["groupVehicle",_patrolHeli];
[_patrolHeli] call blck_fnc_protectVehicle;
_patrolHeli setFuel 1;
_patrolHeli engineOn true;
_patrolHeli flyInHeight 100;
_patrolHeli setVehicleLock "LOCKED";
//_patrolHeli addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage 1;}];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (93):: heli %1 spawned",_patrolHeli];
};
#endif
[_patrolHeli] call blck_fnc_emptyObject;
_launcherType = "none";
//params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]];
_unitPilot = [[100,100,100],_grpPilot,_skillAI,_uniforms,_headGear,_vests,_backpacks,_Launcher,_weaponList,_sideArms] call blck_fnc_spawnUnit;
_unitPilot setSkill 1;
_unitPilot assignAsDriver _patrolHeli;
_unitPilot moveInDriver _patrolHeli;
_grpPilot selectLeader _unitPilot;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (113):: pilot %1 spawned",_unitPilot];
};
#endif
_turrets = allTurrets [_patrolHeli,false];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log "_fnc_spawnMissionHeli (103): preparing to clear out blacklisted turrets";
};
#endif
{
if ( (_patrolHeli weaponsTurret _x) in blck_blacklisted_heli_weapons) then
{
private["_mags","_turret"];
_mags = _patrolHeli magazinesTurret _x;
_turret = _x;
{
_patrolHeli removeMagazines [_x,_turret];
} forEach _mags;
_patrolHeli removeWeaponTurret _turret;
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (118)::-->> weapon %1 and its ammo removed from heli %2 for turret %3",_patrolHeli weaponsTurret _x,_patrolHeli, _x];
};
}
else
{
//params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]];
//_unitCrew = [(getPosATL _patrolHeli),_grpPilot,_skillAI,_uniforms,_headGear] call blck_fnc_spawnUnit;
_unitCrew = [(getPosATL _patrolHeli),_grpPilot,_skillAI,_uniforms,_headGear,_vests,_backpacks,_Launcher,_weaponList,_sideArms] call blck_fnc_spawnUnit;
_unitCrew assignAsTurret [_patrolHeli, _x];
_unitCrew moveInTurret [_patrolHeli, _x];
#ifdef blck_debugMode
diag_log format["_fnc_spawnMissionHeli (12798)::-- >> unit %1 moved into turret %2 of vehicle %3",_unitCrew,_x,_patrolHeli];
#endif
};
}forEach _turrets;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (133)::-->> Heli %1 outfited with a crew numbering %2",_patrolHeli, crew _patrolHeli];
};
#endif
blck_monitoredMissionAIGroups pushBack _grpPilot;
};
//diag_log format["[blckeagls] _fnc_spawnMissionHeli:: _patrolHeli %1 | _grpPilot %2 | _abort %3",_patrolHeli,_grpPilot,_abort];
_return = [_patrolHeli,units _grpPilot,_abort];
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["_fnc_spawnMissionHeli:: function returning value for _return of %1",_return];
};
#endif
diag_log format["_fnc_spawnMissionHeli:: function returning value for _return of %1",_return];
_return;

View File

@ -0,0 +1,209 @@
/*
for ghostridergaming
By Ghostrider [GRG]
Copyright 2016
Last Modified 8-15-17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_coords","_skillAI","_weapons","_uniforms","_headGear","_helis",["_chanceParas",0]];
/*
_coords = _this select 0;
_skillAI = _this select 1;
_weapons = _this select 2;
_uniforms = _this select 3;
_headGear = _this select 4;
_helis = _this select 5;
*/
//diag_log format["_fnc_spawnMissionHeli:: _this = %1",_this];
//diag_log format["_fnc_spawnMissionHeli:: _helis = %1 && _chanceParas = %2",_helis,_chanceParas];
/*
Handles upper level functions of reinforcements utilizing helicoptor patrols and/or spawned from a helicopter.
Calls on functions that spawn paratroops and/or loot chests at the heli's location.
Tasks are:
1) spawn a heli over the mission center.
2) add crew and gunners
3) spawn paratroops if needed
4) configure waypointScript
5) return the _heli that was spawned.
*/
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["_fnc_spawnMissionHeli (38):: _helis = %1",_helis];
};
#endif
private["_grpPilot","_chopperType","_patrolHeli","_launcherType","_unitPilot","_unitCrew","_mags","_turret","_return","_abort"];
_abort = false;
_grpParatroops = grpNull;
_grpPilot = createGroup blck_AI_Side;
if (isNull _grpPilot) then
{
diag_log "BLCK_ERROR: _fnc_spawnMissionHeli::_->> NULL GROUP Returned for _grpPilot";
_abort = true;
};
if !(isNull _grpPilot) then
{
_grpPilot setBehaviour "COMBAT";
_grpPilot setCombatMode "RED";
_grpPilot setSpeedMode "NORMAL";
_grpPilot allowFleeing 0;
_grpPilot setVariable["patrolCenter",_coords];
_grpPilot setVariable["minDis",15];
_grpPilot setVariable["maxDis",30];
_grpPilot setVariable["timeStamp",diag_tickTime];
_grpPilot setVariable["arc",0];
_grpPilot setVariable["wpRadius",30];
_grpPilot setVariable["wpMode","SAD"];
private["_supplyHeli"];
//create helicopter and spawn it
if (( typeName _helis) isEqualTo "ARRAY") then {_chopperType = selectRandom _helis}
else
{_chopperType = _helis};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (78):: _chopperType seleted = %1",_chopperType];
};
#endif
_patrolHeli = createVehicle [_chopperType, _coords, [], 90, "FLY"];
_grpPilot setVariable["groupVehicle",_patrolHeli];
[_patrolHeli] call blck_fnc_protectVehicle;
_patrolHeli setFuel 1;
_patrolHeli engineOn true;
_patrolHeli flyInHeight 100;
_patrolHeli setVehicleLock "LOCKED";
_patrolHeli addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage 1;}];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (93):: heli %1 spawned",_patrolHeli];
};
#endif
[_patrolHeli] call blck_fnc_emptyObject;
_launcherType = "none";
_unitPilot = _grpPilot createUnit ["I_helipilot_F", getPos _patrolHeli, [], 0, "FORM"];
_unitPilot = [[100,100,100],_weapons,_grpPilot,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnAI;
_unitPilot setSkill 1;
_unitPilot assignAsDriver _patrolHeli;
_unitPilot moveInDriver _patrolHeli;
_grpPilot selectLeader _unitPilot;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (113):: pilot %1 spawned",_unitPilot];
};
#endif
_turrets = allTurrets [_patrolHeli,false];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log "_fnc_spawnMissionHeli (103): preparing to clear out blacklisted turrets";
};
#endif
{
if ( (_patrolHeli weaponsTurret _x) in blck_blacklisted_heli_weapons) then
{
private["_mags","_turret"];
_mags = _patrolHeli magazinesTurret _x;
_turret = _x;
{
_patrolHeli removeMagazines [_x,_turret];
} forEach _mags;
_patrolHeli removeWeaponTurret _turret;
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (118)::-->> weapon %1 and its ammo removed from heli %2 for turret %3",_patrolHeli weaponsTurret _x,_patrolHeli, _x];
};
}
else
{
// B_helicrew_F
_unitCrew = [(getPosATL _patrolHeli),_weapons,_grpPilot,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnAI;
_unitCrew assignAsTurret [_patrolHeli, _x];
_unitCrew moveInTurret [_patrolHeli, _x];
#ifdef blck_debugMode
diag_log format["_fnc_spawnMissionHeli (12798)::-- >> unit %1 moved into turret %2 of vehicle %3",_unitCrew,_x,_patrolHeli];
#endif
};
}forEach _turrets;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (133)::-->> Heli %1 outfited with a crew numbering %2",_patrolHeli, crew _patrolHeli];
};
#endif
if (random(1) < _chanceParas) then
{
_grpParatroops = createGroup blck_AI_Side;
if (isNull _grpParatroops) then
{
diag_log "BLCK_ERROR: _fnc_spawnMissionHeli::_->> NULL GROUP Returned for _grpParatroops";
_abort = true;
};
// params["_missionPos","_paraGroup",["_numAI",3],"_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull],_grpParatroops];
//params["_coords","_skillAI","_weapons","_uniforms","_headGear",["_grpParatroops",grpNull],["_heli",objNull]];
if !(isNull _grpParatroops) then
{
[_coords,_skillAI,_weapons,_uniforms,_headGear,_grpParatroops,_patrolHeli] call blck_fnc_spawnMissionParatroops;
};
};
//set waypoint for helicopter
[_coords,30,35,_grpPilot,"random","SAD"] spawn blck_fnc_setupWaypoints;
blck_monitoredMissionAIGroups pushBack _grpPilot;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (153):: initial pilot waypoints set"];
[_patrolHeli] spawn {
params["_patrolHeli"];
diag_log "_fnc_spawnMissionHeli:-> spawning crew monitoring loop";
while {!isNull _patrolHeli} do
{
uiSleep 120;
diag_log format["_fnc_spawnMissionHeli:-> heli %1 has %2 crew alive",_patrolHeli, {alive _x} count crew _patrolHeli];
diag_log format["_fnc_spawnMissionHeli:-> heli %1 fullCrew = %2",_patrolHeli, fullCrew _patrolHeli];
};
};
};
#endif
};
private["_ai"];
_ai = (units _grpPilot);
if !(isNull _grpParatroops) then {_ai = _ai + (units _grpParatroops);};
_return = [_patrolHeli,_ai,_abort];
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["_fnc_spawnMissionHeli:: function returning value for _return of %1",_return];
};
#endif
_return;

View File

@ -0,0 +1,209 @@
/*
for ghostridergaming
By Ghostrider [GRG]
Copyright 2016
Last Modified 8-15-17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_coords","_skillAI","_weapons","_uniforms","_headGear","_helis",["_chanceParas",0]];
/*
_coords = _this select 0;
_skillAI = _this select 1;
_weapons = _this select 2;
_uniforms = _this select 3;
_headGear = _this select 4;
_helis = _this select 5;
*/
//diag_log format["_fnc_spawnMissionHeli:: _this = %1",_this];
//diag_log format["_fnc_spawnMissionHeli:: _helis = %1 && _chanceParas = %2",_helis,_chanceParas];
/*
Handles upper level functions of reinforcements utilizing helicoptor patrols and/or spawned from a helicopter.
Calls on functions that spawn paratroops and/or loot chests at the heli's location.
Tasks are:
1) spawn a heli over the mission center.
2) add crew and gunners
3) spawn paratroops if needed
4) configure waypointScript
5) return the _heli that was spawned.
*/
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["_fnc_spawnMissionHeli (38):: _helis = %1",_helis];
};
#endif
private["_grpPilot","_chopperType","_patrolHeli","_launcherType","_unitPilot","_unitCrew","_mags","_turret","_return","_abort"];
_abort = false;
_grpParatroops = grpNull;
_grpPilot = createGroup blck_AI_Side;
if (isNull _grpPilot) then
{
diag_log "BLCK_ERROR: _fnc_spawnMissionHeli::_->> NULL GROUP Returned for _grpPilot";
_abort = true;
};
if !(isNull _grpPilot) then
{
_grpPilot setBehaviour "COMBAT";
_grpPilot setCombatMode "RED";
_grpPilot setSpeedMode "NORMAL";
_grpPilot allowFleeing 0;
_grpPilot setVariable["patrolCenter",_coords];
_grpPilot setVariable["minDis",15];
_grpPilot setVariable["maxDis",30];
_grpPilot setVariable["timeStamp",diag_tickTime];
_grpPilot setVariable["arc",0];
_grpPilot setVariable["wpRadius",30];
_grpPilot setVariable["wpMode","SAD"];
private["_supplyHeli"];
//create helicopter and spawn it
if (( typeName _helis) isEqualTo "ARRAY") then {_chopperType = selectRandom _helis}
else
{_chopperType = _helis};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (78):: _chopperType seleted = %1",_chopperType];
};
#endif
_patrolHeli = createVehicle [_chopperType, _coords, [], 90, "FLY"];
_grpPilot setVariable["groupVehicle",_patrolHeli];
[_patrolHeli] call blck_fnc_protectVehicle;
_patrolHeli setFuel 1;
_patrolHeli engineOn true;
_patrolHeli flyInHeight 100;
_patrolHeli setVehicleLock "LOCKED";
_patrolHeli addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage 1;}];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (93):: heli %1 spawned",_patrolHeli];
};
#endif
[_patrolHeli] call blck_fnc_emptyObject;
_launcherType = "none";
_unitPilot = _grpPilot createUnit ["I_helipilot_F", getPos _patrolHeli, [], 0, "FORM"];
_unitPilot = [[100,100,100],_weapons,_grpPilot,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnUnit;
_unitPilot setSkill 1;
_unitPilot assignAsDriver _patrolHeli;
_unitPilot moveInDriver _patrolHeli;
_grpPilot selectLeader _unitPilot;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (113):: pilot %1 spawned",_unitPilot];
};
#endif
_turrets = allTurrets [_patrolHeli,false];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log "_fnc_spawnMissionHeli (103): preparing to clear out blacklisted turrets";
};
#endif
{
if ( (_patrolHeli weaponsTurret _x) in blck_blacklisted_heli_weapons) then
{
private["_mags","_turret"];
_mags = _patrolHeli magazinesTurret _x;
_turret = _x;
{
_patrolHeli removeMagazines [_x,_turret];
} forEach _mags;
_patrolHeli removeWeaponTurret _turret;
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (118)::-->> weapon %1 and its ammo removed from heli %2 for turret %3",_patrolHeli weaponsTurret _x,_patrolHeli, _x];
};
}
else
{
// B_helicrew_F
_unitCrew = [(getPosATL _patrolHeli),_weapons,_grpPilot,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnUnit;
_unitCrew assignAsTurret [_patrolHeli, _x];
_unitCrew moveInTurret [_patrolHeli, _x];
#ifdef blck_debugMode
diag_log format["_fnc_spawnMissionHeli (12798)::-- >> unit %1 moved into turret %2 of vehicle %3",_unitCrew,_x,_patrolHeli];
#endif
};
}forEach _turrets;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (133)::-->> Heli %1 outfited with a crew numbering %2",_patrolHeli, crew _patrolHeli];
};
#endif
if (random(1) < _chanceParas) then
{
_grpParatroops = createGroup blck_AI_Side;
if (isNull _grpParatroops) then
{
diag_log "BLCK_ERROR: _fnc_spawnMissionHeli::_->> NULL GROUP Returned for _grpParatroops";
_abort = true;
};
// params["_missionPos","_paraGroup",["_numAI",3],"_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull],_grpParatroops];
//params["_coords","_skillAI","_weapons","_uniforms","_headGear",["_grpParatroops",grpNull],["_heli",objNull]];
if !(isNull _grpParatroops) then
{
[_coords,_skillAI,_weapons,_uniforms,_headGear,_grpParatroops,_patrolHeli] call blck_fnc_spawnMissionParatroops;
};
};
//set waypoint for helicopter
[_coords,30,35,_grpPilot,"random","SAD"] spawn blck_fnc_setupWaypoints;
blck_monitoredMissionAIGroups pushBack _grpPilot;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (153):: initial pilot waypoints set"];
[_patrolHeli] spawn {
params["_patrolHeli"];
diag_log "_fnc_spawnMissionHeli:-> spawning crew monitoring loop";
while {!isNull _patrolHeli} do
{
uiSleep 120;
diag_log format["_fnc_spawnMissionHeli:-> heli %1 has %2 crew alive",_patrolHeli, {alive _x} count crew _patrolHeli];
diag_log format["_fnc_spawnMissionHeli:-> heli %1 fullCrew = %2",_patrolHeli, fullCrew _patrolHeli];
};
};
};
#endif
};
private["_ai"];
_ai = (units _grpPilot);
if !(isNull _grpParatroops) then {_ai = _ai + (units _grpParatroops);};
_return = [_patrolHeli,_ai,_abort];
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["_fnc_spawnMissionHeli:: function returning value for _return of %1",_return];
};
#endif
_return;

View File

@ -1,8 +1,7 @@
/*
for ghostridergaming
By Ghostrider [GRG]
Copyright 2016
Last Modified 8-15-17
--------------------------
License
@ -12,29 +11,9 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
private["_grpPilot","_chopperType","_patrolHeli","_launcherType","_unitPilot","_unitCrew","_mags","_turret","_return","_abort","_supplyHeli"];
params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]], ["_sideArms",[]] ];
params["_coords","_skillAI","_weapons","_uniforms","_headGear","_helis",["_chanceParas",0]];
/*
_coords = _this select 0;
_skillAI = _this select 1;
_weapons = _this select 2;
_uniforms = _this select 3;
_headGear = _this select 4;
_helis = _this select 5;
*/
//diag_log format["_fnc_spawnMissionHeli:: _this = %1",_this];
//diag_log format["_fnc_spawnMissionHeli:: _helis = %1 && _chanceParas = %2",_helis,_chanceParas];
/*
Handles upper level functions of reinforcements utilizing helicoptor patrols and/or spawned from a helicopter.
Calls on functions that spawn paratroops and/or loot chests at the heli's location.
Tasks are:
1) spawn a heli over the mission center.
2) add crew and gunners
3) spawn paratroops if needed
4) configure waypointScript
5) return the _heli that was spawned.
*/
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
@ -42,9 +21,7 @@ if (blck_debugLevel > 0) then
};
#endif
private["_grpPilot","_chopperType","_patrolHeli","_launcherType","_unitPilot","_unitCrew","_mags","_turret","_return","_abort"];
_abort = false;
_grpParatroops = grpNull;
_grpPilot = createGroup blck_AI_Side;
if (isNull _grpPilot) then
{
@ -66,16 +43,18 @@ if !(isNull _grpPilot) then
_grpPilot setVariable["wpRadius",30];
_grpPilot setVariable["wpMode","SAD"];
private["_supplyHeli"];
//create helicopter and spawn it
if (( typeName _helis) isEqualTo "ARRAY") then {_chopperType = selectRandom _helis}
else
{_chopperType = _helis};
if (( typeName _helis) isEqualTo "ARRAY") then
{
_chopperType = selectRandom _helis
} else {
_chopperType = _helis
};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (78):: _chopperType seleted = %1",_chopperType];
diag_log format["_fnc_spawnMissionHeli (78):: _chopperType selected = %1",_chopperType];
};
#endif
@ -86,7 +65,7 @@ if !(isNull _grpPilot) then
_patrolHeli engineOn true;
_patrolHeli flyInHeight 100;
_patrolHeli setVehicleLock "LOCKED";
_patrolHeli addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage 1;}];
//_patrolHeli addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage 1;}];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
@ -98,8 +77,8 @@ if !(isNull _grpPilot) then
[_patrolHeli] call blck_fnc_emptyObject;
_launcherType = "none";
_unitPilot = _grpPilot createUnit ["I_helipilot_F", getPos _patrolHeli, [], 0, "FORM"];
_unitPilot = [[100,100,100],_weapons,_grpPilot,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnAI;
//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;
_unitPilot moveInDriver _patrolHeli;
@ -138,8 +117,9 @@ if !(isNull _grpPilot) then
}
else
{
// B_helicrew_F
_unitCrew = [(getPosATL _patrolHeli),_weapons,_grpPilot,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnAI;
//params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]];
//_unitCrew = [(getPosATL _patrolHeli),_grpPilot,_skillAI,_uniforms,_headGear] call blck_fnc_spawnUnit;
_unitCrew = [(getPosATL _patrolHeli),_grpPilot,_skillAI,_uniforms,_headGear,_vests,_backpacks,_Launcher,_weaponList,_sideArms] call blck_fnc_spawnUnit;
_unitCrew assignAsTurret [_patrolHeli, _x];
_unitCrew moveInTurret [_patrolHeli, _x];
@ -156,48 +136,10 @@ if !(isNull _grpPilot) then
};
#endif
if (random(1) < _chanceParas) then
{
_grpParatroops = createGroup blck_AI_Side;
if (isNull _grpParatroops) then
{
diag_log "BLCK_ERROR: _fnc_spawnMissionHeli::_->> NULL GROUP Returned for _grpParatroops";
_abort = true;
};
// params["_missionPos","_paraGroup",["_numAI",3],"_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull],_grpParatroops];
//params["_coords","_skillAI","_weapons","_uniforms","_headGear",["_grpParatroops",grpNull],["_heli",objNull]];
if !(isNull _grpParatroops) then
{
[_coords,_skillAI,_weapons,_uniforms,_headGear,_grpParatroops,_patrolHeli] call blck_fnc_spawnMissionParatroops;
};
};
//set waypoint for helicopter
[_coords,30,35,_grpPilot,"random","SAD"] spawn blck_fnc_setupWaypoints;
blck_monitoredMissionAIGroups pushBack _grpPilot;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionHeli (153):: initial pilot waypoints set"];
[_patrolHeli] spawn {
params["_patrolHeli"];
diag_log "_fnc_spawnMissionHeli:-> spawning crew monitoring loop";
while {!isNull _patrolHeli} do
{
uiSleep 120;
diag_log format["_fnc_spawnMissionHeli:-> heli %1 has %2 crew alive",_patrolHeli, {alive _x} count crew _patrolHeli];
diag_log format["_fnc_spawnMissionHeli:-> heli %1 fullCrew = %2",_patrolHeli, fullCrew _patrolHeli];
};
};
};
#endif
};
private["_ai"];
_ai = (units _grpPilot);
if !(isNull _grpParatroops) then {_ai = _ai + (units _grpParatroops);};
_return = [_patrolHeli,_ai,_abort];
//diag_log format["[blckeagls] _fnc_spawnMissionHeli:: _patrolHeli %1 | _grpPilot %2 | _abort %3",_patrolHeli,_grpPilot,_abort];
_return = [_patrolHeli,units _grpPilot,_abort];
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
@ -205,5 +147,5 @@ if (blck_debugLevel > 0) then
diag_log format["_fnc_spawnMissionHeli:: function returning value for _return of %1",_return];
};
#endif
//diag_log format["_fnc_spawnMissionHeli:: function returning value for _return of %1",_return];
_return;

View File

@ -0,0 +1,88 @@
/*
By Ghostrider [GRG]
Copyright 2016
Last Modified 8-16-17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
// [_coords,_aiDifficultyLevel,_chancePara,_noPara,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms]
params["_coords","_missionHelis","_spawnHeli",["_aiSkillsLevel","Red"],["_chancePara",0],["_noPara",0],["_uniforms",blck_SkinList],["_headGear",blck_headgearList],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weapons",[]],["_sideArms",blck_Pistols]];
#ifdef blck_debugMode
if (blck_debugLevel >=2) then
{
private _params = ["_coords","_missionHelis","_spawnHeli","_aiSkillsLevel","_chancePara","_noPara","_uniforms","_headGear","_vests","_backpacks","_weapons","_sideArms"];
{
diag_log format["_fnc_spawnMissionReinforcements:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex];
}forEach _this;
};
#endif
private["_return","_temp","_missionHelis"];
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log format["_fnc_spawnMissionReinforcements (25): Script Starting with _aiSkillsLevel = %1",_aiSkillsLevel]};
#endif
_aiSkillsLevel = toLower _aiSkillsLevel;
if ( _spawnHeli ) then // if helipatrols are 'enabled' then paratroops will only drop if a heli spawns.
// The chance that they drop is linked to the value for them for that difficulty _aiSkillsLevel
//see _fnc_spannMissionParatroops for how this is handled.
{
_temp = [objNull,[],false];
//params["_coords","_aiSkillsLevel",,"_weapons","_uniforms","_headgear""_helis"];
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log "_fnc_spawnMissionReinforcements (64): calling _fnc_spawnMissionHeli to spawn heli and paratroops";
};
#endif
// params["_coords","_skillAI","_weapons","_uniforms","_headGear","_helis",["_chanceParas",0]];
_temp = [_coords,_missionHelis,_aiDifficultyLevel,_chancePara,_noPara,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionHeli;
if (typeName _temp isEqualTo "ARRAY") then
{
_return = [_temp select 0, _temp select 1, _temp select 2];
}
else
{
_return = [objNull, [], true];
};
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["_fnc_spawnMissionReinforcements (66): blck_fnc_spawnMissionHeli returned value of %1 for _return",_return];};
#endif
} else {
if (blck_debugLevel > 2) then {diag_log "_fnc_spawnMissionReinforcements (68): calling _fnc_spawnMissionParatroops to spawn para reinforcements";};
_temp = [objNull,[],false];
_temp = [_coords,_aiSkillsLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionParatroops;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {
diag_log format["_fnc_spawnMissionReinforcements (71):: blck_fnc_spawnMissionParatroops returned value for _paratroops of %1",_temp];
};
#endif
if (typeName _temp isEqualTo "ARRAY") then
{
_return = [objNull, _temp select 0 /*units*/, _temp select 1 /*true/false*/];
} else {
_return = [objNull, [],true];
};
};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["_fnc_spawnMissionReinforcements (74):: _return = %1",_return];};
#endif
_return

View File

@ -16,7 +16,15 @@
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
@ -25,12 +33,7 @@ params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_
//_maxDis = maximum distance from the center of the mission for vehicle waypoints
//_groupForVehiclePatrol = The group with which to man the vehicle
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnVehiclePatrol:: _center = %1 | _pos = %2 | _vehType = %3 | _group = %4",_center,_pos,_vehType,_group];
};
#endif
if !(isNull _group) then
{ // exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnVehiclePatrol"; objNull;};

View File

@ -88,7 +88,7 @@ blck_fnc_changeToSentryWaypoint = compileFinal preprocessFileLineNumbers "\q\ad
//blck_fnc_setNextWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_setNextWaypoint.sqf";
blck_fnc_cleanEmptyGroups = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_cleanEmptyGroups.sqf"; // GMS_fnc_cleanEmptyGroups
blck_fnc_findNearestInfantryGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_findNearestInfantryGroup.sqf";
blck_fnc_create_AI_Group = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_create_AI_Group.sqf"; // create a group for which other functions spawn AI.
// Functions specific to vehicles, whether wheeled, aircraft or static
blck_fnc_spawnVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehicle.sqf";
@ -96,10 +96,10 @@ blck_fnc_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons
blck_fnc_protectVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_protectVehicle.sqf";
blck_fnc_configureMissionVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_configureMissionVehicle.sqf";
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_spawnReinforcements.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_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";
@ -109,7 +109,7 @@ blck_fnc_selectPatrolVehicle = compileFinal preprocessFileLineNumbers "\q\addons
// functions to support Units
blck_fnc_removeGear = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_removeGear.sqf"; // Strip an AI unit of all gear.
blck_fnc_spawnAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnUnit.sqf"; // spawn individual AI
blck_fnc_spawnUnit = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnUnit.sqf"; // spawn individual AI
blck_EH_AIKilled = "\q\addons\custom_server\Compiles\Units\GMS_EH_AIKilled.sqf"; // Event handler to process AI deaths
blck_EH_AIHit = "\q\addons\custom_server\Compiles\Units\GMS_EH_AIHit.sqf";
blck_EH_AIFiredNear = "\q\addons\custom_server\Compiles\Units\GMS_EH_AIFiredNear.sqf";
@ -130,6 +130,7 @@ blck_fnc_processAIHit = compileFinal preprocessFileLineNumbers "\q\addons\custo
blck_fnc_spawnHostage = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnHostage.sqf";
blck_fnc_spawnLeader = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnLeader.sqf";
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";
// HC support functions

View File

@ -12,7 +12,7 @@
*/
#include"\q\addons\custom_server\Configs\blck_defines.hpp";
blck_debugON = FALSE;
blck_debugON = false;
blck_debugLevel = 0; // Sets level of detail for debugging info - WIP.
blck_minFPS = 8;

View File

@ -86,6 +86,7 @@
// It's position can be either "center" or "random". smoking wreck will be spawned at a random location between 15 and 50 m from the mission.
blck_SmokeAtMissions = [false,"random"]; // set to [false,"anything here"] to disable this function altogether.
blck_useSignalEnd = true; // When true a smoke grenade/chemlight will appear at the loot crate for 2 min after mission completion.
blck_missionEndCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
blck_spawnCratesTiming = "atMissionSpawnGround"; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir".
// Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute.
// This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission.
@ -294,7 +295,9 @@
blck_launcherTypes = ["launch_RPG32_F"];
blck_launchersPerGroup = 1; // Defines the number of AI per group spawned with a launcher
blck_launcherCleanup = true;// When true, launchers and launcher ammo are removed from dead AI.
blck_minimumPatrolRadius = 22; // AI will patrol within a circle with radius of approximately min-max meters. note that because of the way waypoints are completed they may more more or less than this distance.
blck_maximumPatrolRadius = 35;
//This defines how long after an AI dies that it's body disappears.
blck_bodyCleanUpTimer = 60*40; // time in seconds after which dead AI bodies are deleted
// Each time an AI is killed, the location of the killer will be revealed to all AI within this range of the killed AI, set to -1 to disable

View File

@ -115,34 +115,34 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
_blck_Tanks_CUP = [
"CUP_B_M2A3Bradley_USA_D",
"CUP_B_M113_desert_USA",
"CUP_B_M163_USA",
//"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_AAV_USMC",
//"CUP_B_M270_DPICM_USA",
"CUP_B_ZSU23_CDF",
"CUP_B_BMP2_CDF",
//"CUP_B_BMP2_CDF",
"CUP_B_T72_CDF",
"CUP_I_T34_NAPA",
//"CUP_I_T34_NAPA",
"CUP_B_Challenger2_NATO",
"CUP_B_FV432_Bulldog_GB_D_RWS",
"CUP_B_FV432_Bulldog_GB_D",
//"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_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"
"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""
];
blck_AIPatrolVehicles =
@ -198,10 +198,10 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
"B_MRAP_01_hmg_F",
//"O_MRAP_02_gmg_F",
"O_MRAP_02_hmg_F",
"I_MRAP_03_hmg_F",
"I_MRAP_03_hmg_F"
//"I_MRAP_03_gmg_F",
"B_APC_Wheeled_01_cannon_F",
"I_APC_Wheeled_03_cannon_F"
//"B_APC_Wheeled_01_cannon_F",
//"I_APC_Wheeled_03_cannon_F"
];
diag_log "blck)configs_exile_mil.sqf:: - > Using special settings for namalsk";
blck_AIPatrolVehiclesRed = _blck_lightlyArmed_ARMA3 + blck_AIPatrolVehiclesBlue;
@ -312,6 +312,8 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
blck_WeaponList_Green = blck_WeaponList_Green + blck_apexWeapons;
#endif
blck_baseBackpacks = ["B_Carryall_ocamo","B_Carryall_oucamo","B_Carryall_mcamo","B_Carryall_oli","B_Carryall_khk","B_Carryall_cbr" ];
#ifdef useAPEX
@ -647,6 +649,14 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
"Exile_Item_Moobar",
"Exile_Item_InstantCoffee"
];
#ifdef useCUP
#endif
#ifdef useRHS
#endif
blck_ConsumableItems = blck_Meats + blck_Drink + blck_Food;
blck_throwableExplosives = ["HandGrenade","MiniGrenade"];
blck_otherExplosives = ["1Rnd_HE_Grenade_shell","3Rnd_HE_Grenade_shell","DemoCharge_Remote_Mag","SatchelCharge_Remote_Mag"];

View File

@ -81,7 +81,8 @@
// It's position can be either "center" or "random". smoking wreck will be spawned at a random location between 15 and 50 m from the mission.
blck_SmokeAtMissions = [false,"random"]; // set to [false,"anything here"] to disable this function altogether.
blck_useSignalEnd = true; // When true a smoke grenade/chemlight will appear at the loot crate for 2 min after mission completion.
blck_spawnCratesTiming = "atMissionSpawnGround"; // Choices: "atMissionSpawnGround","atMissionStartAir","atMissionEndGround","atMissionEndAir".
blck_missionEndCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
blck_spawnCratesTiming = "atMissionEndAir"; // Choices: "atMissionSpawnGround","atMissionStartAir","atMissionEndGround","atMissionEndAir".
// Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute.
// This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission.
blck_loadCratesTiming = "atMissionSpawn"; // valid choices are "atMissionCompletion" and "atMissionSpawn";
@ -186,6 +187,14 @@
blck_patrolHelisOrange = _blck_armed_attackHelis + _blck_armed_heavyAttackHelis; // + _blck_fighters;
blck_noPatrolHelisOrange = [2,4];
if (toLower(worldName) isEqualTo "namalsk") then
{
blck_patrolHelisRed = _blck_littleBirds + _blck_armed_hellcats;
blck_patrolHelisGreen = _blck_armed_hellcats + _blck_armed_ghosthawks;
blck_noPatrolHelisGreen = 1;
blck_patrolHelisOrange = _blck_armed_ghosthawks;
blck_noPatrolHelisOrange = 1;
};
////////////////////
// Enable / Disable Missions
////////////////////
@ -291,7 +300,9 @@
//blck_launcherTypes = ["launch_RPG32_F"];
blck_launchersPerGroup = 5; // Defines the number of AI per group spawned with a launcher
blck_launcherCleanup = false;// When true, launchers and launcher ammo are removed from dead AI.
blck_minimumPatrolRadius = 22; // AI will patrol within a circle with radius of approximately min-max meters. note that because of the way waypoints are completed they may more more or less than this distance.
blck_maximumPatrolRadius = 35;
//This defines how long after an AI dies that it's body disappears.
blck_bodyCleanUpTimer = 40*60; // time in seconds after which dead AI bodies are deleted
#ifdef GRGserver

View File

@ -118,13 +118,13 @@ switch (toLower (worldName)) do
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_enableOrangeMissions = -1;
blck_enableGreenMissions = -1;
blck_enableRedMissions = 2;
blck_enableBlueMissions = 1;
blck_numberUnderwaterDynamicMissions = 3;
blck_enableHunterMissions = 1;
blck_enableScoutsMissions = 1;
blck_enableRedMissions = -2;
blck_enableBlueMissions = -1;
blck_numberUnderwaterDynamicMissions = -3;
blck_enableHunterMissions = -1;
blck_enableScoutsMissions = -1;
blck_maxCrashSites = 3;
};
};
@ -142,33 +142,37 @@ if (blck_debugON || (blck_debugLevel > 0)) then // These variables are found in
//blck_useHC = true;
blck_maxSpawnedMissions = 15;
blck_mainThreadUpdateInterval = 10;
blck_enableOrangeMissions = 1;
blck_enableGreenMissions = 1;
blck_enableRedMissions = 1;
blck_enableBlueMissions = 1;
blck_numberUnderwaterDynamicMissions = -3;
blck_enableHunterMissions = 1;
blck_enableScoutsMissions = 1;
blck_maxCrashSites = 1;
blck_enableOrangeMissions = -1;
blck_enableGreenMissions = -1;
blck_enableRedMissions = -1;
blck_enableBlueMissions = -1;
blck_numberUnderwaterDynamicMissions = 3;
blck_enableHunterMissions = -1;
blck_enableScoutsMissions = -1;
blck_maxCrashSites = -3;
blck_cleanupCompositionTimer = 120; // Time after mission completion at which items in the composition are deleted.
//blck_AliveAICleanUpTimer = 10; // Time after mission completion at which any remaining live AI are deleted.
blck_bodyCleanUpTimer = 120;
blck_vehicleDeleteTimer = 120;
blck_noPatrolHelisOrange = 0;
blck_noPatrolHelisBlue = 0;
blck_noPatrolHelisOrange = 0;
blck_chanceHeliPatrolBlue = 1;
blck_noPatrolHelisBlue = 1;
blck_chanceParaBlue = 1; // [0 - 1] set to 0 to deactivate and 1 to always have paratroops spawn over the center of the mission. This value can be a range as well [0.1,0.3]
blck_noParaBlue = 3; // [1-N]
blck_paraTriggerDistanceBlue = 400;
//blck_chanceHeliPatrolBlue = 1;
blck_SpawnEmplaced_Orange = 2; // Number of static weapons at Orange Missions
blck_SpawnEmplaced_Green = 2; // Number of static weapons at Green Missions
blck_SpawnEmplaced_Blue = 2; // Number of static weapons at Blue Missions
blck_SpawnEmplaced_Red = 2;
blck_SpawnEmplaced_Orange = -1; // Number of static weapons at Orange Missions
blck_SpawnEmplaced_Green = -2; // Number of static weapons at Green Missions
blck_SpawnEmplaced_Blue = 1; // Number of static weapons at Blue Missions
blck_SpawnEmplaced_Red = -2;
blck_SpawnVeh_Orange = 2; // Number of vehicles at Orange Missions
blck_SpawnVeh_Green = 2; // Number of vehicles at Green Missions
blck_SpawnVeh_Blue = 2; // Number of vehicles at Blue Missions
blck_SpawnVeh_Red = 2;
blck_SpawnVeh_Orange = -1; // Number of vehicles at Orange Missions
blck_SpawnVeh_Green = -2; // Number of vehicles at Green Missions
blck_SpawnVeh_Blue = 1; // Number of vehicles at Blue Missions
blck_SpawnVeh_Red = -2;
blck_TMin_Blue = 7;
blck_TMin_Red = 10;
@ -190,7 +194,7 @@ if (blck_debugON || (blck_debugLevel > 0)) then // These variables are found in
//blck_MissionTimout = 360; // 40 min
blck_MinAI_Orange = 1;
blck_MaxAI_Orange = 2;
blck_MaxAI_Orange = 1;
blck_AIGrps_Orange = 1;
blck_MinAI_Blue = 1;
@ -213,5 +217,566 @@ if (blck_debugON || (blck_debugLevel > 0)) then // These variables are found in
*/
};
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_Uniforms = [
];
blck_RHS_Vests = [
];
blck_RHS_Backpacks = [
];

View File

@ -12,10 +12,14 @@
*/
#define GRGserver
#define wpModeMove
#define useAPEX
//#define useDynamicSimulation
//#define blck_debugMode
#define blck_milServer
#define hideOnUse false
#define showWindow true
#ifdef blck_milServer
#define blck_useCUP
#define blck_useRHS
#endif

View File

@ -8,10 +8,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_hostageConfig"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Blue Mission with template = default2";
@ -26,15 +24,55 @@ _markerColor = "ColorBlue";
_markerMissionName = "Capture Don";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
//["Land_i_House_Small_01_V2_F",[-2.27148,15.7852,0],0,[true,false]],
["Flag_AAF_F",[0.851563,-32.0098,0],0,[true,false]]
["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]],
["Land_BagBunker_Small_F",[37.4551,-29.8672,0],128.253,[true,false]],
["Land_BagBunker_Large_F",[-30.4082,-6.65039,0],180,[true,false]],
["Land_BagBunker_Large_F",[-2.81836,19.4668,0],0,[true,false]],
["Land_BagBunker_Large_F",[-2.14063,-18.4355,0],0,[true,false]],
["Land_BagBunker_Large_F",[26.1328,-10.252,0],0,[true,false]],
["Land_HBarrier_Big_F",[-19.707,30.0078,0],0,[true,false]],
["Land_HBarrier_Big_F",[-11.0742,30.209,0],0,[true,false]],
["Land_HBarrier_Big_F",[18.541,31.125,0],0,[true,false]],
["Land_HBarrier_Big_F",[0.0703125,30.6699,0],0,[true,false]],
["Land_HBarrier_Big_F",[8.79102,31.0273,0],0,[true,false]],
["Land_HBarrier_Big_F",[-19.0938,-36.0176,0],0,[true,false]],
["Land_HBarrier_Big_F",[-10.4609,-35.8164,0],0,[true,false]],
["Land_HBarrier_Big_F",[19.1543,-34.9004,0],0,[true,false]],
["Land_HBarrier_Big_F",[0.683594,-35.3555,0],0,[true,false]],
["Land_HBarrier_Big_F",[9.4043,-34.998,0],0,[true,false]],
["Land_HBarrier_Big_F",[-47.6211,19.666,0],91.713,[true,false]],
["Land_HBarrier_Big_F",[-47.6777,11.0313,0],91.713,[true,false]],
["Land_HBarrier_Big_F",[-47.6465,-18.5977,0],91.713,[true,false]],
["Land_HBarrier_Big_F",[-47.5508,-0.123047,0],91.713,[true,false]],
["Land_HBarrier_Big_F",[-47.4531,-8.84961,0],91.713,[true,false]],
["Land_HBarrier_Big_F",[47.5098,-22.1211,0],270.496,[true,false]],
["Land_HBarrier_Big_F",[47.3848,-13.4863,0],270.496,[true,false]],
["Land_HBarrier_Big_F",[46.7246,16.1348,0],270.496,[true,false]],
["Land_HBarrier_Big_F",[47.0195,-2.33789,0],270.496,[true,false]],
["Land_HBarrier_Big_F",[46.7363,6.38477,0],270.496,[true,false]],
["Land_ChairPlastic_F",[-6.06445,10.7129,0],185.284,[true,false]],
["Land_CampingChair_V2_F",[0.222656,8.24219,0],0,[true,false]],
["Campfire_burning_F",[0.591797,9.47266,0],0,[true,false]],
["Land_HBarrier_3_F",[-10.3887,10.209,0],88.6077,[true,false]],
["Land_HBarrier_3_F",[8.12109,10.4063,0],88.6077,[true,false]],
["Land_HBarrier_3_F",[8.17383,13.5781,0],88.6077,[true,false]],
["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
_enemyLeaderConfig = ["I_G_resistanceLeader_F",[1.27344,15.3379,-0.299711],126.345,[true,false],
_enemyLeaderConfig =
["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
];
_enemyLeaderConfig set[
1, selectRandom [[-7.83789,13.1465,-0.00143886]]
];
// This allows us to place the antagonist to be arrested in one of several random locations.
_missionLootBoxes = [
//["Box_NATO_Wps_F",[3,-3,0],_crateLoot,[4,10,2,5,5,1]], // Standard loot crate with standard loadout
//["Land_PaperBox_C_EPOCH",[-4,-3,0],_crateLoot,[0,0,0,10,10,3]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks
@ -48,13 +86,19 @@ _missionLootVehicles = [
]; // Parameters are "vehiclel type", offset relative to mission center, loot array, items to load from each category of the loot array.
// ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/];
/*
["B_G_Soldier_AR_F",[-19.5156,25.2598,-0.00143886],0,[true,false]],
["B_G_Soldier_AR_F",[-27.7676,-24.5508,-0.00143886],0,[true,false]],
["B_G_Soldier_AR_F",[32.4883,-23.4609,-0.00143886],0,[true,false]],
["B_G_Soldier_AR_F",[36.6914,12.1836,-0.00143886],0,[true,false]]
*/
_missionGroups =
[
//_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"];
//[[-10.9121,-10.9824,-1.20243],5,7,"Green",5,12],
//[[-10.2305,10.0215,-0.941586],5,7,"Green",5,12],
//[[10.5605,-10.4043,-0.00143886],5,7,"Green",5,12],
//[[10.61133,10.5918,-0.001438863],5,7,"blue",5,12]
[[-19.5156,25.2598,-0.00143886],3,3,"Blue",10,20],
[[-27.7676,-24.5508,-0.00143886],3,3,"Blue",10,20],
[[32.4883,-23.4609,-0.00143886],3,3,"Blue",10,20],
[[36.6914,12.1836,-0.00143886],3,3,"Blue",10,20]
]; // Can be used to define spawn positions of AI patrols
_missionEmplacedWeapons = [
@ -63,7 +107,7 @@ _missionEmplacedWeapons = [
//["O_static_AT_F",[-10,10,0]]
]; // can be used to define the type and precise placement of static weapons [["wep",[1,2,3]] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
_missionPatrolVehicles = [
_missionPatrolVehicles = [
//["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]],
//["B_MRAP_01_hmg_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]],
//["B_MRAP_01_gmg_F",[-87.8457,-109.947,7.15256e-007],0,[true,false]]
@ -80,6 +124,7 @@ _headgear = blck_headgear;
_chanceReinforcements = blck_chanceParaBlue;
_noPara = blck_noParaBlue;
_chanceHeliPatrol = blck_chanceHeliPatrolBlue;
_spawnCratesTiming = "atMissionEndAir";
_endCondition = "assetSecured"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear", "assetSecured"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,52 +11,120 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_chanceHeliPatrol","_endCondition","_chanceHeliLootDropped","_chanceLoot","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Blue Mission with template = default";
private["_missionEnabled"];
_crateLoot = blck_BoxLoot_Blue;
_crateLoot = blck_BoxLoot_Blue;
/*
You can use a customized loot array if you like. The format is as follows. note that for each category you can give a number or a range.
_crateLoot = [
[// Weapons
["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"]
],
[//Magazines
["10Rnd_93x64_DMR_05_Mag" ,1,4]
],
[ // Optics
["optic_KHS_tan",1,3]
],
[// Materials and supplies
["Exile_Item_CamoTentKit",1,6]
],
[//Items
["Exile_Item_MountainDupe",1,3]
],
[ // Backpacks
["B_OutdoorPack_tan",1,2]
]
];
*/
_lootCounts = blck_lootCountsBlue;
/*
You can use a customized array here if you like; note that you can give a value or a range.
// values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively.
blck_lootCountsOrange = [
[6,8], // Weapons
[24,32], // Magazines
[5,10], // Optics
[25,35], // materials(cinder etc)
16, // items (food etc)
1 // backpacks
]; // Orange
*/
_startMsg = "A group of Bandits was sighted in a nearby sector! Check the Blue marker on your map for the location!";
_endMsg = "The Sector at the Blue Marker is under survivor control!";
_markerLabel = "";
_markerType = ["ELIPSE",[175,175],"GRID"];
// The mission system supports circular or square mission markers as well as typical Arma icon-style (triangle, dot, flag etc) markers.
// to have an icon define the map marker as follows:
// ["mil_triangle",[0,0]];
// Just replace the icon name with the one you want to spawn.
_markerColor = "ColorBlue";
_markerMissionName = "Bandit Patrol";
_missionLandscapeMode = "random"; // acceptable values are "none","random","precise"
// Note that the format for the _missionLandscape is different for the two modes.
// In random, the objects are randomly arrayed around the mission center.
// In precise, the objects are spawned as closely as possible to the x,y,z offset from mission center specified.
// See default2.sqf for an example of the use of precise base objects.
_missionLandscape = ["Land_WoodPile_F","Land_BagFence_Short_F","Land_WoodPile_F","Land_BagFence_Short_F","Land_WoodPile_F","Land_BagFence_Short_F","Land_FieldToilet_F","Land_TentDome_F","Land_TentDome_F","Land_TentDome_F","Land_TentDome_F","Land_CargoBox_V1_F","Land_CargoBox_V1_F"]; // list of objects to spawn as landscape
_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.
//_missionGroups = []; // Not required.
// When present and empty the mission spawner evaluates the minAI, maxAI, noAIGroups settings
// When present with values these override the defaults.
// See default2.sqf for an example of the use of this variable.
_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
// when the array is empty this parameter is ignored.
// You can have vehicles serve as loot containiners by defining them here.
// see default2.sqf for an example
_missionEmplacedWeapons = []; // can be used to define the precise placement of static weapons [[1,2,3] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
_minNoAI = blck_MinAI_Blue;
_maxNoAI = blck_MaxAI_Blue;
_noAIGroups = blck_AIGrps_Blue;
_noVehiclePatrols = blck_SpawnVeh_Blue;
_noEmplacedWeapons = blck_SpawnEmplaced_Blue;
// When the array is empty emplaced (static) weapons will be spawned randomly based on the setings in the configs that specify the number, AI difficulty and type of static weapons.
// you can specify the location relative to mission center, type of weapon etc.
// this information overides the defaults that that mission difficulty.
// See default2.sqf for an example of how one uses this.
_minNoAI = blck_MinAI_Blue; // Setting this in the mission file overrides the defaults such as blck_MinAI_Blue
_maxNoAI = blck_MaxAI_Blue; // Setting this in the mission file overrides the defaults
_noAIGroups = blck_AIGrps_Blue; // Setting this in the mission file overrides the defaults
_noVehiclePatrols = blck_SpawnVeh_Blue; // Setting this in the mission file overrides the defaults
_noEmplacedWeapons = blck_SpawnEmplaced_Blue; // Setting this in the mission file overrides the defaults
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_chanceReinforcements = blck_chanceParaBlue;
_noPara = blck_noParaBlue;
_chanceHeliPatrol = blck_chanceHeliPatrolBlue;
_chanceLoot = 0.992;
_useMines = blck_useMines; // Setting this in the mission file overrides the defaults
_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults
_headgear = blck_headgear; // Setting this in the mission file overrides the defaults
private["_weap","_mags","_backpacks","_optics","_loadout","_reinforcementLootCounts"];
_weap = 3 + floor(random(4));
_mags = 8 + floor(random(6));
_backpacks = 1 + floor(random(2));
_optics = 1 + floor(random(6));
_loadout = 1 + floor(random(3));
_reinforcementLootCounts = [_weap,_mags,_optics,0,0,_backpacks];
////diag_log format["blueDefault:: _chanceReinforcements = %1 and _chanceLoot = %2", _chanceReinforcements, _chanceLoot];
////diag_log format["blueDefault:: default reinforcement settings are %1",blck_reinforcementsBlue];
//_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults
_noChoppers = blck_noPatrolHelisBlue;
_missionHelis = blck_patrolHelisBlue;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_chancePara = 0.0; // Setting this in the mission file overrides the defaults
_noPara = 3; // Setting this in the mission file overrides the defaults
_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0.
_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot.
//_chanceLoot = 0.999999990;
_paraLoot = blck_BoxLoot_Blue;
_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission.
_spawnCratesTiming = "atMissionEndAir"; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir".
// Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute.
// This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission.
_loadCratesTiming = "atMissionSpawn"; // valid choices are "atMissionCompletion" and "atMissionSpawn";
// Pertains only to crates spawned at mission spawn.
// This sets the default but can be overridden for specific missions by defining _loadCratesTiming
// Examples:
// To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn"
// To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion"
// To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned.
// To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned.
_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
// Setting this in the mission file overrides the defaults
////_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -1,9 +1,6 @@
/*
Mission Template by Ghostrider [GRG]
Mission Compositions by Bill prepared for ghostridergaming
Copyright 2016
Last modified 3/20/17
--------------------------
License
--------------------------
@ -12,14 +9,48 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Blue Mission with template = default2";
_crateLoot = blck_BoxLoot_Blue;
_crateLoot = blck_BoxLoot_Blue;
/*
You can use a customized loot array if you like. The format is as follows. note that for each category you can give a number or a range.
_crateLoot = [
[// Weapons
["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"]
],
[//Magazines
["10Rnd_93x64_DMR_05_Mag" ,1,4]
],
[ // Optics
["optic_KHS_tan",1,3]
],
[// Materials and supplies
["Exile_Item_CamoTentKit",1,6]
],
[//Items
["Exile_Item_MountainDupe",1,3]
],
[ // Backpacks
["B_OutdoorPack_tan",1,2]
]
];
*/
_lootCounts = blck_lootCountsBlue;
/*
You can use a customized array here if you like; note that you can give a value or a range.
// values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively.
blck_lootCountsOrange = [
[6,8], // Weapons
[24,32], // Magazines
[5,10], // Optics
[25,35], // materials(cinder etc)
16, // items (food etc)
1 // backpacks
]; // Orange
*/
_startMsg = "A group of Bandits was sighted in a nearby sector! Check the Blue marker on your map for the location!";
_endMsg = "The Sector at the Blue Marker is under survivor control!";
_markerLabel = "";
@ -46,17 +77,20 @@ _missionLandscape = [
["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,1,0,[],"","",true,false]
]; // list of objects to spawn as landscape; // list of objects to spawn as landscape
_missionLootBoxes = [
["Box_NATO_Wps_F",[3,-3,0],_crateLoot,[4,10,2,5,5,1]], // Standard loot crate with standard loadout
["Land_PaperBox_C_EPOCH",[-4,-3,0],_crateLoot,[0,0,0,10,10,3]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks
["Land_CargoBox_V1_F",[3,4,0],_crateLoot,[0,10,2,5,5,1]]
]; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
// blck_lootCountsBlue= [4,12,3,6,6,1];
_missionLootVehicles = [
//["I_G_Offroad_01_armed_F",[-8,8,0],_crateLoot,[0,10,2,5,5,1]],
//["I_G_Offroad_01_armed_F",[8,17,0],_crateLoot,[0,10,2,5,5,1]]
["I_G_Offroad_01_armed_F",[-8,8,0],_crateLoot,[0,10,2,5,5,1]],
["I_G_Offroad_01_armed_F",[8,17,0],_crateLoot,[0,10,2,5,5,1]]
]; // Parameters are "vehiclel type", offset relative to mission center, loot array, items to load from each category of the loot array.
// ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/];
_missionGroups =
[
//_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"];
@ -67,14 +101,15 @@ _missionGroups =
]; // Can be used to define spawn positions of AI patrols
_missionEmplacedWeapons = [
//["B_HMG_01_high_F",[-10,-15,0]],
//["B_GMG_01_high_F",[10,12,0]],
//["O_static_AT_F",[-10,10,0]]
["B_HMG_01_high_F",[-10,-15,0]],
["B_GMG_01_high_F",[10,12,0]],
["O_static_AT_F",[-10,10,0]]
]; // can be used to define the type and precise placement of static weapons [["wep",[1,2,3]] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
_missionPatrolVehicles = [
["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]],
["B_MRAP_01_hmg_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]],
["B_MRAP_01_gmg_F",[-87.8457,-109.947,7.15256e-007],0,[true,false]],
["B_MRAP_01_gmg_F",[-87.8457,-109.947,7.15256e-007],0,[true,false]]
];
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines;
@ -83,11 +118,37 @@ _maxNoAI = blck_MaxAI_Blue;
_noAIGroups = blck_AIGrps_Blue;
_noVehiclePatrols = blck_SpawnVeh_Blue;
_noEmplacedWeapons = blck_SpawnEmplaced_Blue;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_chanceReinforcements = blck_chanceParaBlue;
_noPara = blck_noParaBlue;
_chanceHeliPatrol = blck_chanceHeliPatrolBlue;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_uniforms = blck_SkinList;
_uniforms = ["U_OrestesBody","U_NikosAgedBody","U_NikosBody"];
_headgear = ["H_StrawHat_dark","H_StrawHat","H_Hat_brown","H_Hat_grey"];
_weaponList = ["blue"] call blck_fnc_selectAILoadout;
/*
_weaponList = [
"arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F",
"LMG_Mk200_F","LMG_Zafir_F"
];
*/
_sideArms = blck_Pistols;
_vests = blck_vests;
/*
_vests = [
"V_PlateCarrierSpec_blk","V_PlateCarrierSpec_mtp","V_PlateCarrierGL_blk","V_PlateCarrierGL_mtp","V_PlateCarrierIAGL_oli"
};
*/
_backpacks = blck_backpacks;
/*
_backpacks =
{
};
*/
//_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults
_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults
//_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults
_noChoppers = blck_noPatrolHelisBlue;
_missionHelis = blck_patrolHelisBlue;
_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -1,86 +0,0 @@
/*
Mission Template 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/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_hostageConfig"];
//diag_log "[blckeagls] Spawning Blue Mission with template = default2";
_crateLoot = blck_BoxLoot_Blue;
_lootCounts = blck_lootCountsBlue;
_startMsg = "A local town mayor is being held hostage! Free him and earn a reward!";
_endMsg = "The Sector at the Blue Marker is under survivor control!";
_assetKilledMsg = "Hostage Killed and Bandits Fled with All Loot: Mission Aborted";
_markerLabel = "";
_markerType = ["ELIPSE",[175,175],"GRID"];
_markerColor = "ColorBlue";
_markerMissionName = "Rescue Hostage";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
//["Land_i_House_Small_01_V2_F",[-2.27148,15.7852,0],0,[true,false]],
["Flag_AAF_F",[0.851563,-32.0098,0],0,[true,false]]
]; // list of objects to spawn as landscape; // list of objects to spawn as landscape
_hostageConfig = ["C_man_polo_6_F",[1.27344,15.3379,-0.299711],126.345,[true,false],
["AmovPercMstpSnonWnonDnon_Scared"],
["H_Cap_red"], // array of headgear choices
["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 = [
//["Box_NATO_Wps_F",[3,-3,0],_crateLoot,[4,10,2,5,5,1]], // Standard loot crate with standard loadout
//["Land_PaperBox_C_EPOCH",[-4,-3,0],_crateLoot,[0,0,0,10,10,3]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks
//["Land_CargoBox_V1_F",[3,4,0],_crateLoot,[0,10,2,5,5,1]]
]; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
// blck_lootCountsBlue= [4,12,3,6,6,1];
_missionLootVehicles = [
//["I_G_Offroad_01_armed_F",[-8,8,0],_crateLoot,[0,10,2,5,5,1]],
//["I_G_Offroad_01_armed_F",[8,17,0],_crateLoot,[0,10,2,5,5,1]]
]; // Parameters are "vehiclel type", offset relative to mission center, loot array, items to load from each category of the loot array.
// ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/];
_missionGroups =
[
//_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"];
//[[-10.9121,-10.9824,-1.20243],5,7,"Green",5,12],
//[[-10.2305,10.0215,-0.941586],5,7,"Green",5,12],
//[[10.5605,-10.4043,-0.00143886],5,7,"Green",5,12],
//[[10.61133,10.5918,-0.001438863],5,7,"blue",5,12]
]; // Can be used to define spawn positions of AI patrols
_missionEmplacedWeapons = [
//["B_HMG_01_high_F",[-10,-15,0]],
//["B_GMG_01_high_F",[10,12,0]],
//["O_static_AT_F",[-10,10,0]]
]; // can be used to define the type and precise placement of static weapons [["wep",[1,2,3]] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
_missionPatrolVehicles = [
//["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]],
//["B_MRAP_01_hmg_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]],
//["B_MRAP_01_gmg_F",[-87.8457,-109.947,7.15256e-007],0,[true,false]]
];
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines;
_minNoAI = blck_MinAI_Blue;
_maxNoAI = blck_MaxAI_Blue;
_noAIGroups = blck_AIGrps_Blue;
_noVehiclePatrols = blck_SpawnVeh_Blue;
_noEmplacedWeapons = blck_SpawnEmplaced_Blue;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_chanceReinforcements = blck_chanceParaBlue;
_noPara = blck_noParaBlue;
_chanceHeliPatrol = blck_chanceHeliPatrolBlue;
_endCondition = "assetSecured"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear", "assetSecured"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -0,0 +1,127 @@
/*
Mission Template 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";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Blue Mission with template = default2";
_crateLoot = blck_BoxLoot_Blue;
_lootCounts = blck_lootCountsBlue;
_startMsg = "A local town mayor is being held hostage! Free him and earn a reward!";
_endMsg = "The Mayor Was Rescued!";
_assetKilledMsg = "The Hostage Was Killed and Bandits Fled with All Loot: Mission Aborted";
_markerLabel = "";
_markerType = ["ELIPSE",[175,175],"GRID"];
_markerColor = "ColorBlue";
_markerMissionName = "Rescue Hostage";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[-10.6914,-10.541,0],0,[true,false]],
["Land_SM_01_shelter_wide_F",[-6.29883,9.57617,0],0,[true,false]],
["Land_ContainerLine_01_F",[-5.54492,40.8184,0],0,[true,false]],
["Land_ContainerLine_01_F",[-6.92578,-38.2188,0],0,[true,false]],
["Land_ContainerLine_01_F",[-65.8438,-28.4023,0],90,[true,false]],
["Land_ContainerLine_01_F",[-66.0664,21.3496,0],90,[true,false]],
["Land_ContainerLine_01_F",[195.047,-23.9395,0],87.9345,[true,false]],
["Land_ContainerLine_01_F",[42.6172,-23.9395,0],90.5197,[true,false]],
["Land_ContainerLine_01_F",[42.8398,27.5977,0],270,[true,false]],
//["B_G_Soldier_AR_F",[-6.74219,-78.625,-0.00143886],0,[true,false]],
//["B_G_Soldier_AR_F",[-86.3281,-5.14453,-0.00143886],0,[true,false]],
//["B_G_Soldier_AR_F",[61.4609,-1.92773,-0.00143838],0,[true,false]],
//["B_G_Soldier_AR_F",[-43.3359,54.0898,-0.00143838],0,[true,false]],
//["B_Soldier_F",[70.5156,-90.3867,-2.75806],0,[true,false]],
//["B_Soldier_F",[70.5156,-90.3867,-2.75806],0,[true,false]],
//["B_MRAP_01_hmg_F",[70.5156,-90.3867,4.76837e-007],0,[true,false]],
//["B_Soldier_F",[-78.834,72.0566,-2.20595],0,[true,false]],
//["B_MRAP_01_F",[-78.834,72.0566,4.76837e-007],0,[true,false]],
["Campfire_burning_F",[-8.68555,-2.57813,0],0,[true,false]],
["Land_ChairPlastic_F",[-2.36719,16.1875,0],0,[true,false]],
["Land_ChairPlastic_F",[-2.99609,13.2813,0],0,[true,false]],
["Land_ChairPlastic_F",[-2.84766,10.3398,0],0,[true,false]],
["Land_ChairPlastic_F",[-3.06055,8.08203,0],0,[true,false]],
["Land_ChairPlastic_F",[-2.70313,5.98047,0],0,[true,false]],
["Land_Stone_4m_F",[-5.71484,21.2051,0],0,[true,false]],
["Land_Stone_4m_F",[-1.30469,21.2266,0],0,[true,false]],
["Land_Stone_4m_F",[-10.1836,21.166,0],0,[true,false]],
["Land_Stone_4m_F",[3.01953,10.2051,0],90.8324,[true,false]],
["Land_Stone_4m_F",[2.97656,5.79492,0],90.8324,[true,false]],
["Land_Stone_4m_F",[3.04492,14.6738,0],90.8324,[true,false]],
["Land_Stone_4m_F",[-6.16992,-0.855469,0],0,[true,false]],
["Land_Stone_4m_F",[-1.75977,-0.833984,0],0,[true,false]],
["Land_Stone_4m_F",[-10.6387,-0.894531,0],0,[true,false]],
["Land_Stone_4m_F",[-15.4609,9.93164,0],90.8324,[true,false]],
["Land_Stone_4m_F",[-15.5039,5.52148,0],90.8324,[true,false]],
["Land_Stone_4m_F",[-15.4355,14.4004,0],90.8324,[true,false]]
]; // list of objects to spawn as landscape; // list of objects to spawn as landscape
_hostageConfig = ["C_man_polo_6_F",
[-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
]; // Sitting Animation
// Use the animation view to see other choices: http://killzonekid.com/arma-3-animation-viewer-jumping-animation/
_missionLootBoxes = [
//["Box_NATO_Wps_F",[3,-3,0],_crateLoot,[4,10,2,5,5,1]], // Standard loot crate with standard loadout
//["Land_PaperBox_C_EPOCH",[-4,-3,0],_crateLoot,[0,0,0,10,10,3]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks
//["Land_CargoBox_V1_F",[3,4,0],_crateLoot,[0,10,2,5,5,1]]
]; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
// blck_lootCountsBlue= [4,12,3,6,6,1];
_missionLootVehicles = [
//["I_G_Offroad_01_armed_F",[-8,8,0],_crateLoot,[0,10,2,5,5,1]],
//["I_G_Offroad_01_armed_F",[8,17,0],_crateLoot,[0,10,2,5,5,1]]
]; // Parameters are "vehiclel type", offset relative to mission center, loot array, items to load from each category of the loot array.
// ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/];
/*
["B_G_Soldier_AR_F",[26.9961,-29.9551,-0.00143886],0,[true,false]],
["B_G_Soldier_AR_F",[32.2461,33.0605,-0.00143886],0,[true,false]],
["B_G_Soldier_AR_F",[-35.6035,32.1855,-0.00143886],0,[true,false]],
["B_G_Soldier_AR_F",[-47.4219,-19.8906,-0.00143886],0,[true,false]]
*/
_missionGroups =
[
//_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"];
[[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],3,3,"Blue",10,20]
]; // Can be used to define spawn positions of AI patrols
_missionEmplacedWeapons = [
//["B_HMG_01_high_F",[-10,-15,0]],
//["B_GMG_01_high_F",[10,12,0]],
//["O_static_AT_F",[-10,10,0]]
]; // can be used to define the type and precise placement of static weapons [["wep",[1,2,3]] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
_missionPatrolVehicles = [
//["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]],
//["B_MRAP_01_hmg_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]],
//["B_MRAP_01_gmg_F",[-87.8457,-109.947,7.15256e-007],0,[true,false]]
];
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines;
_minNoAI = blck_MinAI_Blue;
_maxNoAI = blck_MaxAI_Blue;
_noAIGroups = blck_AIGrps_Blue;
_noVehiclePatrols = blck_SpawnVeh_Blue;
_noEmplacedWeapons = blck_SpawnEmplaced_Blue;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_noPara = blck_noParaBlue;
//_chanceHeliPatrol = blck_chanceHeliPatrolBlue;
_spawnCratesTiming = "atMissionEndAir";
_endCondition = "assetSecured"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear", "assetSecured"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,9 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Blue Mission with template = medicalCamp";
_crateLoot = blck_BoxLoot_Blue;
@ -26,22 +26,23 @@ _markerColor = "ColorBlue";
_markerMissionName = "Medical Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Land_dp_transformer_F",[1.698242,-10.4668,-0.00763702],271.32,1,0,[],"","",true,false],
["Land_Wreck_BRDM2_F",[1.37012,13.498,0.00109863],184.487,0.00819469,0.830999,[],"","",true,false],
["Land_BagBunker_Small_F",[18.4512,-3.66406,0.00780487],305.003,1,0,[],"","",true,false],
["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,1,0,[],"","",true,false],
["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,1,0,[],"","",true,false],
["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,1,0,[],"","",true,false],
["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,1,0,[],"","",true,false],
["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,1,0,[],"","",true,false]
["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,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.
@ -55,11 +56,10 @@ _noVehiclePatrols = blck_SpawnVeh_Blue;
_noEmplacedWeapons = blck_SpawnEmplaced_Blue;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_chanceReinforcements = blck_chanceParaBlue;
_noPara = blck_noParaBlue;
_chanceHeliPatrol = blck_chanceHeliPatrolBlue;
_chanceLoot = 0;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,9 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Blue Mission with template = redCamp";
_crateLoot = blck_BoxLoot_Blue;
@ -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,1,0],
["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,1,0],
["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,1,0],
["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,1,0],
["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,1,0],
["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,1,0],
["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,1,0],
["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,1,0],
["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,1,0],
["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,1,0],
["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,1,0],
["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,1,0],
["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,1,0],
["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,1,0],
["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,1,0],
["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,1,0],
["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,1,0],
["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,1,0],
["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,1,0],
["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,1,0],
["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,1,0],
["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,1,0],
["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,1,0],
["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,1,0],
["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,1,0],
["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,1,0],
["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,1,0],
["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,1,0],
["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,1,0],
["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,1,0],
["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,1,0],
["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,1,0],
["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,1,0],
["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,1,0],
["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,1,0],
["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,1,0],
["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,1,0],
["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,1,0],
["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,1,0],
["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,1,0],
["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,1,0],
["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,1,0]
["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.
@ -81,11 +81,10 @@ _noVehiclePatrols = blck_SpawnVeh_Blue;
_noEmplacedWeapons = blck_SpawnEmplaced_Blue;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_chanceReinforcements = blck_chanceParaBlue;
_noPara = blck_noParaBlue;
_chanceHeliPatrol = blck_chanceHeliPatrolBlue;
_chanceLoot = 0;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Blue Mission with template = resupplyCamp";
_crateLoot = blck_BoxLoot_Blue;
@ -26,14 +25,14 @@ _markerColor = "ColorBlue";
_markerMissionName = "Resupply Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,1,0,[],"","",true,false],
["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,0,0.848867,[],"","",true,false],
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,1,0,[],"","",true,false],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,1,0,[],"","",true,false]
["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,[true,true]],
["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,[true,true]],
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,false]],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,false]],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,false]],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,false]],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,false]],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,false]]
]; // 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.
@ -47,10 +46,10 @@ _noVehiclePatrols = blck_SpawnVeh_Blue;
_noEmplacedWeapons = blck_SpawnEmplaced_Blue;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_chanceReinforcements = blck_chanceParaBlue;
_noPara = blck_noParaBlue;
_chanceHeliPatrol = blck_chanceHeliPatrolBlue;
_chanceLoot = 0;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Green Mission with template = default";
_crateLoot = blck_BoxLoot_Green;
@ -82,7 +81,7 @@ _missionGroups =
_missionPatrolVehicles = [
//[selectRandom blck_AIPatrolVehicles,[27.8945,100.275,0],0,[true,false]],
//[selectRandom blck_AIPatrolVehicles,[-84.7793,72.2617,9.53674e-007],0,[true,false]],
[selectRandom blck_AIPatrolVehicles,[-87.8457,-109.947,7.15256e-007],0,[true,false]]
[selectRandom blck_AIPatrolVehiclesGreen,[-87.8457,-109.947,7.15256e-007],0,[true,false]]
]; // can be used to define the spawn positions of vehicle patrols
// Change _useMines to true/false below to enable mission-specific settings.
@ -92,11 +91,26 @@ _maxNoAI = blck_MaxAI_Green;
_noAIGroups = blck_AIGrps_Green;
_noVehiclePatrols = blck_SpawnVeh_Green;
_noEmplacedWeapons = blck_SpawnEmplaced_Green;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_chanceReinforcements = blck_chanceParaGreen;
_noPara = blck_noParaGreen;
_helipatrol = blck_chanceHeliPatrolGreen;
_minNoAI = blck_MinAI_Blue; // Setting this in the mission file overrides the defaults such as blck_MinAI_Blue
_maxNoAI = blck_MaxAI_Blue; // Setting this in the mission file overrides the defaults
_noAIGroups = blck_AIGrps_Blue; // Setting this in the mission file overrides the defaults
_noVehiclePatrols = blck_SpawnVeh_Blue; // Setting this in the mission file overrides the defaults
_noEmplacedWeapons = blck_SpawnEmplaced_Blue; // Setting this in the mission file overrides the defaults
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines; // Setting this in the mission file overrides the defaults
_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults
_headgear = blck_headgear; // Setting this in the mission file overrides the defaults
_uniforms = ["U_OrestesBody","U_NikosAgedBody","U_NikosBody"];
_headgear = ["H_StrawHat_dark","H_StrawHat","H_Hat_brown","H_Hat_grey"];
_weaponList = ["blue"] call blck_fnc_selectAILoadout;
_sideArms = blck_Pistols;
_vests = blck_vests;
_backpacks = blck_backpacks;
_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults
_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults
_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults
_noChoppers = blck_noPatrolHelisBlue;
_missionHelis = blck_patrolHelisBlue;
_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Green Mission with template = default";
_crateLoot = blck_BoxLoot_Green;
@ -24,8 +23,8 @@ _markerLabel = "";
_markerType = ["ELIPSE",[225,225],"GRID"];
_markerColor = "ColorGreen";
_markerMissionName = "Bandit Patrol";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = []; // list of objects to spawn as landscape
_missionLandscapeMode = "random"; // acceptable values are "none","random","precise"
_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.
_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
_missionEmplacedWeapons = []; // can be used to define the precise placement of static weapons [[1,2,3] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
@ -38,9 +37,7 @@ _noVehiclePatrols = blck_SpawnVeh_Green;
_noEmplacedWeapons = blck_SpawnEmplaced_Green;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
//_chanceReinforcements = blck_chanceParaGreen;
//_noPara = blck_noParaGreen;
//_helipatrol = blck_chanceHeliPatrolGreen;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Green Mission with template = medicalCamp";
@ -27,23 +26,23 @@ _markerColor = "ColorGreen";
_markerMissionName = "Medical Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[3,3,0],0,1,0,[],"","",true,false],
["Land_dp_transformer_F",[1.698242,-10.4668,-0.00763702],271.32,1,0,[],"","",true,false],
["Land_Wreck_BRDM2_F",[1.37012,13.498,0.00109863],184.487,0.00819469,0.830999,[],"","",true,false],
["Land_BagBunker_Small_F",[18.4512,-3.66406,0.00780487],305.003,1,0,[],"","",true,false],
["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,1,0,[],"","",true,false],
["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,1,0,[],"","",true,false],
["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,1,0,[],"","",true,false],
["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,1,0,[],"","",true,false],
["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,1,0,[],"","",true,false]
["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,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.
@ -57,20 +56,16 @@ _noVehiclePatrols = blck_SpawnVeh_Green;
_noEmplacedWeapons = blck_SpawnEmplaced_Green;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
//_chanceReinforcements = blck_chanceParaGreen;
//_noPara = blck_noParaGreen;
//_helipatrol = blck_chanceHeliPatrolGreen;
//_chanceLoot = 0.33; //blck_reinforcementsBlue select 3;
private["_weap","_mags","_backpacks","_optics","_loadout"];
_weap = 3 + floor(random(4));
_mags = 8 + floor(random(6));
_backpacks = 1 + floor(random(2));
//_backpacks = 1 + floor(random(2));
_optics = 3 + floor(random(6));
_reinforcementLootCounts = [_weap,_mags,_optics,0,0,_backpacks];
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Green Mission with template = redCamp";
_crateLoot = blck_BoxLoot_Green;
@ -26,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,1,0],
["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,1,0],
["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,1,0],
["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,1,0],
["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,1,0],
["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,1,0],
["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,1,0],
["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,1,0],
["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,1,0],
["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,1,0],
["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,1,0],
["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,1,0],
["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,1,0],
["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,1,0],
["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,1,0],
["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,1,0],
["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,1,0],
["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,1,0],
["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,1,0],
["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,1,0],
["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,1,0],
["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,1,0],
["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,1,0],
["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,1,0],
["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,1,0],
["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,1,0],
["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,1,0],
["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,1,0],
["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,1,0],
["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,1,0],
["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,1,0],
["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,1,0],
["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,1,0],
["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,1,0],
["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,1,0],
["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,1,0],
["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,1,0],
["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,1,0],
["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,1,0],
["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,1,0],
["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,1,0],
["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,1,0]
["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.
@ -81,10 +80,8 @@ _noVehiclePatrols = blck_SpawnVeh_Green;
_noEmplacedWeapons = blck_SpawnEmplaced_Green;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
//_chanceReinforcements = blck_chanceParaGreen;
//_noPara = blck_noParaGreen;
//_helipatrol = blck_chanceHeliPatrolGreen;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Green Mission with template = resupplyCamp";
_crateLoot = blck_BoxLoot_Green;
@ -26,14 +25,14 @@ _markerColor = "ColorGreen";
_markerMissionName = "Resupply Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,1,0,[],"","",true,false],
["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,0,0.848867,[],"","",true,false],
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,1,0,[],"","",true,false],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,1,0,[],"","",true,false]
["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,[true,true]],
["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,[true,true]],
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,false]],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,false]],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,false]],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,false]],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,false]],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,false]]
]; // 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.
@ -47,9 +46,7 @@ _noVehiclePatrols = blck_SpawnVeh_Green;
_noEmplacedWeapons = blck_SpawnEmplaced_Green;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
//_chanceReinforcements = blck_chanceParaGreen;
//_noPara = blck_noParaGreen;
//_helipatrol = blck_chanceHeliPatrolGreen;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Green Mission with template = default";
_crateLoot = blck_BoxLoot_Green;
@ -80,9 +79,9 @@ _missionGroups =
]; // Can be used to define spawn positions of AI patrols
_missionPatrolVehicles = [
//[selectRandom blck_AIPatrolVehicles,[27.8945,100.275,0],0,[true,false]],
//[selectRandom blck_AIPatrolVehicles,[-84.7793,72.2617,9.53674e-007],0,[true,false]],
[selectRandom blck_AIPatrolVehicles,[-87.8457,-109.947,7.15256e-007],0,[true,false]]
//[selectRandom blck_AIPatrolVehiclesGreen,[27.8945,100.275,0],0,[true,false]],
//[selectRandom blck_AIPatrolVehiclesGreen,[-84.7793,72.2617,9.53674e-007],0,[true,false]],
[selectRandom blck_AIPatrolVehiclesGreen,[-87.8457,-109.947,7.15256e-007],0,[true,false]]
]; // can be used to define the spawn positions of vehicle patrols
// Change _useMines to true/false below to enable mission-specific settings.
@ -94,9 +93,7 @@ _noVehiclePatrols = blck_SpawnVeh_Green;
_noEmplacedWeapons = blck_SpawnEmplaced_Green;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_chanceReinforcements = blck_chanceParaGreen;
_noPara = blck_noParaGreen;
_helipatrol = blck_chanceHeliPatrolGreen;
_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Orange Mission with template = default";
//diag_log "[blckeagls] Spawning Orange Mission with template = default";
_crateLoot = blck_BoxLoot_Orange;
@ -24,8 +23,8 @@ _markerLabel = "";
_markerType = ["ELIPSE",[250,250],"GRID"];
_markerColor = "ColorOrange";
_markerMissionName = "Bandit Patrol";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = []; // list of objects to spawn as landscape
_missionLandscapeMode = "random"; // acceptable values are "none","random","precise"
_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.
_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
_missionEmplacedWeapons = []; // can be used to define the precise placement of static weapons [[1,2,3] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
@ -38,9 +37,16 @@ _noVehiclePatrols = blck_SpawnVeh_Orange;
_noEmplacedWeapons = blck_SpawnEmplaced_Orange;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
//_chanceReinforcements = blck_reinforcementsOrange select 0;
//_noPara = blck_reinforcementsOrange select 1;
//_helipatrol = blck_reinforcementsOrange select 2;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
_chancePara = 0.5; // Setting this in the mission file overrides the defaults
_noPara = 5; // Setting this in the mission file overrides the defaults
_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0.
_paraSkill = "orangered"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot.
_chanceLoot = 0.5;
_paraLoot = blck_BoxLoot_Orange;
_paraLootCounts = blck_lootCountsOrange; // Throw in something more exotic than found at a normal blue mission.
//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
////diag_log "[blckeagls] Spawning Orange Mission with template = medicalCamp";
_crateLoot = blck_BoxLoot_Orange;
@ -26,22 +25,23 @@ _markerColor = "ColorOrange";
_markerMissionName = "Medical Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Land_dp_transformer_F",[1.698242,-10.4668,-0.00763702],271.32,1,0,[],"","",true,false],
["Land_Wreck_BRDM2_F",[1.37012,13.498,0.00109863],184.487,0.00819469,0.830999,[],"","",true,false],
["Land_BagBunker_Small_F",[18.4512,-3.66406,0.00780487],305.003,1,0,[],"","",true,false],
["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,1,0,[],"","",true,false],
["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,1,0,[],"","",true,false],
["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,1,0,[],"","",true,false],
["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,1,0,[],"","",true,false],
["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,1,0,[],"","",true,false]
["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,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.
@ -56,10 +56,17 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Orange;
_useMines = blck_useMines;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
//_chanceReinforcements = blck_reinforcementsOrange select 0;
//_noPara = blck_reinforcementsOrange select 1;
//_helipatrol = blck_reinforcementsOrange select 2;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
_chancePara = 0.5; // Setting this in the mission file overrides the defaults
_noPara = 5; // Setting this in the mission file overrides the defaults
_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0.
_paraSkill = "orangered"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot.
_chanceLoot = 0.5;
_paraLoot = blck_BoxLoot_Orange;
_paraLootCounts = blck_lootCountsOrange; // Throw in something more exotic than found at a normal blue mission.
//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
////_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
////diag_log "[blckeagls] Spawning Orange Mission with template = redCamp";
_crateLoot = blck_BoxLoot_Orange;
@ -26,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,1,0],
["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,1,0],
["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,1,0],
["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,1,0],
["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,1,0],
["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,1,0],
["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,1,0],
["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,1,0],
["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,1,0],
["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,1,0],
["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,1,0],
["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,1,0],
["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,1,0],
["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,1,0],
["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,1,0],
["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,1,0],
["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,1,0],
["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,1,0],
["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,1,0],
["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,1,0],
["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,1,0],
["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,1,0],
["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,1,0],
["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,1,0],
["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,1,0],
["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,1,0],
["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,1,0],
["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,1,0],
["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,1,0],
["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,1,0],
["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,1,0],
["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,1,0],
["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,1,0],
["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,1,0],
["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,1,0],
["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,1,0],
["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,1,0],
["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,1,0],
["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,1,0],
["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,1,0],
["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,1,0],
["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,1,0]
["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.
@ -81,10 +80,17 @@ _noVehiclePatrols = blck_SpawnVeh_Orange;
_noEmplacedWeapons = blck_SpawnEmplaced_Orange;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
//_chanceReinforcements = blck_reinforcementsOrange select 0;
//_noPara = blck_reinforcementsOrange select 1;
//_helipatrol = blck_reinforcementsOrange select 2;;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
_chancePara = 0.5; // Setting this in the mission file overrides the defaults
_noPara = 5; // Setting this in the mission file overrides the defaults
_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0.
_paraSkill = "orangered"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot.
_chanceLoot = 0.5;
_paraLoot = blck_BoxLoot_Orange;
_paraLootCounts = blck_lootCountsOrange; // Throw in something more exotic than found at a normal blue mission.
//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
////_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Orange Mission with template = resupplyCamp";
@ -27,15 +26,14 @@ _markerColor = "ColorOrange";
_markerMissionName = "Resupply Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[3,3,0],0,1,0,[],"","",true,false],
["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,1,0,[],"","",true,false],
["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,0,0.848867,[],"","",true,false],
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,1,0,[],"","",true,false],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,1,0,[],"","",true,false]
["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,[true,true]],
["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,[true,true]],
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,false]],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,false]],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,false]],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,false]],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,false]],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,false]]
]; // 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.
@ -50,17 +48,14 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Orange;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_chanceReinforcements = 0;
_noPara = 5;
_chanceHeliPatrol = 0;
_chanceLoot = 0.33;
_chancePara = 0.5; // Setting this in the mission file overrides the defaults
_noPara = 5; // Setting this in the mission file overrides the defaults
_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0.
_paraSkill = "orangered"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot.
private["_weap","_mags","_backpacks","_optics","_loadout"];
_weap = 4 + floor(random(4));
_mags = 12 + floor(random(6));
_backpacks = 1 + floor(random(2));
_optics = 5 + floor(random(6));
//_reinforcementLootCounts = [_weap,_mags,_optics,0,0,_backpacks];
_chanceLoot = 0.5;
_paraLoot = blck_BoxLoot_Orange;
_paraLootCounts = blck_lootCountsOrange; // Throw in something more exotic than found at a normal blue mission.
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;

View File

@ -0,0 +1,131 @@
/*
Mission Template 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";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Blue Mission with template = default2";
_crateLoot = blck_BoxLoot_Red;
_lootCounts = blck_lootCountsRed;
_startMsg = "A local Enemy Leader's Camp has been spotted! Capture him and earn a reward!";
_endMsg = "The Leader was captured ! A reward has been sent by survivors";
_assetKilledMsg = "The Leader Was Killed and Bandits Fled with All Loot: Mission Aborted";
_markerLabel = "";
_markerType = ["ELIPSE",[175,175],"GRID"];
_markerColor = "ColorRed";
_markerMissionName = "Capture Leader";
_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]],
["Land_BagBunker_Small_F",[37.4551,-29.8672,0],128.253,[true,false]],
["Land_BagBunker_Large_F",[-30.4082,-6.65039,0],180,[true,false]],
["Land_BagBunker_Large_F",[-2.81836,19.4668,0],0,[true,false]],
["Land_BagBunker_Large_F",[-2.14063,-18.4355,0],0,[true,false]],
["Land_BagBunker_Large_F",[26.1328,-10.252,0],0,[true,false]],
["Land_HBarrier_Big_F",[-19.707,30.0078,0],0,[true,false]],
["Land_HBarrier_Big_F",[-11.0742,30.209,0],0,[true,false]],
["Land_HBarrier_Big_F",[18.541,31.125,0],0,[true,false]],
["Land_HBarrier_Big_F",[0.0703125,30.6699,0],0,[true,false]],
["Land_HBarrier_Big_F",[8.79102,31.0273,0],0,[true,false]],
["Land_HBarrier_Big_F",[-19.0938,-36.0176,0],0,[true,false]],
["Land_HBarrier_Big_F",[-10.4609,-35.8164,0],0,[true,false]],
["Land_HBarrier_Big_F",[19.1543,-34.9004,0],0,[true,false]],
["Land_HBarrier_Big_F",[0.683594,-35.3555,0],0,[true,false]],
["Land_HBarrier_Big_F",[9.4043,-34.998,0],0,[true,false]],
["Land_HBarrier_Big_F",[-47.6211,19.666,0],91.713,[true,false]],
["Land_HBarrier_Big_F",[-47.6777,11.0313,0],91.713,[true,false]],
["Land_HBarrier_Big_F",[-47.6465,-18.5977,0],91.713,[true,false]],
["Land_HBarrier_Big_F",[-47.5508,-0.123047,0],91.713,[true,false]],
["Land_HBarrier_Big_F",[-47.4531,-8.84961,0],91.713,[true,false]],
["Land_HBarrier_Big_F",[47.5098,-22.1211,0],270.496,[true,false]],
["Land_HBarrier_Big_F",[47.3848,-13.4863,0],270.496,[true,false]],
["Land_HBarrier_Big_F",[46.7246,16.1348,0],270.496,[true,false]],
["Land_HBarrier_Big_F",[47.0195,-2.33789,0],270.496,[true,false]],
["Land_HBarrier_Big_F",[46.7363,6.38477,0],270.496,[true,false]],
["Land_ChairPlastic_F",[-6.06445,10.7129,0],185.284,[true,false]],
["Land_CampingChair_V2_F",[0.222656,8.24219,0],0,[true,false]],
["Campfire_burning_F",[0.591797,9.47266,0],0,[true,false]],
["Land_HBarrier_3_F",[-10.3887,10.209,0],88.6077,[true,false]],
["Land_HBarrier_3_F",[8.12109,10.4063,0],88.6077,[true,false]],
["Land_HBarrier_3_F",[8.17383,13.5781,0],88.6077,[true,false]],
["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
_enemyLeaderConfig =
["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
];
_enemyLeaderConfig set[
1, selectRandom [[-7.83789,13.1465,-0.00143886]]
];
// This allows us to place the antagonist to be arrested in one of several random locations.
_missionLootBoxes = [
//["Box_NATO_Wps_F",[3,-3,0],_crateLoot,[4,10,2,5,5,1]], // Standard loot crate with standard loadout
//["Land_PaperBox_C_EPOCH",[-4,-3,0],_crateLoot,[0,0,0,10,10,3]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks
//["Land_CargoBox_V1_F",[3,4,0],_crateLoot,[0,10,2,5,5,1]]
]; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
// blck_lootCountsBlue= [4,12,3,6,6,1];
_missionLootVehicles = [
//["I_G_Offroad_01_armed_F",[-8,8,0],_crateLoot,[0,10,2,5,5,1]],
//["I_G_Offroad_01_armed_F",[8,17,0],_crateLoot,[0,10,2,5,5,1]]
]; // Parameters are "vehiclel type", offset relative to mission center, loot array, items to load from each category of the loot array.
// ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/];
/*
["B_G_Soldier_AR_F",[-19.5156,25.2598,-0.00143886],0,[true,false]],
["B_G_Soldier_AR_F",[-27.7676,-24.5508,-0.00143886],0,[true,false]],
["B_G_Soldier_AR_F",[32.4883,-23.4609,-0.00143886],0,[true,false]],
["B_G_Soldier_AR_F",[36.6914,12.1836,-0.00143886],0,[true,false]]
*/
_missionGroups =
[
//_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"];
[[-19.5156,25.2598,-0.00143886],3,3,"Red",10,20],
[[-27.7676,-24.5508,-0.00143886],3,3,"Red",10,20],
[[32.4883,-23.4609,-0.00143886],3,3,"Red",10,20],
[[36.6914,12.1836,-0.00143886],3,3,"Red",10,20]
]; // Can be used to define spawn positions of AI patrols
_missionEmplacedWeapons = [
//["B_HMG_01_high_F",[-10,-15,0]],
//["B_GMG_01_high_F",[10,12,0]],
//["O_static_AT_F",[-10,10,0]]
]; // can be used to define the type and precise placement of static weapons [["wep",[1,2,3]] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
_missionPatrolVehicles = [
//["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]],
//["B_MRAP_01_hmg_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]],
//["B_MRAP_01_gmg_F",[-87.8457,-109.947,7.15256e-007],0,[true,false]]
];
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines;
_minNoAI = blck_MinAI_Red;
_maxNoAI = blck_MaxAI_Red;
_noAIGroups = blck_AIGrps_Red;
_noVehiclePatrols = blck_SpawnVeh_Red;
_noEmplacedWeapons = blck_SpawnEmplaced_Red;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_chanceReinforcements = blck_chanceParaRed;
_noPara = blck_noParaRed;
_chanceHeliPatrol = blck_chanceHeliPatrolRed;
_spawnCratesTiming = "atMissionEndAir";
_endCondition = "assetSecured"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear", "assetSecured"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Red Mission with template = default";
_crateLoot = blck_BoxLoot_Red;
@ -24,8 +23,9 @@ _markerLabel = "";
_markerType = ["ELIPSE",[200,200],"GRID"];
_markerColor = "ColorRed";
_markerMissionName = "Bandit Patrol";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = []; // list of objects to spawn as landscape
_missionLandscapeMode = "random"; // acceptable values are "none","random","precise"
_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.
_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
_missionEmplacedWeapons = []; // can be used to define the precise placement of static weapons [[1,2,3] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
@ -38,9 +38,7 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Red;
_useMines = blck_useMines;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
//_chanceReinforcements = blck_reinforcementsRed select 0;
//_noPara = blck_reinforcementsRed select 1;
//_helipatrol = blck_reinforcementsRed select 2;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -0,0 +1,127 @@
/*
Mission Template 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";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Blue Mission with template = default2";
_crateLoot = blck_BoxLoot_Blue;
_lootCounts = blck_lootCountsBlue;
_startMsg = "A local town official is being held hostage! Free him and earn a reward!";
_endMsg = "The official was freed! A reward has been sent by the local townsfolk";
_assetKilledMsg = "The Hostage Was Killed and Bandits Fled with All Loot: Mission Aborted";
_markerLabel = "";
_markerType = ["ELIPSE",[175,175],"GRID"];
_markerColor = "ColorBlue";
_markerMissionName = "Rescue Hostage";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[-10.6914,-10.541,0],0,[true,false]],
["Land_SM_01_shelter_wide_F",[-6.29883,9.57617,0],0,[true,false]],
["Land_ContainerLine_01_F",[-5.54492,40.8184,0],0,[true,false]],
["Land_ContainerLine_01_F",[-6.92578,-38.2188,0],0,[true,false]],
["Land_ContainerLine_01_F",[-65.8438,-28.4023,0],90,[true,false]],
["Land_ContainerLine_01_F",[-66.0664,21.3496,0],90,[true,false]],
["Land_ContainerLine_01_F",[195.047,-23.9395,0],87.9345,[true,false]],
["Land_ContainerLine_01_F",[42.6172,-23.9395,0],90.5197,[true,false]],
["Land_ContainerLine_01_F",[42.8398,27.5977,0],270,[true,false]],
//["B_G_Soldier_AR_F",[-6.74219,-78.625,-0.00143886],0,[true,false]],
//["B_G_Soldier_AR_F",[-86.3281,-5.14453,-0.00143886],0,[true,false]],
//["B_G_Soldier_AR_F",[61.4609,-1.92773,-0.00143838],0,[true,false]],
//["B_G_Soldier_AR_F",[-43.3359,54.0898,-0.00143838],0,[true,false]],
//["B_Soldier_F",[70.5156,-90.3867,-2.75806],0,[true,false]],
//["B_Soldier_F",[70.5156,-90.3867,-2.75806],0,[true,false]],
//["B_MRAP_01_hmg_F",[70.5156,-90.3867,4.76837e-007],0,[true,false]],
//["B_Soldier_F",[-78.834,72.0566,-2.20595],0,[true,false]],
//["B_MRAP_01_F",[-78.834,72.0566,4.76837e-007],0,[true,false]],
["Campfire_burning_F",[-8.68555,-2.57813,0],0,[true,false]],
["Land_ChairPlastic_F",[-2.36719,16.1875,0],0,[true,false]],
["Land_ChairPlastic_F",[-2.99609,13.2813,0],0,[true,false]],
["Land_ChairPlastic_F",[-2.84766,10.3398,0],0,[true,false]],
["Land_ChairPlastic_F",[-3.06055,8.08203,0],0,[true,false]],
["Land_ChairPlastic_F",[-2.70313,5.98047,0],0,[true,false]],
["Land_Stone_4m_F",[-5.71484,21.2051,0],0,[true,false]],
["Land_Stone_4m_F",[-1.30469,21.2266,0],0,[true,false]],
["Land_Stone_4m_F",[-10.1836,21.166,0],0,[true,false]],
["Land_Stone_4m_F",[3.01953,10.2051,0],90.8324,[true,false]],
["Land_Stone_4m_F",[2.97656,5.79492,0],90.8324,[true,false]],
["Land_Stone_4m_F",[3.04492,14.6738,0],90.8324,[true,false]],
["Land_Stone_4m_F",[-6.16992,-0.855469,0],0,[true,false]],
["Land_Stone_4m_F",[-1.75977,-0.833984,0],0,[true,false]],
["Land_Stone_4m_F",[-10.6387,-0.894531,0],0,[true,false]],
["Land_Stone_4m_F",[-15.4609,9.93164,0],90.8324,[true,false]],
["Land_Stone_4m_F",[-15.5039,5.52148,0],90.8324,[true,false]],
["Land_Stone_4m_F",[-15.4355,14.4004,0],90.8324,[true,false]]
]; // list of objects to spawn as landscape; // list of objects to spawn as landscape
_hostageConfig = ["C_man_polo_6_F",
[-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
]; // Sitting Animation
// Use the animation view to see other choices: http://killzonekid.com/arma-3-animation-viewer-jumping-animation/
_missionLootBoxes = [
//["Box_NATO_Wps_F",[3,-3,0],_crateLoot,[4,10,2,5,5,1]], // Standard loot crate with standard loadout
//["Land_PaperBox_C_EPOCH",[-4,-3,0],_crateLoot,[0,0,0,10,10,3]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks
//["Land_CargoBox_V1_F",[3,4,0],_crateLoot,[0,10,2,5,5,1]]
]; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
// blck_lootCountsBlue= [4,12,3,6,6,1];
_missionLootVehicles = [
//["I_G_Offroad_01_armed_F",[-8,8,0],_crateLoot,[0,10,2,5,5,1]],
//["I_G_Offroad_01_armed_F",[8,17,0],_crateLoot,[0,10,2,5,5,1]]
]; // Parameters are "vehiclel type", offset relative to mission center, loot array, items to load from each category of the loot array.
// ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/];
/*
["B_G_Soldier_AR_F",[26.9961,-29.9551,-0.00143886],0,[true,false]],
["B_G_Soldier_AR_F",[32.2461,33.0605,-0.00143886],0,[true,false]],
["B_G_Soldier_AR_F",[-35.6035,32.1855,-0.00143886],0,[true,false]],
["B_G_Soldier_AR_F",[-47.4219,-19.8906,-0.00143886],0,[true,false]]
*/
_missionGroups =
[
//_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"];
[[26.9961,-29.9551,-0.00143886],3,3,"Red",10,20],
[[32.2461,33.0605,-0.00143886],3,3,"Red",10,20],
[[-35.6035,32.1855,-0.00143886],3,3,"Red",10,20],
[[-47.4219,-19.8906,-0.00143886],3,3,"Red",10,20]
]; // Can be used to define spawn positions of AI patrols
_missionEmplacedWeapons = [
//["B_HMG_01_high_F",[-10,-15,0]],
//["B_GMG_01_high_F",[10,12,0]],
//["O_static_AT_F",[-10,10,0]]
]; // can be used to define the type and precise placement of static weapons [["wep",[1,2,3]] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
_missionPatrolVehicles = [
//["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]],
//["B_MRAP_01_hmg_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]],
//["B_MRAP_01_gmg_F",[-87.8457,-109.947,7.15256e-007],0,[true,false]]
];
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines;
_minNoAI = blck_MinAI_Red;
_maxNoAI = blck_MaxAI_Red;
_noAIGroups = blck_AIGrps_Red;
_noVehiclePatrols = blck_SpawnVeh_Red;
_noEmplacedWeapons = blck_SpawnEmplaced_Red;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_noPara = blck_noParaRed;
_chanceHeliPatrol = blck_chanceHeliPatrolRed;
_spawnCratesTiming = "atMissionEndAir";
_endCondition = "assetSecured"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear", "assetSecured"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Red Mission with template = medicalCamp";
_crateLoot = blck_BoxLoot_Red;
@ -26,22 +25,23 @@ _markerColor = "ColorRed";
_markerMissionName = "Medical Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Land_dp_transformer_F",[1.698242,-10.4668,-0.00763702],271.32,1,0,[],"","",true,false],
["Land_Wreck_BRDM2_F",[1.37012,13.498,0.00109863],184.487,0.00819469,0.830999,[],"","",true,false],
["Land_BagBunker_Small_F",[18.4512,-3.66406,0.00780487],305.003,1,0,[],"","",true,false],
["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,1,0,[],"","",true,false],
["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,1,0,[],"","",true,false],
["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,1,0,[],"","",true,false],
["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,1,0,[],"","",true,false],
["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,1,0,[],"","",true,false],
["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,1,0,[],"","",true,false]
["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,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.
@ -55,9 +55,7 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Red;
_useMines = blck_useMines;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
//_chanceReinforcements = blck_reinforcementsRed select 0;
//_noPara = blck_reinforcementsRed select 1;
//_helipatrol = blck_reinforcementsRed select 2;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Red Mission with template = redCamp";
@ -27,49 +26,48 @@ _markerColor = "ColorRed";
_markerMissionName = "Bandit Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Flag_AAF_F",[3,3,0],0,1,0,[],"","",true,false],
["Land_CampingChair_V1_F",[1.32227,2.07813,8.2016e-005],108.293,1,0],
["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,1,0],
["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,1,0],
["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,1,0],
["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,1,0],
["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,1,0],
["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,1,0],
["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,1,0],
["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,1,0],
["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,1,0],
["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,1,0],
["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,1,0],
["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,1,0],
["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,1,0],
["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,1,0],
["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,1,0],
["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,1,0],
["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,1,0],
["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,1,0],
["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,1,0],
["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,1,0],
["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,1,0],
["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,1,0],
["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,1,0],
["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,1,0],
["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,1,0],
["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,1,0],
["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,1,0],
["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,1,0],
["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,1,0],
["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,1,0],
["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,1,0],
["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,1,0],
["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,1,0],
["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,1,0],
["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,1,0],
["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,1,0],
["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,1,0],
["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,1,0],
["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,1,0],
["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,1,0],
["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,1,0]
["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.
@ -81,20 +79,10 @@ _noVehiclePatrols = blck_SpawnVeh_Red;
_noEmplacedWeapons = blck_SpawnEmplaced_Red;
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
//_chanceReinforcements = 0.10; //blck_reinforcementsBlue select 0;
//_noPara = 2; //blck_reinforcementsBlue select 1;
//_chanceHeliPatrol = 0;//blck_reinforcementsBlue select 2;
//_chanceLoot = 0.10; //blck_reinforcementsBlue select 3;
private["_weap","_mags","_backpacks","_optics","_loadout"];
_weap = 3 + floor(random(4));
_mags = 8 + floor(random(6));
_backpacks = 1 + floor(random(2));
_optics = 1 + floor(random(6));
_reinforcementLootCounts = [_weap,_mags,_optics,0,0,_backpacks];
#ifdef blck_milServer
_weapons = blck_RHS_Weapons;
#endif
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;

View File

@ -11,9 +11,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Red Mission with template = resupplyCamp";
_crateLoot = blck_BoxLoot_Red;
@ -26,14 +25,14 @@ _markerColor = "ColorRed";
_markerMissionName = "Resupply Camp";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_missionLandscape = [
["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,1,0,[],"","",true,false],
["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,0,0.848867,[],"","",true,false],
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,1,0,[],"","",true,false],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,1,0,[],"","",true,false],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,1,0,[],"","",true,false]
["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,[true,true]],
["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,[true,true]],
["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,false]],
["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,false]],
["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,false]],
["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,false]],
["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,false]],
["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,false]]
]; // 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.
@ -47,9 +46,7 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Red;
_useMines = blck_useMines;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
//_chanceReinforcements = blck_reinforcementsRed select 0;
//_noPara = blck_reinforcementsRed select 1;
//_helipatrol = blck_reinforcementsRed select 2;
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------
@ -13,5 +12,5 @@
params["_emplacedWeapon"];
blck_sm_Emplaced pushBack [_emplacedWeapon,grpNull,0];
diag_log format["_sm_AddEmplaced::-> _emplacedWeapon = %1, blck_sm_Emplaced = %2",_emplacedWeapon,blck_sm_Emplaced];
//diag_log format["_sm_AddEmplaced::-> _emplacedWeapon = %1, blck_sm_Emplaced = %2",_emplacedWeapon,blck_sm_Emplaced];
true

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------
@ -10,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_init_functions.sqf <Defining Variable and Compiling Functions>";
diag_log "[blckeagls] GMS_fnc_sm_init_functions.sqf <Defining Variables and Compiling Functions>";
blck_sm_Groups = [];
blck_sm_Vehicles = [];
blck_sm_Aircraft = [];
@ -26,13 +25,13 @@ blck_fnc_sm_AddVehicle = compileFinal preprocessFileLineNumbers "\q\addons\cust
blck_fnc_sm_AddAircraft = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddAircraft.sqf";
blck_fnc_sm_AddEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddEmplaced.sqf";
//blck_fnc_sm_monitorStaticUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_monitorStaticUnits.sqf";
blck_fnc_sm_monitorStaticUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorStaticUnits.sqf";
blck_fnc_sm_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnVehiclePatrol.sqf";
blck_fnc_sm_spawnAirPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnAirPatrol.sqf";
blck_fnc_sm_spawnEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnEmplaced.sqf";
//blck_fnc_sm_spawnInfantryPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrol.sqf";
blck_fnc_sm_monitorStaticMissionUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorStaticUnits.sqf";
//blck_fnc_sm_checkForPlayerNearMission = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\StaticMissions_checkForPlayerNearMission.sqf";
blck_fnc_sm_checkForPlayerNearMission = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_checkForPlayerNearMission.sqf";
blck_fnc_sm_spawnAirPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnAirPatrols.sqf";
blck_fnc_sm_spawnEmplaceds = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnEmplaced.sqf";
blck_fnc_sm_spawnInfantryPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnInfantryPatrols.sqf";
@ -40,6 +39,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 <Loaded>";
diag_log "[blckeagls] GMS_sm_init_functions.sqf <Variables Defined and Functions Loaded>";
blck_sm_functionsLoaded = true;
blck_sm_functionsLoaded = true;

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------
@ -51,6 +50,6 @@ _blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow
uiSleep 30;
// spawn loot chests
[_missionLootBoxes,_missionCenter] call blck_fnc_sm_spawnLootContainers;
[_missionLootVehicles,_missionCenter] call blck_fnc_sm_spawnLootContainers;
diag_log format["[blckeagls] Static Mission Spawner: Mission %1 spawned",_mission];

View File

@ -38,8 +38,8 @@ _sm_groups = +blck_sm_Groups;
//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", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true] ];
_group = [_pos,_numAI,_numAI,_difficulty,_pos,_patrolRadius-2,_patrolRadius,blck_SkinList,blck_headgear,true] call blck_fnc_spawnGroup;
// // 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,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
@ -62,7 +62,7 @@ _sm_scubaGroups = +blck_sm_scubaGroups;
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, _respawnTime, _group, _spawnAt]
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"];
//diag_log format["<_sm_monitorStaticUnits:: _group = %1 | _x = %2 |_forEachIndex = %3",_group,_x,_forEachIndex];
//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
{
@ -92,16 +92,16 @@ _sm_scubaGroups = +blck_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_monitorStaticUnits::-> _x = %1",_x];
//diag_log format["_sm_monitorEmplacedUnits::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnTime"];
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["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"];
//diag_log format["[blckeagls static Emplaced spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
_group = [[_groupParameters],1,_difficulty,_pos,blck_SkinList,blck_headgear,true] call blck_fnc_spawnEmplacedWeaponArray;
// 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];
};
@ -121,15 +121,15 @@ _sm_Emplaced = +blck_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","_respawnTime"];
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","_uniforms","_headGear","_missionPatrolVehicles",["_useRelativePos",true],["weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]];
//diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
_return = [_pos,1,_difficulty,blck_SkinList,blck_headgear,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
//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;
@ -156,9 +156,8 @@ _sm_surfaceVehicles = +blck_sm_surfaceShips;
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
// params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear","_missionPatrolVehicles",["_useRelativePos",true]];
//diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
_return = [_pos,1,_difficulty,blck_SkinList,blck_headgear,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
[_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;
@ -185,9 +184,9 @@ _sm_SDVVehicles = +blck_sm_submarines;
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
// params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear","_missionPatrolVehicles",["_useRelativePos",true]];
//diag_log format["[blckeagls static sub patrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
_return = [_pos,1,_difficulty,blck_SkinList,blck_headgear,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
//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;
@ -215,16 +214,17 @@ _sm_Aircraft = +blck_sm_Aircraft;
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","_weapons","_uniforms","_headGear","_helis",["_chanceParas",0]];
//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,_weapon,blck_SkinList,blck_headgear,[_aircraftType],0] call blck_fnc_spawnMissionHeli;
_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 ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead
if ( (isNull _group) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Aircraft,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/13/17
--------------------------
License
--------------------------

View File

@ -1,10 +1,7 @@
/*
Run scripts exported from M3EDEN Editor plug in for Arma 3 or other map addons.
Add addons to the arrays for Epoch or Exile as appropriate.
Arrays should contain ["mapname", "name of folder within mapaddons","name of file to execute"]
by Ghostrider-DbD-
for DBD Clan
11/12/16
by Ghostridere-GRG-
Copyright 2016
--------------------------
License
--------------------------
@ -24,19 +21,21 @@ blck_fnc_sm_AddGroup = compileFinal preprocessFileLineNumbers "\q\addons\custo
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_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_monitorStaticMissionUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_monitorStaticUnits.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_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_spawnVehiclePatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnVehiclePatrols.sqf";
//blck_fnc_sm_monitorStaticUnit = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_monitorStaticUnits.sqf";
//blck_fnc_sm_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnVehiclePatrol.sqf";
//blck_fnc_sm_spawnAirPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnAirPatrol.sqf";
//blck_fnc_sm_spawnEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnEmplaced.sqf";
//blck_fnc_sm_spawnInfantryPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrol.sqf";
//blck_fnc_sm_checkForPlayerNearMission = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\StaticMissions_checkForPlayerNearMission.sqf";
//blck_fnc_sm_spawnAirPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnAirPatrols.sqf";
//blck_fnc_sm_spawnEmplaceds = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnEmplaced.sqf";
//blck_fnc_sm_spawnInfantryPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrols.sqf";
//blck_fnc_sm_spawnVehiclePatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnVehiclePatrols.sqf";
diag_log "[blckeagls] GMS_sm_init_functions.sqf <Loaded>";

View File

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

View File

@ -46,5 +46,5 @@ _map = toLower worldName;
uiSleep 1;
}forEach _staticMissions;
diag_log "[blckeagls] GMS_StaticMissions_init.sqf <Loaded>";
diag_log "[blckeagls] GMS_StaticMissions Initialized.sqf <Loaded>";

View File

@ -5,7 +5,7 @@
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
"_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks","_weapons","_sideArms","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
_mission = "static mission example #2"; // Included for additional documentation. Not intended to be spawned as a mission per se.
_missionCenter = [22907,16789,0]; // I pulled this from the position of the marker.
@ -125,11 +125,14 @@ _airPatrols = [
//[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"green",1000,0]
];
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines; // Set to false if you have vehicles patrolling nearby.
_uniforms = blck_SkinList; // You can replace this list with a custom list of uniforms if you like.
_headgear = blck_headgear; // You can replace this list with a custom list of headgear.
_weapons = blck_WeaponList_Orange; // You can replace this list with a customized list of weapons, or another predifined list from blck_configs_epoch or blck_configs_exile as appropriate.
_useMines = blck_useMines; // Set to false if you have vehicles patrolling nearby.
_uniforms = blck_SkinList; // You can replace this list with a custom list of uniforms if you like.
_headgear = blck_headgear; // You can replace this list with a custom list of headgear.
_vests = blck_vests; // You can replace this list with a custom list of vests.
_backpacks = blck_backpacks; // You can replace this list with a custom list of backpacks.
_weapons = blck_WeaponList_Orange; // You can replace this list with a customized list of weapons, or another predifined list from blck_configs_epoch or blck_configs_exile as appropriate.
_sideArms = blck_pistols; // You can replace this list with a custom list of sidearms.
#include "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_initializeMission.sqf";
diag_log format["[blckeagls static missions] COMPLETED initializing middions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty];
diag_log format["[blckeagls static missions] COMPLETED initializing middions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty];

View File

@ -3,14 +3,25 @@
See the accompanying example mission in the exampleMission folder to get an idea how I laid this out.
Note that I exported the mission using the exportAll function of M3EDEN editor.
*/
/*
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/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
"_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks","_weapons","_sideArms","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"];
_mission = "static mission example #2"; // Included for additional documentation. Not intended to be spawned as a mission per se.
_missionCenter = [22907,16789,0]; // I pulled this from the position of the marker.
_difficulty = "red"; // Skill level of AI (blue, red, green etc)
diag_log format["[blckeagls static missions] STARTED initializing middions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty];
diag_log format["[blckeagls static missions] STARTED initializing mission %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty];
_crateLoot = blck_BoxLoot_Orange; // You can use a customized _crateLoot configuration by defining an array here. It must follow the following format shown for a hypothetical loot array called _customLootArray
/*
_customLootArray =
@ -75,8 +86,8 @@ _missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output her
_missionLootVehicles = [ // Paste appropriate lines from the output of M3EDEN Editor here and add the loot crate type and loot counts at the end of each entry as shown in the example below.
// Many vehicles have less inventory capacity than crates so you may have to modify _lootcounts to avoid having stuff spawned all over the ground.
//["Exile_Car_Van_Box_Guerilla02",[22896.8,16790.1,3.18987],[[0,1,0],[0,0,1]],[true,false], _crateLoot, [[1,2],[4,6],[2,6],[5,8],6,1]],
//["Exile_Car_Van_Fuel_Guerilla02",[22919,16782.7,3.18132],[[0,1,0],[0.00129187,0,0.999999]],[true,false],_crateLoot, _lootCounts]
["Exile_Car_Van_Box_Guerilla02",[22896.8,16790.1,3.18987],[[0,1,0],[0,0,1]],[true,false], _crateLoot, [[1,2],[4,6],[2,6],[5,8],6,1]],
["Exile_Car_Van_Fuel_Guerilla02",[22919,16782.7,3.18132],[[0,1,0],[0.00129187,0,0.999999]],[true,false],_crateLoot, _lootCounts]
]; // [ ["vehicleClassName", [px, py, pz] /* possition at which to spawn*/, _loot /* pointer to array of loot (see below)];
// When blank nothing is spawned.
// You can use the same format used for _missionLootBoxes to add vehicles with/without loot.
@ -86,8 +97,9 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Red; // Modified as needed; can be a num
// or _noEmplacedWeapons = 3; // a constant number of emplaced weps per misison
// Note that this value is ignored if you define static weapon positions and types in the array below.
_missionEmplacedWeapons = [
//["B_G_Mortar_01_F",[22867.3,16809.1,3.17968],"red",0,0],
//["B_HMG_01_high_F",[22944.3,16820.5,3.14243],"green",0,0]
// ["Weapon Class Name", position[x,y,z], AI Skill [blue, red, green, orange],patrol radius [0 for static units], respawn time [seconds]]
["B_G_Mortar_01_F",[22867.3,16809.1,3.17968],"red",0,0],
["B_HMG_01_high_F",[22944.3,16820.5,3.14243],"green",0,0]
]; // example [ ["emplacedClassName",[px, py, pz] /* position to spawn weapon */, difficulty /* difficulty of AI manning weapon (blue, red etc)] ];
// can be used to define the precise placement of static weapons [[1,2,3] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
// If the number of possible locations exceeds the number of emplaced weapons specified above then only some of the locations in the array will have emplaced weapons spawned.
@ -97,13 +109,13 @@ _minNoAI = blck_MinAI_Red; // Modify as needed
_maxNoAI = blck_MaxAI_Red; // Modify as needed.
_noAIGroups = blck_AIGrps_Red; // Modify as needed; note that these values are ignored of you specify AI patrols in the array below.
_aiGroupParameters = [
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/]
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, 120 /* seconds to wait to respawn after all units dead */]
//[[22920.4,16887.3,3.19144],"red",[1,2], 75,120],
//[[22993.3,16830.8,5.6292],"red",4, 75,9000],
//[[22947.8,16717,6.80305],"red",4, 75,900],
//[[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],
//[[22909.8,16778.6,3.19144],"red",4, 75,900],
//[[22819.4,16929.5,5.33892],"red",4, 75,900],
[[22819.4,16929.5,5.33892],"red",4, 75,900]
];
@ -111,7 +123,7 @@ _aiGroupParameters = [
_noVehiclePatrols = blck_SpawnVeh_Red; // Modified as needed; can be a numberic value (e.g. 3) or range presented as [2,4];
// Note that this value is ignored if you define vehicle patrols in the array below.
_vehiclePatrolParameters = [
["Exile_Car_Offroad_Armed_Guerilla01",[22819.4,16929.5,3.17413],"red", 600,900],
//// ["Vehicle Class Name", position[x,y,z], AI Skill [blue, red, green, orange],patrol radius [0 for static units], respawn time [seconds]]
["Exile_Car_Offroad_Armed_Guerilla02",[22809.5,16699.2,8.78706],"green", 600,90]
]; //[ ["vehicleClassName",[px,py,pz] /* center of patrol area */, difficulty /* blue, red etc*/, patrol radius] ]
// When this array is empty, vehicle patrols will be scattered randomely around the mission.
@ -121,6 +133,7 @@ _aircraftTypes = blck_patrolHelisRed; // You can use one of the pre-defined li
_noAirPatrols = blck_noPatrolHelisRed; // You can use one of the pre-defined values or a custom one. acceptable values are integers (1,2,3) or a range such as [2,4];
// Note: this value is ignored if you specify air patrols in the array below.
_airPatrols = [
// // ["Aircraft Class Name", position[x,y,z], AI Skill [blue, red, green, orange],patrol radius [0 for static units], respawn time [seconds]]
["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,900]//,
//[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"green",1000,0]
];
@ -128,8 +141,11 @@ _airPatrols = [
_useMines = blck_useMines; // Set to false if you have vehicles patrolling nearby.
_uniforms = blck_SkinList; // You can replace this list with a custom list of uniforms if you like.
_headgear = blck_headgear; // You can replace this list with a custom list of headgear.
_vests = blck_vests; // You can replace this list with a custom list of vests.
_backpacks = blck_backpacks; // You can replace this list with a custom list of backpacks.
_weapons = blck_WeaponList_Orange; // You can replace this list with a customized list of weapons, or another predifined list from blck_configs_epoch or blck_configs_exile as appropriate.
_sideArms = blck_pistols; // You can replace this list with a custom list of sidearms.
#include "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_initializeMission.sqf";
diag_log format["[blckeagls static missions] COMPLETED initializing missions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty];
diag_log format["[blckeagls static missions] COMPLETED initializing missions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty];

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
Copyright 2016
--------------------------
License
--------------------------
@ -18,7 +17,7 @@ private ["_staticMissions"];
_staticMissions = [
// [mod (Epoch, Exile), map (Altis, Tanoa etc), mission center, eg [10445,2014,0], filename.sqf (name of static mission template for that mission)];
//["Epoch","Altis","staticMissionExample2_Epoch.sqf"],
//["Exile","Altis","staticMissionExample2_Exile.sqf"]
["Exile","Altis","staticMissionExample2_Exile.sqf"]
];
diag_log "[blckeagls] GMS_UMS_StaticMissions_Lists.sqf <Loaded>";

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
Copyright 2016
--------------------------
License
--------------------------
@ -10,9 +9,9 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
if (!isServer) exitWith{};
//if (!isServer) exitWith{};
//diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf <Initializing Static Mission System>";
diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf <Initializing Static Missions>";
//static mission descriptor for code: [position,level, numAI or [min,maxAI],patrolRadius, respawn, group[groupNull],spawnedAt[0],respawn[0]]
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
@ -23,14 +22,14 @@ uiSleep 3;
private["_mod","_map","_missionMod","_missionMap","_missionLocation","_missionDataFile"];
//diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf <Getting Mod Type>";
_mod = toLower(call blck_fnc_getModType);
//diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf <mod type = %1>",_mod];
//diag_log format["[blckeagls] GMS__UMS_StaticMissions_init <_staticMissions> = %1",_staticMissions];
//diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf <Getting map name>";
diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf <mod type = %1>",_mod];
diag_log format["[blckeagls] GMS__UMS_StaticMissions_init <_staticMissions> = %1",_staticMissions];
diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf <Getting map name>";
_map = toLower worldName;
//diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf <map name = %1>",_map];
diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf <map name = %1>",_map];
{
//diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf <Evaluating Mission = %1>",_x];
//diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf <worldName = %1 | _mod = %2>",_map,_mod];
diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf <Evaluating Mission = %1>",_x];
diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf <worldName = %1 | _mod = %2>",_map,_mod];
if ((_map) isEqualTo toLower(_x select 1)) then
{
if ((_mod isEqualTo "epoch") && (toLower(_x select 0) isEqualTo "epoch")) then
@ -47,5 +46,5 @@ _map = toLower worldName;
uiSleep 1;
}forEach _staticMissions;
diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf <Loaded>";
diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf <Static Missions Loaded>";

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------

View File

@ -1,8 +1,6 @@
/*
Mission Template by Ghostrider [GRG]
Mission Compositions by Bill prepared for ghostridergaming
Ghostrider [GRG]
Copyright 2016
Last modified 3/20/17
--------------------------
License
@ -12,3 +10,4 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
blck_dynamicUMS_MissionList = ["default.sqf"];
diag_log "[blckeagls] Dynamic UMS Mission List <Loaded>";

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
--------------------------
License
--------------------------
@ -9,6 +8,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
diag_log "[blckeagls] Initializing UMS";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
blck_dynamicUMS_MissionsRuning = 0;
blck_priorDynamicUMS_Missions = [];
@ -19,5 +20,7 @@ blck_UMS_ActiveDynamicMissions = [];
#include "code\GMS_UMS_functions.sqf";
#include "GMS_UMS_dynamicMissionList.sqf";
[] execVM "q\addons\custom_server\Missions\UMS\GMS_UMS_StaticMissions_init.sqf";
diag_log "[blckeagls] UMS <Initialized>";

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
Copyright 2016
--------------------------
License
--------------------------
@ -29,7 +28,7 @@ _evaluate = true;
{
_waterPos = [
_mapCenter, // center of search area
1, // min distance to search
2, // min distance to search
20000, // max distance to search
0, // distance to nearest object
2, // water mode [2 = water only]

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
Copyright 2016
--------------------------
License
--------------------------

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
Copyright 20167
--------------------------
License
--------------------------

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
Copyright 2016
--------------------------
License
--------------------------
@ -10,17 +9,25 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_pos"];
diag_log format["_fnc_addDynamicUMS_Mission: _pos = %1",_pos];
private["_UMS_mission","_waitTime","_mission"];
//params["_pos"];
private["_UMS_mission","_waitTime","_mission","_pos"];
if (count blck_dynamicUMS_MissionList == 0) exitWith
{
blck_numberUnderwaterDynamicMissions = -1;
diag_log "No Dynamic UMS Missions Listed <spawning disabled>";
};
_UMS_mission = selectRandom blck_dynamicUMS_MissionList;
_waitTime = (blck_TMin_UMS) + random(blck_TMax_UMS - blck_TMin_UMS);
_mission = format["%1%2","Mafia Pirates",floor(random(1000000))];
//_pos = call blck_fnc_findShoreLocation;
_pos = call blck_fnc_findShoreLocation;
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then {diag_log format["_fnc_addDynamicUMS_Mission: blck_dynamicUMS_MissionsRuning = %1 | blck_missionsRunning = %2 | blck_UMS_ActiveDynamicMissions = %3",blck_dynamicUMS_MissionsRuning,blck_missionsRunning,blck_UMS_ActiveDynamicMissions]};;
#endif
blck_UMS_ActiveDynamicMissions pushBack _pos;
blck_missionsRunning = blck_missionsRunning + 1;
blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning + 1;
//diag_log format["[blckeagls] UMS Spawner:-> waiting for %1",_waitTime];
uiSleep _waitTime;
//diag_log format["[blckeagls] UMS Spawner:-> spawning mission %1",_UMS_mission];
[_pos,_mission] spawn compileFinal preprocessFileLineNumbers format["q\addons\custom_server\Missions\UMS\dynamicMissions\%1",_UMS_mission];
[_pos,_mission] call compileFinal preprocessFileLineNumbers format["q\addons\custom_server\Missions\UMS\dynamicMissions\%1",_UMS_mission];

View File

@ -1,8 +1,7 @@
/*
Generic Mission Spawner
Dynamic Underwater Mission Spawner
By Ghostrider GRG
Copyright 2016
Last modified 12/14/17
--------------------------
License
@ -15,34 +14,22 @@
#define isScubaMission true
private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups"];
params["_coords","_mission",["_allowReinforcements",false]];
//diag_log format["_missionSpawner (18):: _allowReinforcements = %1",_allowReinforcements];
////////
// 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[_missionListOrange,_pathOrange,"OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange];
_markerClass = _mission;
_aiDifficultyLevel = _difficulty; // _difficulty is defined in the mission description file. see \addons\custom_server\Missions\UMS\dynamicMissions\default.sqf for an example
blck_ActiveMissionCoords pushback _coords;
blck_UMS_ActiveDynamicMissions pushBack _coords;
blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning + 1;
blck_missionsRunning = blck_missionsRunning + 1;
diag_log format["[blckeagls Dynamic UMS] dynamicUMSspawner (34):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
diag_log format["[blckeagls] missionSpawner (34):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
private["_chanceHeliPatrol","_noPara","_reinforcementLootCounts","_chanceLoot","_heliCrew","_loadCratesTiming"];
private["_chanceHeliPatrol","_noPara","_reinforcementLootCounts","_chanceLoot","_heliCrew","_loadCratesTiming","_marker"];
if (isNil "_markerColor") then {_markerColor = "ColorBlack"};
if (isNil "_markerType") then {_markerType = ["mil_box",[]]};
//if (isNil "_timeOut") then {_timeOut = -1;};
if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn";
if (isNil "_missionGroups") then {_missionGroups = []};
private["_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"];
if (isNil "_useMines") then {_useMines = blck_useMines;};
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";
_objects = [];
_mines = [];
@ -57,23 +44,21 @@ _groupPatrolRadius = 50;
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;
[_blck_localMissionMarker] call blck_fnc_spawnMarker;
_marker = [_blck_localMissionMarker] call blck_fnc_spawnMarker;
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (91) message players and spawn a mission marker";};
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (77) waiting for player to trigger the mission";};
if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (91) message players and spawn a mission marker";};
if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (77) 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
// All parameters are defined, let's wait until a player is nearby or the mission has timed out
////////
private["_wait","_missionStartTime","_playerInRange","_missionTimedOut"];
@ -84,14 +69,13 @@ _missionTimedOut = false;
_wait = true;
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (90) starting mission trigger loop"};
if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (90) starting mission trigger loop"};
if (blck_debugLevel > 2) then {_wait = false};
#endif
while {_wait} do
{
#ifdef blck_debugMode
//diag_log "missionSpawner:: top of mission trigger loop";
if (blck_debugLevel > 2) exitWith {_playerInRange = true;};
#endif
@ -111,20 +95,13 @@ while {_wait} do
if (_missionTimedOut) exitWith
{
/*
*/
// Deal with the case in which the mission timed out.
//["timeOut",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers;
blck_priorDynamicUMS_Missions pushback [_coords,diag_tickTime];
blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords];
blck_missionsRunning = blck_missionsRunning - 1;
blck_UMS_ActiveDynamicMissions = blck_UMS_ActiveDynamicMissions - [_coords];
blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning - 1;
blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning - 1;
[_blck_localMissionMarker select 0] call blck_fnc_deleteMarker;
//_blck_localMissionMarker set [1,[0,0,0]];
//_blck_localMissionMarker set [2,""];
[_objects, 0.1] spawn blck_fnc_cleanupObjects;
#ifdef blck_debugMode
@ -218,7 +195,6 @@ if (blck_debugLevel > 2) then {
#endif
//diag_log format["_fnc_dynamicUMSspawner: spawning scuba groups with _scubaGroupParameters = %1",_scubaGroupParameters];
// params["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear],"_missionGroups",["weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]];
_temp = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,_scubaGroupParameters,blck_UMS_weapons,blck_UMS_vests,isScubaMission] call blck_fnc_spawnMissionAI;
#ifdef blck_debugMode
@ -263,9 +239,7 @@ _vehToSpawn = 0;
// Spawn any surface patrols
if (blck_useVehiclePatrols && count _vehiclePatrolParameters > 0) then
{
// params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear","_missionPatrolVehicles",["_useRelativePos",true],["_weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]];
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vehiclePatrolParameters,true /*,blck_UMS_weapons,blck_UMS_vests,isScubaMission*/ ] call blck_fnc_spawnMissionVehiclePatrols;
//[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {
diag_log format["dynamicUMSspawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp];
@ -294,7 +268,6 @@ if (blck_useVehiclePatrols && count _vehiclePatrolParameters > 0) then
if (blck_useVehiclePatrols && count _submarinePatrolParameters > 0) then
{
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_submarinePatrolParameters,true,blck_UMS_weapons,blck_UMS_vests,isScubaMission] call blck_fnc_spawnMissionVehiclePatrols;
//[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {
diag_log format["dynamicUMSspawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp];
@ -335,74 +308,48 @@ uiSleep _delayTime;
_temp = [[],[],false];
_abort = false;
if (_allowReinforcements) then
{
_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout;
_temp = [];
_noChoppers = [_noChoppers] call blck_fnc_getNumberFromRange;
_noPara = [_noPara] call blck_fnc_getNumberFromRange;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["[blckeagls] dynamicUMSspawner:: (298) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
private _noChoppers = 0;
private _chancePara = 0;
switch (toLower _aiDifficultyLevel) do
{
case "blue":{
_noChoppers = [blck_noPatrolHelisBlue] call blck_fnc_getNumberFromRange;
//_chancePara = [blck_chanceParaBlue] call blck_fnc_getNumberFromRange;
};
case "red":{
_noChoppers = [blck_noPatrolHelisRed] call blck_fnc_getNumberFromRange;
//_chancePara = [blck_chanceParaRed] call blck_fnc_getNumberFromRange;
};
case "green":{
_noChoppers = [blck_noPatrolHelisGreen] call blck_fnc_getNumberFromRange;
//_chancePara = [blck_chanceParaGreen] call blck_fnc_getNumberFromRange;
};
case "orange":{
_noChoppers = [blck_noPatrolHelisOrange] call blck_fnc_getNumberFromRange;
//_chancePara = [blck_chanceParaOrange] call blck_fnc_getNumberFromRange;
};
};
#ifdef blck_debugMode
diag_log format["_dynamicUMSspawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara];
#endif
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["_dynamicUMSspawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara]};
#endif
if (_noChoppers > 0) then
{
for "_i" from 1 to (_noChoppers) do
{
//params["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"];
_temp = [_coords,_aiDifficultyLevel,_weaponList,_uniforms,_headGear,_chancePara] call blck_fnc_spawnMissionReinforcements;
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
{
diag_log format["dynamicUMSspawner(334):: blck_fnc_spawnMissionReinforcements call for chopper # %1 out of a total of %2 choppers",_i, _noChoppers];
diag_log format["dynamicUMSspawner(335):: _temp = %1",_temp];
};
#endif
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
_objects pushback (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
};
if (_abort) then
if (random(1) < _chanceHeliPatrol) then
{
//#define spawnHeli true
//_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;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
if (blck_debugLevel >= 2) then
{
diag_log "dynamicUMSspawner:: (349) grpNul or ERROR in blck_fnc_spawnMissionReinforcements, mission termination criteria met, calling blck_endMission";
diag_log format["dynamicUMSspawner(334):: blck_fnc_spawnMissionHeli call for chopper # %1 out of a total of %2 choppers",_i, _noChoppers];
diag_log format["dynamicUMSspawner(335):: _temp = %1",_temp];
};
#endif
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission;
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
{
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log "dynamicUMSspawner:: (349) grpNul or ERROR in blck_fnc_spawnMissionReinforcements, mission termination criteria met, calling blck_endMission"};
#endif
_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
@ -494,7 +441,17 @@ diag_log format["[blckeagls] mission Spawner(436) _endCondition = %1",_endCondit
private["_missionComplete","_endIfPlayerNear","_endIfAIKilled"];
_missionComplete = -1;
_startTime = diag_tickTime;
if (blck_showCountAliveAI) then
{
//diag_log format["_dynamicUMSspawner(441): Adding Number Alive AI: _marker = %1 | _markerMissionName = %2",_marker,_markerMissionName];
//diag_log format["_dynamicUMSspawner(442): Alive AI = %1 | Current Marker Text = %2",{alive _x} count _blck_AllMissionAI, markerText _marker];
if !(_marker isEqualTo "") then
{
[_marker,_markerMissionName,_blck_AllMissionAI] call blck_fnc_updateMarkerAliveCount;
blck_missionMarkers pushBack [_marker,_markerMissionName,_blck_AllMissionAI];
//diag_log format["_dynamicUMSspawner: blck_missionMarkers = %1",blck_missionMarkers];
};
};
switch (_endCondition) do
{
case "playerNear": {_endIfPlayerNear = true;_endIfAIKilled = false;};
@ -517,12 +474,16 @@ private _crateStolen = false;
#ifdef blck_debugMode
diag_log format["dynamicUMSspawner(462):: Waiting for player to satisfy mission end criteria of _endIfPlayerNear %1 with _endIfAIKilled %2",_endIfPlayerNear,_endIfAIKilled];
#endif
_fn_crateMoved = {
params["_crate"];
private _result = (_x distance (_x getVariable["crateSpawnPos",[0,0,0]])) > 10;
//diag_log format["_fn_crateMoved:: _result = %1",_result];
_result;
if (blck_showCountAliveAI) then
{
if !(_marker isEqualTo "") then
{
[_marker,_markerMissionName,_blck_AllMissionAI] call blck_fnc_updateMarkerAliveCount;
blck_missionMarkers pushBack [_marker,_markerMissionName,_blck_AllMissionAI];
};
};
_missionComplete = -1;
while {_missionComplete isEqualTo -1} do
{
@ -530,21 +491,57 @@ while {_missionComplete isEqualTo -1} do
if ((_endIfPlayerNear) && [_locations,10,true] call blck_fnc_playerInRangeArray) exitWith {};
if ((_endIfAIKilled) && ({alive _x} count _blck_AllMissionAI) < 1) exitWith {};
if (_spawnCratesTiming isEqualTo "atMissionSpawn") then
{
if ({[_x] call _fn_crateMoved} count _crates > 0) exitWith
{
_missionComplete = 1;
_crateStolen = true;
};
}forEach _crates;
if ({[_x] call blck_fnc_crateMoved} count _crates > 0) exitWith
{
_missionComplete = 1;
_crateStolen = true;
};
}forEach _crates;
};
//diag_log format["dynamicUMSspawner:: (483) missionCompleteLoop - > players near = %1 and ai alive = %2 and crates stolen = %3",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAI, _crateStolen];
uiSleep 4;
};
if (_crateStolen) exitWith
{
diag_log format["dynamicUMSspawner:: (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];
//diag_log format["dynamicUMSspawner:: (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,_mission,2,isScubaMission] 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_dynamicUMSspawner (531): _crates = %1", _crates]};
#endif
if (blck_cleanUpLootChests) then
{
_objects append _crates;
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log format["[blckeagls] dynamicUMSspawner:: (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
{

View File

@ -1,8 +1,7 @@
/*
Generic Mission Spawner
Dynamic Underwater Mission Spawner
By Ghostrider GRG
Copyright 2016
Last modified 12/14/17
--------------------------
License
@ -13,31 +12,94 @@
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#define isScubaMission true
private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups"];
#define delayTime 1
private ["_abort","_crates","_aiGroup","_objects","_mines","_blck_AllMissionAI","_blck_localMissionMarker",
"_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups","_loadCratesTiming","_spawnCratesTiming","_assetSpawned",
"_blck_AllMissionAI","_delayTime","_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_marker"];
params["_coords","_mission",["_allowReinforcements",false]];
//diag_log format["_missionSpawner (18):: _allowReinforcements = %1",_allowReinforcements];
////////
// 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[_missionListOrange,_pathOrange,"OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange];
_markerClass = _mission;
_aiDifficultyLevel = _difficulty; // _difficulty is defined in the mission description file. see \addons\custom_server\Missions\UMS\dynamicMissions\default.sqf for an example
diag_log format["[blckeagls] missionSpawner (34):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
private["_chanceHeliPatrol","_noPara","_reinforcementLootCounts","_chanceLoot","_heliCrew","_loadCratesTiming"];
diag_log format["[blckeagls Dynamic UMS] dynamicUMSspawner (34):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
if (isNil "_markerColor") then {_markerColor = "ColorBlack"};
if (isNil "_markerType") then {_markerType = ["mil_box",[]]};
//if (isNil "_timeOut") then {_timeOut = -1;};
if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn";
if (isNil "_missionGroups") then {_missionGroups = []};
private["_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"];
if (isNil "_endCondition") then {_endCondition = blck_missionEndCondition = "playerNear"; // 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 "_useMines") then {_useMines = blck_useMines;};
if (isNil "_weaponList") then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (isNil "_sideArms") then {_sideArms = blck_Pistols};
if (isNil "_vests") then {_vests = blck_vests};
if (isNil "_backpacks") then {_backpacks = blck_backpacks};
//diag_log format["_fnc_missionSpawner: -> blck_backpacks = %1", blck_backpacks];
//diag_log format["_fnc_missionSpawner: -> _backpacks = %1",_backpacks];
if (isNil "_uniforms") then {_uniforms = blck_SkinList};
if (isNil "_headGear") then {_headgear = blck_headgear};
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 = 0};
if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;};
if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Blue};
if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed};
_objects = [];
_mines = [];
@ -52,26 +114,23 @@ _groupPatrolRadius = 50;
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;
[_blck_localMissionMarker] call blck_fnc_spawnMarker;
_marker = [_blck_localMissionMarker] call blck_fnc_spawnMarker;
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (91) message players and spawn a mission marker";};
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (77) waiting for player to trigger the mission";};
if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (91) message players and spawn a mission marker";};
if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (77) 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
// All parameters are defined, let's wait until a player is nearby or the mission has timed out
////////
private["_wait","_missionStartTime","_playerInRange","_missionTimedOut"];
_missionStartTime = diag_tickTime;
_playerInRange = false;
_missionTimedOut = false;
@ -79,14 +138,13 @@ _missionTimedOut = false;
_wait = true;
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (90) starting mission trigger loop"};
if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (90) starting mission trigger loop"};
if (blck_debugLevel > 2) then {_wait = false};
#endif
while {_wait} do
{
#ifdef blck_debugMode
//diag_log "missionSpawner:: top of mission trigger loop";
if (blck_debugLevel > 2) exitWith {_playerInRange = true;};
#endif
@ -106,20 +164,13 @@ while {_wait} do
if (_missionTimedOut) exitWith
{
/*
*/
// Deal with the case in which the mission timed out.
//["timeOut",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers;
blck_priorDynamicUMS_Missions pushback [_coords,diag_tickTime];
blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords];
blck_missionsRunning = blck_missionsRunning - 1;
blck_UMS_ActiveDynamicMissions = blck_UMS_ActiveDynamicMissions - [_coords];
blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning - 1;
blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning - 1;
[_blck_localMissionMarker select 0] call blck_fnc_deleteMarker;
//_blck_localMissionMarker set [1,[0,0,0]];
//_blck_localMissionMarker set [2,""];
[_objects, 0.1] spawn blck_fnc_cleanupObjects;
#ifdef blck_debugMode
@ -140,7 +191,6 @@ if (blck_debugLevel > 0) then
};
#endif
private ["_temp"];
if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate
{
_temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates;
@ -150,13 +200,13 @@ if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crat
};
};
uiSleep _delayTime;
uiSleep delayTime;
if (_useMines) then
{
_mines = [_coords] call blck_fnc_spawnMines;
//uiSleep _delayTime;;
};
uiSleep _delayTime;
uiSleep delayTime;
_temp = [];
//diag_log format["_dynamicUMSspawner"" _missionLandscape = %1 | _missionLandscapeMode = %2",_missionLandscape, _missionLandscapeMode];
if (_missionLandscapeMode isEqualTo "random") then
@ -183,7 +233,7 @@ if (blck_debugLevel > 0) then
};
#endif
uiSleep _delayTime;;
uiSleep delayTime;;
_temp = [_coords,_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles;
//uisleep 1;
@ -198,31 +248,39 @@ _temp = [[],[],false];
// AI could be spawned on a platform or floating structure.
if (count _missionGroups > 0) then
{
_temp = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear,_missionGroups] call blck_fnc_spawnMissionAI;
// 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]];
_temp = [_coords, _minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false] call blck_fnc_spawnMissionAI;
};
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {
if (blck_debugLevel > 2) then
{
diag_log format["dynamicUMSspawner :: (209) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1;
};
_abort = _temp select 1;
if (blck_debugLevel > 2) then {
if (blck_debugLevel > 2) then
{
diag_log format["dynamicUMSspawner :: (214) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1;
};
#endif
//diag_log format["_fnc_dynamicUMSspawner: spawning scuba groups with _scubaGroupParameters = %1",_scubaGroupParameters];
// params["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear],"_missionGroups",["weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]];
_temp = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,_scubaGroupParameters,blck_UMS_weapons,blck_UMS_vests,isScubaMission] call blck_fnc_spawnMissionAI;
if (count _scubaGroupParameters > 0) then
{
//diag_log format["_fnc_dynamicUMSspawner: spawning scuba groups with _scubaGroupParameters = %1",_scubaGroupParameters];
// 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]];
_temp = [_coords, _minNoAI,_maxNoAI,_scubaGroupParameters,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnMissionAI;
};
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {
if (blck_debugLevel > 2) then
{
diag_log format["dynamicUMSspawner :: (209) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1;
};
_abort = _temp select 1;
if (blck_debugLevel > 2) then {
if (blck_debugLevel > 2) then
{
diag_log format["dynamicUMSspawner :: (214) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1;
};
#endif
@ -258,9 +316,8 @@ _vehToSpawn = 0;
// Spawn any surface patrols
if (blck_useVehiclePatrols && count _vehiclePatrolParameters > 0) then
{
// params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear","_missionPatrolVehicles",["_useRelativePos",true],["_weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]];
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vehiclePatrolParameters,true /*,blck_UMS_weapons,blck_UMS_vests,isScubaMission*/ ] call blck_fnc_spawnMissionVehiclePatrols;
//[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols;
// 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]];
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_vehiclePatrolParameters,true,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false /*,blck_UMS_weapons,blck_UMS_vests,isScubaMission*/ ] call blck_fnc_spawnMissionVehiclePatrols;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {
diag_log format["dynamicUMSspawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp];
@ -288,8 +345,8 @@ if (blck_useVehiclePatrols && count _vehiclePatrolParameters > 0) then
// Spawn any submarine patrols
if (blck_useVehiclePatrols && count _submarinePatrolParameters > 0) then
{
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_submarinePatrolParameters,true,blck_UMS_weapons,blck_UMS_vests,isScubaMission] call blck_fnc_spawnMissionVehiclePatrols;
//[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols;
// 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]];
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_submarinePatrolParameters,true,_uniforms,_headGear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnMissionVehiclePatrols;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {
diag_log format["dynamicUMSspawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp];
@ -326,78 +383,40 @@ if (_abort) exitWith
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission;
};
uiSleep _delayTime;
uiSleep delayTime;
_temp = [[],[],false];
_abort = false;
if (_allowReinforcements) then
{
_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout;
_temp = [];
_noChoppers = [_noChoppers] call blck_fnc_getNumberFromRange;
_noPara = [_noPara] call blck_fnc_getNumberFromRange;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["[blckeagls] dynamicUMSspawner:: (298) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
private _noChoppers = 0;
private _chancePara = 0;
switch (toLower _aiDifficultyLevel) do
{
case "blue":{
_noChoppers = [blck_noPatrolHelisBlue] call blck_fnc_getNumberFromRange;
//_chancePara = [blck_chanceParaBlue] call blck_fnc_getNumberFromRange;
};
case "red":{
_noChoppers = [blck_noPatrolHelisRed] call blck_fnc_getNumberFromRange;
//_chancePara = [blck_chanceParaRed] call blck_fnc_getNumberFromRange;
};
case "green":{
_noChoppers = [blck_noPatrolHelisGreen] call blck_fnc_getNumberFromRange;
//_chancePara = [blck_chanceParaGreen] call blck_fnc_getNumberFromRange;
};
case "orange":{
_noChoppers = [blck_noPatrolHelisOrange] call blck_fnc_getNumberFromRange;
//_chancePara = [blck_chanceParaOrange] call blck_fnc_getNumberFromRange;
};
};
#ifdef blck_debugMode
diag_log format["_dynamicUMSspawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara];
#endif
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["_dynamicUMSspawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara]};
#endif
if (_noChoppers > 0) then
{
for "_i" from 1 to (_noChoppers) do
{
//params["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"];
_temp = [_coords,_aiDifficultyLevel,_weaponList,_uniforms,_headGear,_chancePara] call blck_fnc_spawnMissionReinforcements;
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;
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
{
diag_log format["dynamicUMSspawner(334):: blck_fnc_spawnMissionReinforcements call for chopper # %1 out of a total of %2 choppers",_i, _noChoppers];
diag_log format["dynamicUMSspawner(335):: _temp = %1",_temp];
};
#endif
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
_objects pushback (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
};
if (_abort) then
{
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
if (typeName _temp isEqualTo "ARRAY") then
{
diag_log "dynamicUMSspawner:: (349) grpNul or ERROR in blck_fnc_spawnMissionReinforcements, mission termination criteria met, calling blck_endMission";
_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;
};
#endif
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] 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
@ -410,7 +429,8 @@ _noEmplacedToSpawn = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange;
if (blck_useStatic && ((_noEmplacedToSpawn > 0)) || count _missionEmplacedWeapons > 0) then
{
// params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"];
_temp = [_missionEmplacedWeapons,_noEmplacedToSpawn,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
//_temp = [_missionEmplacedWeapons,_noEmplacedToSpawn,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
_temp = [_coords,_missionEmplacedWeapons,true,_noEmplacedToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
@ -458,21 +478,45 @@ if (_abort) exitWith
};
uiSleep _delayTime;
if (count _missionLootBoxes > 0) then
if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then
{
_crates = [_coords,_missionLootBoxes,_loadCratesTiming] call blck_fnc_spawnMissionCrates;
}
else
{
_crates = [_coords,[[selectRandom blck_UMS_crates,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming] call blck_fnc_spawnMissionCrates;
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 (blck_cleanUpLootChests) then
{
_objects append _crates;
};
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;
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 2;
#ifdef blck_debugMode
@ -491,13 +535,13 @@ _missionComplete = -1;
_startTime = diag_tickTime;
if (blck_showCountAliveAI) then
{
//diag_log format["_missionSpawner(441): Adding Number Alive AI: _marker = %1 | _markerMissionName = %2",_marker,_markerMissionName];
//diag_log format["_missionSpawner(442): Alive AI = %1 | Current Marker Text = %2",{alive _x} count _blck_AllMissionAI, markerText _marker];
//diag_log format["_dynamicUMSspawner(441): Adding Number Alive AI: _marker = %1 | _markerMissionName = %2",_marker,_markerMissionName];
//diag_log format["_dynamicUMSspawner(442): Alive AI = %1 | Current Marker Text = %2",{alive _x} count _blck_AllMissionAI, markerText _marker];
if !(_marker isEqualTo "") then
{
[_marker,_markerMissionName,_blck_AllMissionAI] call blck_fnc_updateMarkerAliveCount;
blck_missionMarkers pushBack [_marker,_markerMissionName,_blck_AllMissionAI];
//diag_log format["_missionSpawner: blck_missionMarkers = %1",blck_missionMarkers];
//diag_log format["_dynamicUMSspawner: blck_missionMarkers = %1",blck_missionMarkers];
};
};
switch (_endCondition) do
@ -522,12 +566,17 @@ private _crateStolen = false;
#ifdef blck_debugMode
diag_log format["dynamicUMSspawner(462):: Waiting for player to satisfy mission end criteria of _endIfPlayerNear %1 with _endIfAIKilled %2",_endIfPlayerNear,_endIfAIKilled];
#endif
_fn_crateMoved = {
params["_crate"];
private _result = (_x distance (_x getVariable["crateSpawnPos",[0,0,0]])) > 10;
//diag_log format["_fn_crateMoved:: _result = %1",_result];
_result;
if (blck_showCountAliveAI) then
{
if !(_marker isEqualTo "") then
{
[_marker,_markerMissionName,_blck_AllMissionAI] call blck_fnc_updateMarkerAliveCount;
blck_missionMarkers pushBack [_marker,_markerMissionName,_blck_AllMissionAI];
};
};
private _spawnPara = if (random(1) < _chancePara) then {true} else {false};
_missionComplete = -1;
while {_missionComplete isEqualTo -1} do
{
@ -535,21 +584,81 @@ while {_missionComplete isEqualTo -1} do
if ((_endIfPlayerNear) && [_locations,10,true] call blck_fnc_playerInRangeArray) exitWith {};
if ((_endIfAIKilled) && ({alive _x} count _blck_AllMissionAI) < 1) exitWith {};
if (_spawnCratesTiming isEqualTo "atMissionSpawn") then
{
if ({[_x] call _fn_crateMoved} count _crates > 0) exitWith
{
_missionComplete = 1;
_crateStolen = true;
};
}forEach _crates;
if ({[_x] call blck_fnc_crateMoved} count _crates > 0) exitWith
{
_missionComplete = 1;
_crateStolen = true;
};
}forEach _crates;
};
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,true] 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;
};
};
};
};
};
//diag_log format["dynamicUMSspawner:: (483) missionCompleteLoop - > players near = %1 and ai alive = %2 and crates stolen = %3",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAI, _crateStolen];
uiSleep 4;
};
if (_crateStolen) exitWith
{
diag_log format["dynamicUMSspawner:: (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];
//diag_log format["dynamicUMSspawner:: (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,_mission,2,isScubaMission] 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_dynamicUMSspawner (531): _crates = %1", _crates]};
#endif
if (blck_cleanUpLootChests) then
{
_objects append _crates;
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log format["[blckeagls] dynamicUMSspawner:: (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
{
@ -561,8 +670,16 @@ if (blck_debugLevel > 0) then
private["_result"];
// Force passing the mission name for informational purposes.
_blck_localMissionMarker set [2, _markerMissionName];
// params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_aborted",false],["_vehicles",[]],["_isScubaMission",false]];
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;
};
// params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_endCondition",0],["_vehicles",[]],["_isScubaMission",false]];
_result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,0,_missionAIVehicles,isScubaMission] call blck_fnc_endMission;
//diag_log format["[blckeagls] dynamicUMSspawner:: (559) end of mission: blck_fnc_endMission has returned control to _fnc_dynamicUMSspawner"];
#ifdef blck_debugMode
diag_log format["[blckeagls] dynamicUMSspawner:: (559) end of mission: blck_fnc_endMission has returned control to _fnc_dynamicUMSspawner"];
#endif

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
Copyright 2016
--------------------------
License
--------------------------
@ -12,7 +11,7 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
// ["B_SDV_01_F",[22584.9,15304.8,-6.14801],"red",4, 75,0],
params["_SDV","_pos","_difficulty","_numAI","_patrolRadius","_respawnTime"];
diag_log format["_fnc_spawnSDVPatrol: _this = %1",_this];
//diag_log format["_fnc_spawnSDVPatrol: _this = %1",_this];
private["_vehicle","_group","_diveDepth"];
_group = [_pos,_numAI,_numAI,_difficulty,_pos,_patrolRadius - 2,_patrolRadius,blck_UMS_uniforms,blck_UMS_headgear,true,blck_UMS_weapons,blck_UMS_vests,true] call blck_fnc_spawnGroup;

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
Copyright 2016
--------------------------
License
--------------------------
@ -17,8 +16,8 @@ params["_pos",["_skillLevel","red"],["_numUnits",6],["_patrolRadius",15]];
//diag_log format["_fnc_spawnScubaGroup: _this = %1",_this];
private["_group","_diveDepth"];
_group = grpNull;
// params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true],["_weaponList",[]],["_vests",blck_vests],["_scuba",false] ];
_group = [_pos,_numUnits,_numUnits,_skillLevel,_pos, _patrolRadius - 2, _patrolRadius, blck_UMS_uniforms, blck_UMS_headgear, configureWaypoints, blck_UMS_weapons, blck_UMS_vests, isScubaGroup] call blck_fnc_spawnGroup;
//params["_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",20], ["_maxDist",35],["_configureWaypoints",true], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_scuba",false] ];
_group = [_pos,_pos,_numUnits,_numUnits,_skillLevel, _patrolRadius - 2, _patrolRadius, configureWaypoints, blck_UMS_uniforms, blck_UMS_headgear, blck_UMS_vests, [], blck_UMS_weapons, [], isScubaGroup] call blck_fnc_spawnGroup;
//diag_log format["_fnc_spawnScubaGroup (14): -> value returned for group = %1",_group];
private _waterDepth = [_pos] call blck_fnc_findWaterDepth;
_diveDepth = _waterDepth * 0.5;
@ -36,4 +35,4 @@ if (blck_debugLevel > 1) then
diag_log format["_fnc_spawnScubaGroup:: -->> group spawned = %1",_group];
};
#endif
_group;
_group;

View File

@ -1,8 +1,7 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
Copyright 2016
--------------------------
License
--------------------------
@ -13,7 +12,7 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
// ["B_SDV_01_F",[22584.9,15304.8,-6.14801],"red",4, 75,0],
params["_SDV","_pos","_difficulty","_numAI","_patrolRadius","_respawnTime"];
diag_log format["_fnc_spawnSurfacePatrol: _this = %1",_this];
//diag_log format["_fnc_spawnSurfacePatrol: _this = %1",_this];
private["_vehicle"];
_group = [_pos,_numAI,_numAI,_difficulty,_pos,_patrolRadius - 2,_patrolRadius,blck_UMS_uniforms,blck_UMS_headgear,true,blck_UMS_weapons,blck_UMS_vests,true] call blck_fnc_spawnGroup;
// params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]];

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
Copyright 2016
--------------------------
License
--------------------------

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
Copyright 20167
--------------------------
License
--------------------------

View File

@ -1,7 +1,6 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/17
Copyright 2016
--------------------------
License
--------------------------

View File

@ -0,0 +1,17 @@
#define tMin 600
#define tMax 900
params["_pos","_mission","_startTime"];
private["_dynamicMissions"];
_dynamicMissions = + blck_UMS_dynamicMissions;
{
if (diag_tickTime > _timeAdded + round( tMin + (tMax - tMin) ) then
{
_pos = _x select 0;
_mission = _x select 1;
_timeAdded = _x select 2;
blck_UMS_dynamicMissions = blck_UMS_dynamicMissions - _x;
_pos call compileFinal preprocessFileLineNumbers format["q\addons\custom_server\Missions\UMS\dynamicMissions\%1.sqf",_mission];
};
} forEach _dynamicMissions;

View File

@ -11,7 +11,7 @@ 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.
_difficulty = "red"; // Skill level of AI (blue, red, green etc)
diag_log format["[blckeagls UMS missions] STARTED initializing dynamic mission %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty];
//diag_log format["[blckeagls UMS missions] STARTED initializing dynamic mission %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty];
_crateLoot = blck_BoxLoot_Orange; // You can use a customized _crateLoot configuration by defining an array here. It must follow the following format shown for a hypothetical loot array called _customLootArray
/*
_customLootArray =
@ -68,7 +68,7 @@ _missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output her
// where _customlootcountsarray1 also follows the same format as the predefined arrays like blck_lootCountsRed
// ["Box_NATO_Ammo_F",[22893,16766.8,6.31652],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts],
//["Exile_Container_SupplyBox",[1.91016,-3.85352,-3.54709],0,[true,false], _crateLoot, _lootCounts]
[selectRandom blck_UMS_crates,[0,0,0],_crateLoot, _lootCounts]
//[selectRandom blck_UMS_crates,[0,0,0],_crateLoot, _lootCounts]
]; // If this array is empty a single loot chest will be added at the center. If you add items loot chest(s) will be spawned in specific positions.
@ -101,7 +101,7 @@ _scubaGroupParameters = [
// These are surface patrols.
_vehiclePatrolParameters = [
// ["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]],
["B_T_Boat_Armed_01_minigun_F",[2,2,0],0]
["B_Boat_Armed_01_minigun_F",[2,2,0],0]
//["B_T_Boat_Transport_01_F",[16.7676,43.083,-0.00134277],"red",4, 75,60]
]; //[ ["vehicleClassName",[px,py,pz] /* center of patrol area */, difficulty /* blue, red etc*/, patrol radius] ]
// When this array is empty, vehicle patrols will be scattered randomely around the mission.
@ -140,8 +140,32 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Blue;
// These are defined here because they are needed for any calls used to spawn non-scuba AI
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_endCondition = "playerNear";
diag_log "[blckeagls] initialized variables for dynamic UMS mission default.sqf";
diag_log format["[blckeagls static missions] COMPLETED initializing mission %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty];
_spawnCratesTiming = "atMissionEndAir"; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir".
// Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute.
// This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission.
_loadCratesTiming = "atMissionSpawn"; // valid choices are "atMissionCompletion" and "atMissionSpawn";
// Pertains only to crates spawned at mission spawn.
// This sets the default but can be overridden for specific missions by defining _loadCratesTiming
// Examples:
// To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn"
// To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion"
// To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned.
// To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned.
_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults
_noChoppers = blck_noPatrolHelisBlue;
_missionHelis = blck_patrolHelisBlue;
_chancePara = 0.9999990; // Setting this in the mission file overrides the defaults
_noPara = 3; // Setting this in the mission file overrides the defaults
_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0.
_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot.
_chanceLoot = 0.999999990;
_paraLoot = blck_BoxLoot_Blue;
_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission.
#include "\q\addons\custom_server\Missions\UMS\code\GMS_fnc_spawnDynamicUMSMission.sqf";

View File

@ -3,6 +3,16 @@
See the accompanying example mission in the exampleMission folder to get an idea how I laid this out.
Note that I laid out the mission in EDEN editor, exported the mission using the exportAll function of M3EDEN editor. then copied, pasted and apporpriately edidet the specific categories of items to be spawned.
*/
/*
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/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_mission","_missionCenter"];

View File

@ -3,9 +3,19 @@
See the accompanying example mission in the exampleMission folder to get an idea how I laid this out.
Note that I laid out the mission in EDEN editor, exported the mission using the exportAll function of M3EDEN editor. then copied, pasted and apporpriately edidet the specific categories of items to be spawned.
*/
/*
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/
*/
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_mission","_missionCenter"];
"_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_mission","_missionCenter"];
_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.
@ -82,6 +92,7 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Red; // Modified as needed; can be a num
// or _noEmplacedWeapons = 3; // a constant number of emplaced weps per misison
// Note that this value is ignored if you define static weapon positions and types in the array below.
_missionEmplacedWeapons = [
// ["Weapon class name", position[xy,z], AI Difficulty [blue, red, green, orange], patrol radius [0 for static weapons], seconds to wait before respawning (set to 0 to disable respawns)]
//["B_G_Mortar_01_F",[22867.3,16809.1,3.17968],"red",0,0],
//["B_HMG_01_high_F",[22944.3,16820.5,3.14243],"green",0,0]
];
@ -98,7 +109,7 @@ _aiGroupParameters = [
];
_aiScubaGroupParameters = [
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/]
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, seconds to wait after all units killed before respawning the group (set to 0 to disable respawns)]
//[[22584.9,15304.8,-4.27578],"red",4, 75,0],
[[22613.5,15269.1,-4.28332],"red",3, 75,900],
[[22549,15288.9,0],"red",3, 75,900]
@ -106,22 +117,23 @@ _aiScubaGroupParameters = [
_noVehiclePatrols = blck_SpawnVeh_Red; // Modified as needed; can be a numberic value (e.g. 3) or range presented as [2,4];
// Note that this value is ignored if you define vehicle patrols in the array below.
_vehiclePatrolParameters = [
//["B_T_Boat_Transport_01_F",[22570.1,15235.3,-4.49949],"red",4, 75,60],
//["B_T_Boat_Armed_01_minigun_F",[22578.6,15273.3,-0.0354593],"red",3, 75,0]
//["Vehicle Class Name",Position [22570.1,15235.3,-4.49949],AI Difficulty "red",4 (Units to spawn into vehicle), 75 (radius of patrol area),60 (seconds to wait after all units dead before respawning)],
["B_T_Boat_Armed_01_minigun_F",[22578.6,15273.3,-0.0354593],"red",3, 75,0]
]; //[ ["vehicleClassName",[px,py,pz] /* center of patrol area */, difficulty /* blue, red etc*/, patrol radius] ]
// When this array is empty, vehicle patrols will be scattered randomely around the mission.
// Allows you to define the location of the center of the patrol, vehicle type spawned, radius to patrol, and AI difficulty (blue, red, green etc).
_submarinePatrolParameters = [
//["B_SDV_01_F",[22584.9,15304.8,-1],"red",4, 75,0],
//["B_SDV_01_F",[22609.9,15299.8,-1],"red",3, 75,0]
////["Vehicle Class Name",Position [22570.1,15235.3,-4.49949],AI Difficulty "red",4 (Units to spawn into vehicle), 75 (radius of patrol area),60 (seconds to wait after all units dead before respawning)],
["B_SDV_01_F",[22609.9,15299.8,-1],"red",3, 75,0]
];
_aircraftTypes = blck_patrolHelisRed; // You can use one of the pre-defined lists in blck_configs or your own custom array.
_noAirPatrols = blck_noPatrolHelisRed; // You can use one of the pre-defined values or a custom one. acceptable values are integers (1,2,3) or a range such as [2,4];
// Note: this value is ignored if you specify air patrols in the array below.
_airPatrols = [
//["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,0],
//["Vehicle Class Name",Position [22570.1,15235.3,-4.49949],AI Difficulty "red", 75 (radius of patrol area),60 (seconds to wait after all units dead before respawning)],
["Exile_Chopper_Huey_Armed_Green",[22578.4,15273,50],"red",1000,0] //,
//[selectRandom _aircraftTypes,_missionCenter,"green",1000,0]
];

View File

@ -0,0 +1,6 @@
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
"_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks","_chancePara","_noPara","_chanceHeliPatrol","_noChoppers","_missionHelis",
"__noChoppers","_endCondition","_chanceHeliLootDropped","_chanceLoot","_paraTriggerDistance","_paraLootCounts","_paraLoot","_markerColor","_loadCratesTiming",
"_markerType","_useMines","_assetKilledMsg","_enemyLeaderConfig","_hostageConfig"];

View File

@ -57,6 +57,14 @@ blck_worldSet = nil;
diag_log "[blckeagls] Loading Mission Lists";
#include "\q\addons\custom_server\Missions\GMS_missionLists.sqf";
#ifdef GRGserver
//start the dynamic loot crate system
[] execVM "\q\addons\custom_server\DLS\DLS_init.sqf";
waitUntil {(isNil "blck_DLSComplete") isEqualTo false;};
waitUntil{blck_DLSComplete};
blck_DLSComplete = nil;
#endif
// Load any user-defined specifications or overrides
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_custom_config.sqf";
@ -93,6 +101,9 @@ if (blck_spawnStaticLootCrates) then
diag_log "[blckeagls] SLS:: -- >> Static Loot Spawner disabled";
};
#ifdef GRGserver
diag_log "[blckegls] Running GhostriderGaming Version";
#endif
#ifdef useDynamicSimulation
diag_log "[blckegls] dynamic simulation manager enabled";
#else
@ -121,6 +132,26 @@ if (blck_enableBlueMissions > 0) then
[_missionListBlue,_pathBlue,"BlueMarker","blue",blck_TMin_Blue,blck_TMax_Blue,blck_enableBlueMissions] call blck_fnc_addMissionToQue;
};
#ifdef GRGserver
if (blck_enableScoutsMissions > 0) then
{
//[_missionListScouts,_pathScouts,"ScoutsMarker","red",blck_TMin_Scouts,blck_TMax_Scouts] spawn blck_fnc_missionTimer;
[_missionListScouts,_pathScouts,"ScoutsMarker","red",blck_TMin_Scouts,blck_TMax_Scouts,blck_enableScoutsMissions,false] call blck_fnc_addMissionToQue;
};
if (blck_enableHunterMissions > 0) then
{
//[_missionListHunters,_pathHunters,"HunterMarker","green",blck_TMin_Hunter,blck_TMax_Hunter] spawn blck_fnc_missionTimer;
// params["_missionList","_path","_marker","_difficulty","_tMin","_tMax","_noMissions"];
[_missionListHunters,_pathHunters,"HunterMarker","green",blck_TMin_Hunter,blck_TMax_Hunter,blck_enableHunterMissions,false] call blck_fnc_addMissionToQue;
};
// Running new version of Crash sites.
if (blck_maxCrashSites > 0) then
{
[] execVM "\q\addons\custom_server\Missions\HeliCrashs\Crashes2.sqf";
};
#endif
blck_modType = call blck_fnc_getModType;
publicVariable "blck_modType";
// start the main thread for the mission system which monitors missions running and stuff to be cleaned up

View File

@ -1,6 +1,6 @@
private ["_version","_versionDate"];
blck_version = "6.81 Build 124";
blck_version = "6.81 Build 126";
_blck_version = blck_version;
_blck_versionDate = "4-3-18 7:00 AM";
_blck_versionDate = "4-16-18 7:00 AM";
blck_pvs_version = _blck_version;
publicVariable blck_pvs_version;

View File

@ -1,80 +1,48 @@
#define hideOnUse true
#define hideOnUse false
#define showWindow true
GMS_fnc_nextAnimation = {
_hostage = _this;
_hostage switchMove "";
//uisleep 0.1;
_animations = _hostage getVariable["GMSAnimations",[""]];
diag_log format["_fnc_nextAnimation: _hostage = %1 and _animations = %2",_hostage,_animations];
_hostage switchMove (selectRandom _animations);
_animations = _hostage getVariable["GMSAnimations",[]];
diag_log format["_fnc_nextAnimation: _hostage = %1 and _animationa = %2",_hostage,_animationa];
_hostage switchMove (selectRandom (_animations))
};
GMS_EH_onAnimationDone = {
diag_log format["GMS_EH_onAnimationDone: _this = %1",_this];
private _hostage = _this select 0;
if (alive _hostage) then
if (alive _this) then
{
diag_log format["GMS_EH_onAnimationDone: _animations = %1",_hostage getVariable["GMSAnimations",[""]]];
_hostage call GMS_fnc_nextAnimation;
diag_log format["GMS_EH_onAnimationDone: _animations = %1",_animations];
_this call GMS_fnc_nextAnimation;
} else {
_hostage removeAllEventHandlers "AnimDone";
_this removeAllEventHandlers "AnimDone";
};
};
GMS_fnc_freeHostage = {
diag_log format["fn_freeHostage: _this = %1",_this];
private _hostage = _this select 0;
_hostage setVariable["blck_AIState",1,true];
private _msg = "_fnc_freeHostage <Hostage Rescued>";
_this setVariable["blck_AIState","rescued",true];
_msg = "Hostage Rescued";
systemChat _msg;
hint _msg;
diag_log _msg;
//_hostage move (position _hostage) getPos [1000, random(360)];
};
GMS_fnc_addHostageActions = {
private _hostage = _this;
//private _handle = _hostage addAction ["Free Hostage",{_this call GMS_fnc_freeHostage}]; //,[],1,showWindow,hideOnUse,(alive _hostage)];
private _handle = _hostage addAction ["Free Hostage",{_this call GMS_fnc_freeHostage},[],1,showWindow,hideOnUse]; //,"",{alive _target}]; //,"", (alive _target)];
private _handle = _hostage addAction ["Free Hostage",{_this call GMS_fnc_freeHostage}]; //,[],1,showWindow,hideOnUse,(alive _hostage)];
};
GMS_fnc_addAssetAnimations = {
private _asset = _this;
_asset addEventHandler ["AnimDone", {_this call GMS_EH_onAnimationDone}];
_asset call GMS_fnc_nextAnimation;
diag_log format["_fnc_addAssetAnimations: Animation and event handler added for asset %1",_asset];
GMS_fnc_addHostageAnimations = {
private _hostage = _this;
_hostage addEventHandler ["AnimDone", {_this call GMS_EH_onAnimationDone}];
_hostage call GMS_fnc_nextAnimation;
};
GMS_fnc_initHostage = {
private _hostage = _this;
if (blck_modType isEqualTo "Epoch") then {_hostage call GMS_fnc_addHostageActions};
_hostage call GMS_fnc_addAssetAnimations;
diag_log format["_fnc_initHostage: hostage %1 initialized",_hostage];
_hostage call GMS_fnc_addHostageActions;
_hostage call GMS_fnc_addHostageAnimations;
};
GMS_fnc_arrestLeader = {
diag_log format["GMS_fnc_arrestLeader: _this = %1",_this];
private _leader = _this select 0;
_leader setVariable["blck_AIState",1,true];
private _msg = "_fnc_arrestLeader: <Leader Arrested>";
systemChat _msg;
hint _msg;
diag_log _msg;
};
GMS_fnc_addLeaderActions = {
private _leader = _this;
private _handle = _leader addAction ["Under Arrest",{_this call GMS_fnc_arrestLeader},[],1,showWindow,hideOnUse]; //,"",{alive _target}]; //,"", (alive _target)];
};
GMS_fnc_initLeader = {
private _leader = _this;
if (blck_modType isEqualTo "Epoch") then {_leader call GMS_fnc_addLeaderActions};
_leader call GMS_fnc_addAssetAnimations;
diag_log format["_fnc_initLeader: Leader %1 initialized",_leader];
};
if !(isServer) then
{
//diag_log "[blckeagls] initializing client variables";
@ -119,52 +87,6 @@ if !(isServer) then
[parseText _msg2,[0.0823437 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.0812109 * safezoneW,0.253 * safezoneH], nil, 7, 0.3, 0] spawn BIS_fnc_textTiles;
};
fn_dynamicWarning = {
private["_text","_screentime","_xcoord","_ycoord"];
params["_mission","_message"];
waitUntil {blck_processingMsg < 0};
blck_processingMsg = 1;
_screentime = 7;
_text = format[
"<t align='left' size='1.0' color='#B22222'>%1</t><br/><br/>
<t align='left' size='0.6' color='#F0F0F0'>%2</t><br/>",
_mission,_message
];
_ycoord = [safezoneY + safezoneH - 0.8,0.7];
_xcoord = [safezoneX + safezoneW - 0.5,0.35];
[_text,_xcoord,_ycoord,_screentime,0.5] spawn BIS_fnc_dynamicText;
uiSleep 3; // 3 second delay before the next message
blck_processingMsg = -1;
};
fn_missionWarning = {
params["_event","_message","_mission"];
if (blck_useSystemChat) then {systemChat format["%1",_message];};
if (blck_useHint) then {
hint parseText format[
"<t align='center' size='2.0' color='#B22222'>%1</t><br/>
<t size='1.5' color='#B22222'>______________</t><br/><br/>
<t size='1.5' color='#ffff00'>%2</t><br/>
<t size='1.5' color='#F0F0F0'>______________</t><br/><br/>
<t size='1.5' color='#F0F0F0'>Any loot you find is yours as payment for eliminating the threat!</t>",_mission,_message
];
};
if (blck_useDynamic) then {
[_mission,_message] call fn_dynamicWarning;
};
if (blck_useTitleText) then {
[_message] spawn {
params["_msg"];
titleText [_msg, "PLAIN DOWN",5];uiSleep 5; titleText ["", "PLAIN DOWN",5]
};
};
if (blck_useToast) then
{
["InfoTitleAndText", [_mission, _message]] call ExileClient_gui_toaster_addTemplateToast;
};
//diag_log format["_fn_missionNotification ====] Paremeters _event %1 _message %2 _mission %3",_event,_message,_mission];
};
fn_dynamicNotification = {
private["_text","_screentime","_xcoord","_ycoord"];
params["_mission","_message"];
@ -283,13 +205,9 @@ if !(isServer) then
{
[_message select 0, _message select 1, _message select 2] call fn_killScoreNotification;
};
case "warning":
{
[_event,_message,_mission] spawn fn_missionWarning;
};
};
};
diag_log "blck client loaded ver 4/2/18 for Version 6.81 8 PM";
diag_log "blck client loaded ver 1/11/17 2.0 8 PM";
};

View File

@ -1,80 +1,48 @@
#define hideOnUse true
#define hideOnUse false
#define showWindow true
GMS_fnc_nextAnimation = {
_hostage = _this;
_hostage switchMove "";
//uisleep 0.1;
_animations = _hostage getVariable["GMSAnimations",[""]];
diag_log format["_fnc_nextAnimation: _hostage = %1 and _animations = %2",_hostage,_animations];
_hostage switchMove (selectRandom _animations);
_animations = _hostage getVariable["GMSAnimations",[]];
diag_log format["_fnc_nextAnimation: _hostage = %1 and _animationa = %2",_hostage,_animationa];
_hostage switchMove (selectRandom (_animations))
};
GMS_EH_onAnimationDone = {
diag_log format["GMS_EH_onAnimationDone: _this = %1",_this];
private _hostage = _this select 0;
if (alive _hostage) then
if (alive _this) then
{
diag_log format["GMS_EH_onAnimationDone: _animations = %1",_hostage getVariable["GMSAnimations",[""]]];
_hostage call GMS_fnc_nextAnimation;
diag_log format["GMS_EH_onAnimationDone: _animations = %1",_animations];
_this call GMS_fnc_nextAnimation;
} else {
_hostage removeAllEventHandlers "AnimDone";
_this removeAllEventHandlers "AnimDone";
};
};
GMS_fnc_freeHostage = {
diag_log format["fn_freeHostage: _this = %1",_this];
private _hostage = _this select 0;
_hostage setVariable["blck_AIState",1,true];
private _msg = "_fnc_freeHostage <Hostage Rescued>";
_this setVariable["blck_AIState","rescued",true];
_msg = "Hostage Rescued";
systemChat _msg;
hint _msg;
diag_log _msg;
//_hostage move (position _hostage) getPos [1000, random(360)];
};
GMS_fnc_addHostageActions = {
private _hostage = _this;
//private _handle = _hostage addAction ["Free Hostage",{_this call GMS_fnc_freeHostage}]; //,[],1,showWindow,hideOnUse,(alive _hostage)];
private _handle = _hostage addAction ["Free Hostage",{_this call GMS_fnc_freeHostage},[],1,showWindow,hideOnUse]; //,"",{alive _target}]; //,"", (alive _target)];
private _handle = _hostage addAction ["Free Hostage",{_this call GMS_fnc_freeHostage}]; //,[],1,showWindow,hideOnUse,(alive _hostage)];
};
GMS_fnc_addAssetAnimations = {
private _asset = _this;
_asset addEventHandler ["AnimDone", {_this call GMS_EH_onAnimationDone}];
_asset call GMS_fnc_nextAnimation;
diag_log format["_fnc_addAssetAnimations: Animation and event handler added for asset %1",_asset];
GMS_fnc_addHostageAnimations = {
private _hostage = _this;
_hostage addEventHandler ["AnimDone", {_this call GMS_EH_onAnimationDone}];
_hostage call GMS_fnc_nextAnimation;
};
GMS_fnc_initHostage = {
private _hostage = _this;
if (blck_modType isEqualTo "Epoch") then {_hostage call GMS_fnc_addHostageActions};
_hostage call GMS_fnc_addAssetAnimations;
diag_log format["_fnc_initHostage: hostage %1 initialized",_hostage];
_hostage call GMS_fnc_addHostageActions;
_hostage call GMS_fnc_addHostageAnimations;
};
GMS_fnc_arrestLeader = {
diag_log format["GMS_fnc_arrestLeader: _this = %1",_this];
private _leader = _this select 0;
_leader setVariable["blck_AIState",1,true];
private _msg = "_fnc_arrestLeader: <Leader Arrested>";
systemChat _msg;
hint _msg;
diag_log _msg;
};
GMS_fnc_addLeaderActions = {
private _leader = _this;
private _handle = _leader addAction ["Under Arrest",{_this call GMS_fnc_arrestLeader},[],1,showWindow,hideOnUse]; //,"",{alive _target}]; //,"", (alive _target)];
};
GMS_fnc_initLeader = {
private _leader = _this;
if (blck_modType isEqualTo "Epoch") then {_leader call GMS_fnc_addLeaderActions};
_leader call GMS_fnc_addAssetAnimations;
diag_log format["_fnc_initLeader: Leader %1 initialized",_leader];
};
if !(isServer) then
{
//diag_log "[blckeagls] initializing client variables";
@ -119,52 +87,6 @@ if !(isServer) then
[parseText _msg2,[0.0823437 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.0812109 * safezoneW,0.253 * safezoneH], nil, 7, 0.3, 0] spawn BIS_fnc_textTiles;
};
fn_dynamicWarning = {
private["_text","_screentime","_xcoord","_ycoord"];
params["_mission","_message"];
waitUntil {blck_processingMsg < 0};
blck_processingMsg = 1;
_screentime = 7;
_text = format[
"<t align='left' size='1.0' color='#B22222'>%1</t><br/><br/>
<t align='left' size='0.6' color='#F0F0F0'>%2</t><br/>",
_mission,_message
];
_ycoord = [safezoneY + safezoneH - 0.8,0.7];
_xcoord = [safezoneX + safezoneW - 0.5,0.35];
[_text,_xcoord,_ycoord,_screentime,0.5] spawn BIS_fnc_dynamicText;
uiSleep 3; // 3 second delay before the next message
blck_processingMsg = -1;
};
fn_missionWarning = {
params["_event","_message","_mission"];
if (blck_useSystemChat) then {systemChat format["%1",_message];};
if (blck_useHint) then {
hint parseText format[
"<t align='center' size='2.0' color='#B22222'>%1</t><br/>
<t size='1.5' color='#B22222'>______________</t><br/><br/>
<t size='1.5' color='#ffff00'>%2</t><br/>
<t size='1.5' color='#F0F0F0'>______________</t><br/><br/>
<t size='1.5' color='#F0F0F0'>Any loot you find is yours as payment for eliminating the threat!</t>",_mission,_message
];
};
if (blck_useDynamic) then {
[_mission,_message] call fn_dynamicWarning;
};
if (blck_useTitleText) then {
[_message] spawn {
params["_msg"];
titleText [_msg, "PLAIN DOWN",5];uiSleep 5; titleText ["", "PLAIN DOWN",5]
};
};
if (blck_useToast) then
{
["InfoTitleAndText", [_mission, _message]] call ExileClient_gui_toaster_addTemplateToast;
};
//diag_log format["_fn_missionNotification ====] Paremeters _event %1 _message %2 _mission %3",_event,_message,_mission];
};
fn_dynamicNotification = {
private["_text","_screentime","_xcoord","_ycoord"];
params["_mission","_message"];
@ -283,13 +205,9 @@ if !(isServer) then
{
[_message select 0, _message select 1, _message select 2] call fn_killScoreNotification;
};
case "warning":
{
[_event,_message,_mission] spawn fn_missionWarning;
};
};
};
diag_log "blck client loaded ver 4/2/18 for Version 6.81 8 PM";
diag_log "blck client loaded ver 1/11/17 2.0 8 PM";
};

View File

@ -8,17 +8,26 @@ Ideas or code from that by Vampire and KiloSwiss have been used for certain func
Significant Changes:
=====================
Version 1.81 Build 124.
Version 1.81 Build 126 (EXPERIMENTAL).
Added: Support for hostage rescue missions.
The hostage can be spawned at any location relative to the mission center.
The mission aborts if the hostage is killed; all loot is deleted.
To complete the mission, a player must approach the hostage and execute the rescue action.
The hostage then runs away, and loot becomes available to the player.
See missions\blue\Default3.sqf for an example mission.
***** PLEASE READ - IMPORTANT ****
Please update the blck_client.sqf in your mission.pbo or you will not be able to interact with or see animations of the new AI characters.
Added: Support for Arrest Leader missions.
These are similar to the rescue hostage mission except that the leader, when arrested, will sites
awaiting arrival of imaginary survivor forces.
See missions\blue\Default4.sqf for an example mission
Added: blck_missionEndCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
which provides a simple way to define the default condtions under which the mission ends.
You can of course define _endCondition in the specific mission file if you wish.
Added: blck_spawnCratesTiming = "atMissionEndAir"; // Choices: "atMissionSpawnGround","atMissionStartAir","atMissionEndGround","atMissionEndAir".
Crates can be spawned on the ground at mission start or at mission end either on the ground or in the air.
Added: Crates spawn with tabs or crypto. set the values in the mod-specific configs.
@ -26,13 +35,53 @@ Added: support for hostages/leaders(who must be arrested) (work in progress). Yo
Note - you need to update blck_client in your mission.pbo to use this mission mode.
Added: Additional documentation for those who wish to design their own missions.
See \missions\blue\default.sqf and default2.sqf for details.
Added: greater control over AI loadouts.
For land-based dynamic missions you can now specify for each mission:
Uniforms
Headgear
Vests
Weapons allowed
Sidearms allows.
(See \Missions\Blue\default2.sqf for examples).
[Still to do: upgrade statics for the same functionality; doable but will require adding these parameters to the spawn info for the groups of infantry, vehicle, submerged and air units];
Added: greater control of mission helis - you can now set variables in the mission file (see examples below).
when these are not defined in the mission file, defaults are used.
_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults
_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults
_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults
_noChoppers = blck_noPatrolHelisBlue;
_missionHelis = blck_patrolHelisBlue;
Added: default minimun and maximum radius for groups to patrol.
blck_minimumPatrolRadius = 22; // AI will patrol within a circle with radius of approximately min-max meters. note that because of the way waypoints are completed they may more more or less than this distance.
blck_maximumPatrolRadius = 35;
Changed: **** VERY IMPORTANT ******
The definitions of private variables used in missions in now read in through an include statement (see Missions\Blue\default.sqf for an example)
Please update any custom mission you have generated accordingly.
This should save quite a bit of editing going forward.
Please not that if you do not update the private variables definitions list certain features of the mission spawner may not work due to issues with scope of variables.
Changed: Logic for spawning paratroops was redone so it is more clear.
when helis are spawned the paratroops will spawn at the heli location when it spawns based on probability set in _chancePara in the mission file or the default for that mission difficulty.
When no helies are to be spawned, paratroops will spawn at the mission center when it spawns based on probability set in _chancePara in the mission file or the default for that mission difficulty.
Changed: Each mission is now compiled at server startup.
A few variables that were not used were eliminated.
Some declarations of private variables were consolidated.
Together these changes should be worth a small performance bump.
Changed: Code for Heli Patrols redone.
Code that spawns paratroops moved to a separate function that is called when a player is whithin a certain radius of the mission.
Code that spawns a supplemental loot chest added - this will be spawned along with the paratroop reinforcements, if desired.
This crate can have customized loot (think ammo, building supplies, tools and food, ala Exile airdrops).
Changed: Methods for detecting NULL Groups (rarely a problem with arma these days) simplified.
GMS_fnc_missionSpawner redone using a single test for the _abort flag to save repeated calls for debugging and endMission.
This could be done with try/catch as well.
Fixed: disabled some logging that is not required except when debugging.
Fixed: AI Counts were not being shown at dynamic UMS.
Fixed: AI were glitching through walls.
Fixed: Emplaced weapons are spawned at correct locations when their positions are defined in an array in the mission file.
Version 1.80 Build 118
Added: you can now determine whether objects spawned at dynamic missions have simulation or damage enabled.