Merge branch 'Experimental'
This commit is contained in:
commit
571a65f1e9
@ -21,10 +21,11 @@ switch (toLower worldName) do
|
|||||||
case "taviana": {_mapCenter = [12000,12000,0];_maxDistance = 12000};
|
case "taviana": {_mapCenter = [12000,12000,0];_maxDistance = 12000};
|
||||||
case "napf" : {_mapCenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");_maxDistance = 12000};
|
case "napf" : {_mapCenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");_maxDistance = 12000};
|
||||||
case "lythium": {_mapCenter = [10000,10000,0]; _maxDistance = 6000;};
|
case "lythium": {_mapCenter = [10000,10000,0]; _maxDistance = 6000;};
|
||||||
|
case "vt7": {_mapCenter = [9000,9000,0]; _maxDistance = 9000};
|
||||||
default {_mapCenter = [6000,6000,0]; _maxDistance = 6000;};
|
default {_mapCenter = [6000,6000,0]; _maxDistance = 6000;};
|
||||||
};
|
};
|
||||||
|
|
||||||
_evaluate = true;
|
private _evaluate = true;
|
||||||
while {_evaluate} do
|
while {_evaluate} do
|
||||||
{
|
{
|
||||||
_waterPos = [
|
_waterPos = [
|
||||||
@ -35,33 +36,14 @@ _evaluate = true;
|
|||||||
2, // water mode [2 = water only]
|
2, // water mode [2 = water only]
|
||||||
25, // max gradient
|
25, // max gradient
|
||||||
0 // shoreMode [0 = anywhere]
|
0 // shoreMode [0 = anywhere]
|
||||||
] call BIS_fnc_findSafePos;
|
] call BIS_fnc_findSafePos;
|
||||||
/*
|
|
||||||
_priorUMSpositions = +blck_priorDynamicUMS_Missions;
|
if (((getTerrainHeightASL _waterPos) < -4) && (getTerrainHeightASL _waterPos) > -10) then
|
||||||
{
|
{
|
||||||
if (diag_tickTime > ((_x select 1) + 1800) then
|
_evaluate = false;
|
||||||
{
|
|
||||||
blck_priorDynamicUMS_Missions = blck_priorDynamicUMS_Missions - _x;
|
|
||||||
} else {
|
|
||||||
if (_waterPos distance2D (_x select 0) < 2000) exitWith {_evaluate = false};
|
|
||||||
};
|
|
||||||
} forEach _priorUMSpositions;
|
|
||||||
*/
|
|
||||||
if (_evaluate) then
|
|
||||||
{
|
|
||||||
if (abs(getTerrainHeightASL _waterPos) < 30) then
|
|
||||||
{
|
|
||||||
if (abs(getTerrainHeightASL _waterPos) > 1) then
|
|
||||||
{
|
|
||||||
//_waterMarker = createMarker [format["water mission %1",getTerrainHeightASL _waterPos],_waterPos];
|
|
||||||
//_waterMarker setMarkerColor "ColorRed";
|
|
||||||
//_waterMarker setMarkerType "mil_triangle";
|
|
||||||
//_waterMarker setMarkerText format["Depth %1",getTerrainHeightASL _waterPos];
|
|
||||||
_evaluate = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
//diag_log format["_findShoreLocation: _waterPos = %1",_waterPos];
|
||||||
_waterPos
|
_waterPos
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ if (toLower(blck_modType) isEqualTo "default") exitWith {};
|
|||||||
|
|
||||||
params["_obj",["_money",-1]];
|
params["_obj",["_money",-1]];
|
||||||
_money = ([_money] call blck_fnc_getNumberFromRange);
|
_money = ([_money] call blck_fnc_getNumberFromRange);
|
||||||
if (blck_debugLevel >= 3) then {[format["_fnc_addmoneyToObject: _money = %1 _obj = %2",_money,_obj]] call blck_fnc_log};
|
//if (blck_debugLevel >= 3) then {[format["_fnc_addmoneyToObject: _money = %1 _obj = %2",_money,_obj]] call blck_fnc_log};
|
||||||
if !(_money <= 0) then
|
if !(_money <= 0) then
|
||||||
{
|
{
|
||||||
switch(toLower(blck_modType)) do
|
switch(toLower(blck_modType)) do
|
||||||
|
@ -12,11 +12,11 @@ for "_i" from 1 to (count blck_temporaryMarkers) do
|
|||||||
{
|
{
|
||||||
if (_i > (count blck_temporaryMarkers)) exitWith {};
|
if (_i > (count blck_temporaryMarkers)) exitWith {};
|
||||||
private _m = blck_temporaryMarkers deleteAt 0;
|
private _m = blck_temporaryMarkers deleteAt 0;
|
||||||
_m params["_marker","_deleteAt"];
|
_m params[["_marker",""],["_deleteAt",0]];
|
||||||
if (diag_tickTime > _deleteAt) then
|
if (diag_tickTime > _deleteAt) then
|
||||||
{
|
{
|
||||||
deleteMarker _marker;
|
deleteMarker _marker;
|
||||||
} else {
|
} else {
|
||||||
blck_temporaryMarkers pushBack _m;
|
blck_temporaryMarkers pushBack _m;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -61,4 +61,4 @@ if (toUpper(_markerType) in ["ELLIPSE","RECTANGLE"]) then // not an Icon ....
|
|||||||
//diag_log format["_fnc_createMarkers: case of ICON: _markers = %1",_markers];
|
//diag_log format["_fnc_createMarkers: case of ICON: _markers = %1",_markers];
|
||||||
};
|
};
|
||||||
|
|
||||||
_markers
|
_markers
|
@ -99,6 +99,7 @@ while { !_validspot} do
|
|||||||
_count = _count - 1;
|
_count = _count - 1;
|
||||||
_slope = _slope + 0.02;
|
_slope = _slope + 0.02;
|
||||||
uiSleep 0.1; // to give the server a chance to handle other jobs for a moment
|
uiSleep 0.1; // to give the server a chance to handle other jobs for a moment
|
||||||
|
diag_log format["_findSafePosn: _count = %1 | _slope = %2 | _coords = %3",_count,_slope,_coords];
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
//uiSleep 1;
|
//uiSleep 1;
|
||||||
@ -175,6 +176,7 @@ while { !_validspot} do
|
|||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//diag_log format["_fnc_findSafePosn: _coords = %1 | _flatCoords = %2 | _searchCenter = %3 | _angle %4 | _count = %5 | _validSpot = %6",_coords,_flatCoords,_searchCenter,_angle,_count,_validspot];
|
//diag_log format["_fnc_findSafePosn: _coords = %1 | _flatCoords = %2 | _searchCenter = %3 | _angle %4 | _count = %5 | _validSpot = %6",_coords,_flatCoords,_searchCenter,_angle,_count,_validspot];
|
||||||
};
|
};
|
||||||
|
|
@ -0,0 +1,179 @@
|
|||||||
|
// self explanatory. Checks to see if the position is in either a black listed location or near a player spawn.
|
||||||
|
// As written this relies on BIS_fnc_findSafePos to ensure that the spawn point is not on water or an excessively steep slope.
|
||||||
|
//
|
||||||
|
/*
|
||||||
|
for ghostridergaming
|
||||||
|
By Ghostrider [GRG]
|
||||||
|
Copyright 2016
|
||||||
|
--------------------------
|
||||||
|
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 _startTime = diag_tickTime;
|
||||||
|
private _minDistFromBases = blck_minDistanceToBases;
|
||||||
|
private _minDistFromMission = blck_MinDistanceFromMission;
|
||||||
|
private _minDistanceFromTowns = blck_minDistanceFromTowns;
|
||||||
|
private _minDistanceFromPlayers = blck_minDistanceToPlayer;
|
||||||
|
|
||||||
|
private _weightBlckList = 0.95;
|
||||||
|
private _weightBases = 0.9;
|
||||||
|
private _weightMissions = 0.8;
|
||||||
|
private _weightTowns = 0.7;
|
||||||
|
private _weightPlayers = 0.6;
|
||||||
|
private _weightRecentMissions = 0.6;
|
||||||
|
private _minDistanceRecentMissions = 500;
|
||||||
|
|
||||||
|
// remove any recent mission locations that have timed out
|
||||||
|
for "_i" from 1 to (count blck_recentMissionCoords) do
|
||||||
|
{
|
||||||
|
if (_i > (count blck_recentMissionCoords)) exitWith {};
|
||||||
|
private _oldMission = blck_recentMissionCoords deleteAt 0;
|
||||||
|
if (diag_tickTime < ((_oldMission select 1) + 900)) then
|
||||||
|
{
|
||||||
|
blck_recentMissionCoords pushBack _oldMission;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
private _waterMode = 0;
|
||||||
|
private _shoreMode = 0;
|
||||||
|
private _maxGrad = 0.20;
|
||||||
|
private _minObjDist = 30;
|
||||||
|
private _searchDist = blck_mapRange / 2;
|
||||||
|
private _coords = [];
|
||||||
|
private _findNew = true;
|
||||||
|
private _tries = 0;
|
||||||
|
|
||||||
|
while {_coords isEqualTo []} do
|
||||||
|
{
|
||||||
|
_findNew = false;
|
||||||
|
_coords = [];
|
||||||
|
// [center, minDist, maxDist, objDist, waterMode, maxGrad, shoreMode, blacklistPos, defaultPos] call BIS_fnc_findSafePos
|
||||||
|
while {_coords isEqualTo [] && _tries < 500} do
|
||||||
|
{
|
||||||
|
private _searchCenter = blck_mapCenter getPos[_searchDist, random(359)];
|
||||||
|
_coords = [_searchCenter,0,_searchDist,_minObjDist,_waterMode,_maxGrad,_shoreMode] call BIS_fnc_findSafePos;
|
||||||
|
_tries = _tries + 1;
|
||||||
|
//[format["_fnc_findSafePosn(57): _tries = %1 | _coords = %2",_tries,_coords]] call blck_fnc_log;
|
||||||
|
};
|
||||||
|
|
||||||
|
{
|
||||||
|
//diag_log format["_fnc_findSafePosn(67): _recentMissionCoords %1 = %2",_forEachIndex,_x];
|
||||||
|
if (((_x select 0) distance2D _coords) < _minDistanceRecentMissions) then
|
||||||
|
{
|
||||||
|
_findNew = true;
|
||||||
|
if (blck_debugLevel >= 3) then {[format["_findSafePosn(68): too close to recent missions"]] call blck_fnc_log};
|
||||||
|
};
|
||||||
|
}forEach blck_recentMissionCoords;
|
||||||
|
|
||||||
|
//diag_log format["_fnc_findSafePosn (61): _coords = %1 | _tries = %2 | count blck_locationBlackList = %1",_coords,_tries, count blck_locationBlackList];
|
||||||
|
{
|
||||||
|
|
||||||
|
//diag_log format["_fnc_findSafePosn (77): location _x = %1",_x];
|
||||||
|
if ( ((_x select 0) distance2D _coords) < (_x select 1)) exitWith
|
||||||
|
{
|
||||||
|
_findNew = true;
|
||||||
|
if (blck_debugLevel >= 3) then {[format["_findSafePosn(77): too close to blacklisted position _coords = %1 | blacklisted pos = %2 | dist to blacklisted pos = %3",_coords,_x select 0, _x select 1]] call blck_fnc_log};
|
||||||
|
};
|
||||||
|
} forEach blck_locationBlackList;
|
||||||
|
|
||||||
|
if !(_findNew) then
|
||||||
|
{
|
||||||
|
{
|
||||||
|
if ( (_x distance2D _coords) < _minDistFromMission) exitWith
|
||||||
|
{
|
||||||
|
_findNew = true;
|
||||||
|
if (blck_debugLevel >= 3) then {[format["_findSafePosn(87): too close to active mission"]] call blck_fnc_log};
|
||||||
|
};
|
||||||
|
} forEach blck_ActiveMissionCoords;
|
||||||
|
};
|
||||||
|
|
||||||
|
if !(_findNew) then
|
||||||
|
{
|
||||||
|
private _poles = [];
|
||||||
|
if (blck_modType isEqualTo "Epoch") then {_poles = allMissionObjects "PlotPole_EPOCH"};
|
||||||
|
if (blck_modType isEqualTo "Exile") then {_poles = allMissionObjects "Exile_Construction_Flag_Static"};
|
||||||
|
//diag_log format["_fnc_findSafePosn: count _poles = %1 | _poles = %2",count _poles,_poles];
|
||||||
|
{
|
||||||
|
if ((_x distance2D _coords) < blck_minDistanceToBases) then
|
||||||
|
{
|
||||||
|
_findNew = true;
|
||||||
|
if (blck_debugLevel >= 3) then {[format["_findSafePosn(98): too close to bases"]] call blck_fnc_log};
|
||||||
|
};
|
||||||
|
}forEach _poles;
|
||||||
|
};
|
||||||
|
|
||||||
|
if !(_findNew) then
|
||||||
|
{
|
||||||
|
{
|
||||||
|
_townPos = [((locationPosition _x) select 0), ((locationPosition _x) select 1), 0];
|
||||||
|
if (_townPos distance2D _coords < blck_minDistanceFromTowns) exitWith {
|
||||||
|
_findNew = true;
|
||||||
|
if (blck_debugLevel >= 3) then {[format["_findSafePosn(109): too close to towns/cities"]] call blck_fnc_log};
|
||||||
|
};
|
||||||
|
} forEach blck_townLocations;
|
||||||
|
};
|
||||||
|
|
||||||
|
if !(_findNew) then
|
||||||
|
{
|
||||||
|
{
|
||||||
|
if (isPlayer _x && (_x distance2D _coords) < blck_minDistanceToPlayer) then
|
||||||
|
{
|
||||||
|
_findNew = true;
|
||||||
|
if (blck_debugLevel >= 3) then {[format["_findSafePosn(120): too close to player"]] call blck_fnc_log};
|
||||||
|
};
|
||||||
|
}forEach playableUnits;
|
||||||
|
};
|
||||||
|
|
||||||
|
if !(_findNew) then
|
||||||
|
{
|
||||||
|
// test for water nearby
|
||||||
|
for [{_i=0}, {_i<360}, {_i=_i+20}] do
|
||||||
|
{
|
||||||
|
//_xpos = (_coords select 0) + sin (_i) * _dist;
|
||||||
|
//_ypos = (_coords select 1) + cos (_i) * _dist;
|
||||||
|
//_newPos = [_xpos,_ypos,0];
|
||||||
|
if (surfaceIsWater (_coords getPos[50,_i])) exitWith
|
||||||
|
{
|
||||||
|
_findNew = true;
|
||||||
|
if (blck_debugLevel >= 3) then {[format["_findSafePosn(137): too close to water"]] call blck_fnc_log};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if !(_findNew) then {
|
||||||
|
_isflat = _coords isFlatEmpty [20,0,0.5,100,0,false];
|
||||||
|
if (_isflat isequalto []) then {
|
||||||
|
_findNew = true;
|
||||||
|
if (blck_debugLevel >= 3) then {[format["_findSafePosn(146): position NOT flat"]] call blck_fnc_log};
|
||||||
|
} else {
|
||||||
|
if (blck_debugLevel >= 3) then {[format["_findSafePosn(150): _coords changed from %1 to %2 (the flattest)",_coords,_isFlat]] call blck_fnc_log};
|
||||||
|
_coords = ASLToATL _isFlat;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_findNew) then
|
||||||
|
{
|
||||||
|
_minDistFromMission = _minDistFromMission * _weightMissions;
|
||||||
|
_minDistFromBases = _minDistFromBases * _weightBases;
|
||||||
|
_minDistanceFromPlayers = _minDistanceFromPlayers * _weightPlayers;
|
||||||
|
_minDistanceFromTowns = _minDistanceFromTowns * _weightTowns;
|
||||||
|
_minDistanceRecentMissions = _minDistanceRecentMissions * _weightRecentMissions;
|
||||||
|
_coords = [];
|
||||||
|
};
|
||||||
|
[format["_fnc_findSafePosn(140) end of cycle logging: _tries = %1 | _coords = %2 | _findNew = %3",_tries,_coords,_findNew]] call blck_fnc_log;
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((count _coords) > 2) then
|
||||||
|
{
|
||||||
|
private["_temp"];
|
||||||
|
_temp = [_coords select 0, _coords select 1];
|
||||||
|
_coords = _temp;
|
||||||
|
};
|
||||||
|
[format["_fnc_findSafePosn(148) final logging: _elapsedTime %3 | _tries = %1 | _coords = %2",_tries,_coords,diag_tickTime - _startTime]] call blck_fnc_log;
|
||||||
|
_coords;
|
||||||
|
|
||||||
|
|
@ -11,27 +11,32 @@
|
|||||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||||
|
|
||||||
private["_timer1sec","_timer5sec","_timer10Sec","_timer20sec","_timer5min","_timer5min"];
|
private["_timer1sec","_timer5sec","_timer10Sec","_timer20sec","_timer5min","_timer5min"];
|
||||||
_timer1sec = diag_tickTime;
|
_timer2sec = diag_tickTime + 2;
|
||||||
_timer5sec = diag_tickTime;
|
_timer5sec = diag_tickTime + 5;
|
||||||
_timer10Sec = diag_tickTime;
|
_timer10Sec = diag_tickTime + 10;
|
||||||
_timer20sec = diag_tickTime;
|
_timer20sec = diag_tickTime + 20;
|
||||||
_timer1min = diag_tickTime;
|
_timer1min = diag_tickTime + 10;
|
||||||
_timer5min = diag_tickTime;
|
_timer5min = diag_tickTime + 300;
|
||||||
|
|
||||||
while {true} do
|
while {true} do
|
||||||
{
|
{
|
||||||
uiSleep 1;
|
uiSleep 1;
|
||||||
if (diag_tickTime > _timer1sec) then
|
|
||||||
|
if (diag_tickTime > _timer2sec) then
|
||||||
{
|
{
|
||||||
[] spawn blck_fnc_monitorInitializedMissions;
|
//if !(blck_initializationInProgress) then
|
||||||
|
|
||||||
|
[] spawn blck_fnc_monitorInitializedMissions;
|
||||||
|
|
||||||
if (blck_showCountAliveAI) then
|
if (blck_showCountAliveAI) then
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
_x call blck_fnc_updateMarkerAliveCount;
|
_x call blck_fnc_updateMarkerAliveCount;
|
||||||
} forEach blck_missionLabelMarkers;
|
} forEach blck_missionLabelMarkers;
|
||||||
};
|
};
|
||||||
_timer1sec = diag_tickTime + 1;
|
_timer2sec = diag_tickTime + 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (diag_tickTime > _timer5sec) then
|
if (diag_tickTime > _timer5sec) then
|
||||||
{
|
{
|
||||||
_timer5sec = diag_tickTime + 5;
|
_timer5sec = diag_tickTime + 5;
|
||||||
@ -46,18 +51,16 @@ while {true} do
|
|||||||
{
|
{
|
||||||
[] call blck_fnc_spawnPendingMissions;
|
[] call blck_fnc_spawnPendingMissions;
|
||||||
_timer10Sec = diag_tickTime;
|
_timer10Sec = diag_tickTime;
|
||||||
};
|
|
||||||
if (diag_tickTime > _timer20sec) then
|
|
||||||
{
|
|
||||||
[] call blck_fnc_scanForPlayersNearVehicles;
|
[] call blck_fnc_scanForPlayersNearVehicles;
|
||||||
[] call GMS_fnc_cleanupTemporaryMarkers;
|
[] call GMS_fnc_cleanupTemporaryMarkers;
|
||||||
[] call GMS_fnc_updateCrateSignals;
|
[] call GMS_fnc_updateCrateSignals;
|
||||||
_timer20sec = diag_tickTime + 20;
|
_timer20sec = diag_tickTime + 20;
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((diag_tickTime > _timer1min)) then
|
if ((diag_tickTime > _timer1min)) then
|
||||||
{
|
{
|
||||||
_timer1min = diag_tickTime + 60;
|
_timer1min = diag_tickTime + 10;
|
||||||
|
[] call blck_fnc_restoreHiddenObjects;
|
||||||
[] call blck_fnc_groupWaypointMonitor;
|
[] call blck_fnc_groupWaypointMonitor;
|
||||||
[] call blck_fnc_cleanupAliveAI;
|
[] call blck_fnc_cleanupAliveAI;
|
||||||
[] call blck_fnc_cleanupObjects;
|
[] call blck_fnc_cleanupObjects;
|
||||||
@ -68,15 +71,29 @@ while {true} do
|
|||||||
};
|
};
|
||||||
if (diag_tickTime > _timer5min) then
|
if (diag_tickTime > _timer5min) then
|
||||||
{
|
{
|
||||||
[format["Timstamp %8 |Dynamic Missions Running %1 | UMS Running %2 | Vehicles %3 | Groups %4 | Server FPS %5 | Server Uptime %6 Min | Missions Run %7",
|
_activeScripts = diag_activeScripts;
|
||||||
blck_missionsRunning,
|
|
||||||
blck_dynamicUMS_MissionsRuning,
|
[
|
||||||
count blck_monitoredVehicles,
|
format["Timstamp %8 |Dynamic Missions Running %1 | Vehicles %2 | Groups %3 | Missions Run %4 | Server FPS %5 | Server Uptime %6 Min",
|
||||||
count blck_monitoredMissionAIGroups,
|
blck_missionsRunning,
|
||||||
diag_FPS,floor(diag_tickTime/60),
|
count blck_monitoredVehicles,
|
||||||
blck_missionsRun,
|
count blck_monitoredMissionAIGroups,
|
||||||
diag_tickTime]
|
blck_missionsRun,
|
||||||
|
diag_FPS,floor(diag_tickTime/60),
|
||||||
|
diag_tickTime
|
||||||
|
]
|
||||||
] call blck_fnc_log;
|
] call blck_fnc_log;
|
||||||
|
[
|
||||||
|
format["count diag_activeSQFScripts %1 | Threads [spawned %2, execVM %3] | monitorThreads %4",
|
||||||
|
count diag_activeSQFScripts,
|
||||||
|
_activeScripts select 0,
|
||||||
|
_activeScripts select 1,
|
||||||
|
blck_activeMonitorThreads
|
||||||
|
]
|
||||||
|
] call blck_fnc_log;
|
||||||
|
{
|
||||||
|
[format["file %1 | running %2",(_x select 1),(_x select 2)]] call blck_fnc_log;
|
||||||
|
} forEach diag_activeSQFScripts;
|
||||||
[] call blck_fnc_cleanEmptyGroups;
|
[] call blck_fnc_cleanEmptyGroups;
|
||||||
_timer5min = diag_tickTime + 300;
|
_timer5min = diag_tickTime + 300;
|
||||||
};
|
};
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
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";
|
||||||
|
|
||||||
|
|
||||||
|
for "_i" from 1 to (count blck_hiddenTerrainObjects) do
|
||||||
|
{
|
||||||
|
if (_i > (count blck_hiddenTerrainObjects)) exitWith {};
|
||||||
|
private _el = blck_hiddenTerrainObjects deleteAt 0;
|
||||||
|
_el params["_obj","_timeout"];
|
||||||
|
if (diag_tickTime > _timeOut) then
|
||||||
|
{
|
||||||
|
{_x hideObjectGlobal false} forEach _obj;
|
||||||
|
} else {
|
||||||
|
blck_hiddenTerrainObjects pushBack _el;
|
||||||
|
};
|
||||||
|
};
|
@ -19,13 +19,16 @@
|
|||||||
for "_i" from 1 to (count blck_oldMissionObjects) do {
|
for "_i" from 1 to (count blck_oldMissionObjects) do {
|
||||||
if (_i <= count blck_oldMissionObjects) then {
|
if (_i <= count blck_oldMissionObjects) then {
|
||||||
private _oldObjs = blck_oldMissionObjects deleteAt 0;
|
private _oldObjs = blck_oldMissionObjects deleteAt 0;
|
||||||
_oldObjs params ["_missionCenter","_objarr","_timer"];
|
_oldObjs params [["_missionCenter",[0,0,0]],["_objarr",[]],["_timer",0]];
|
||||||
if (diag_tickTime > _timer) then
|
if (diag_tickTime > _timer) then
|
||||||
{
|
{
|
||||||
private _nearplayer = [_missionCenter,800] call blck_fnc_nearestPlayers;
|
private _nearplayer = [_missionCenter,800] call blck_fnc_nearestPlayers;
|
||||||
if (_nearPlayer isEqualTo []) then
|
if (_nearPlayer isEqualTo []) then
|
||||||
{
|
{
|
||||||
{deleteVehicle _x}forEach _objarr;
|
{
|
||||||
|
if (typeName _x isEqualTo "OBJECT") then {deleteVehicle _x};
|
||||||
|
if (typeName _x isEqualTo "STRING") then {deleteVehicle (objectFromNetId _x)};
|
||||||
|
} forEach _objarr;
|
||||||
} else {
|
} else {
|
||||||
blck_oldMissionObjects pushback _oldObjs;
|
blck_oldMissionObjects pushback _oldObjs;
|
||||||
};
|
};
|
||||||
|
@ -15,9 +15,11 @@
|
|||||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp"
|
#include "\q\addons\custom_server\Configs\blck_defines.hpp"
|
||||||
|
|
||||||
_fn_missionCleanup = {
|
_fn_missionCleanup = {
|
||||||
params["_coords","_mines","_objects","_blck_AllMissionAI","_markerName","_cleanupAliveAITimer","_cleanupCompositionTimer",["_isScubaMission",false]];
|
params["_coords","_mines","_objects","_hiddenObjects","_blck_AllMissionAI","_markerName","_cleanupAliveAITimer","_cleanupCompositionTimer",["_isScubaMission",false]];
|
||||||
|
|
||||||
[_mines] call blck_fnc_clearMines;
|
[_mines] call blck_fnc_clearMines;
|
||||||
blck_oldMissionObjects pushback [_coords,_objects, (diag_tickTime + _cleanupCompositionTimer)];
|
blck_oldMissionObjects pushback [_coords,_objects, (diag_tickTime + _cleanupCompositionTimer)];
|
||||||
|
blck_hiddenTerrainObjects pushBack[_hiddenObjects,(diag_tickTime + _cleanupCompositionTimer)];
|
||||||
blck_liveMissionAI pushback [_coords,_blck_AllMissionAI, (diag_tickTime + _cleanupAliveAITimer)];
|
blck_liveMissionAI pushback [_coords,_blck_AllMissionAI, (diag_tickTime + _cleanupAliveAITimer)];
|
||||||
blck_missionsRunning = blck_missionsRunning - 1;
|
blck_missionsRunning = blck_missionsRunning - 1;
|
||||||
blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords];
|
blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords];
|
||||||
@ -42,6 +44,7 @@ params[
|
|||||||
"_coords",
|
"_coords",
|
||||||
"_mines",
|
"_mines",
|
||||||
"_objects",
|
"_objects",
|
||||||
|
"_hiddenObjects",
|
||||||
"_crates",
|
"_crates",
|
||||||
"_blck_AllMissionAI",
|
"_blck_AllMissionAI",
|
||||||
"_endMsg",
|
"_endMsg",
|
||||||
@ -68,13 +71,13 @@ switch (_endCondition) do
|
|||||||
if (local _x) then {deleteVehicle _x};
|
if (local _x) then {deleteVehicle _x};
|
||||||
}forEach _crates;
|
}forEach _crates;
|
||||||
|
|
||||||
[_coords,_mines,_objects,_blck_AllMissionAI,_markerName,cleanupAliveAITimer,cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
|
[_coords,_mines,_objects,_hiddenObjects,_blck_AllMissionAI,_markerName,cleanupAliveAITimer,cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
|
||||||
[format["Mission <TIMED OUT> | _coords %1 : _markerClass %2 : _markerMissionName %3",_coords,_markerName,_markerLabel]] call blck_fnc_log;
|
[format["Mission <TIMED OUT> | _coords %1 : _markerClass %2 : _markerMissionName %3",_coords,_markerName,_markerLabel]] call blck_fnc_log;
|
||||||
};
|
};
|
||||||
case 1: { // Normal End
|
case 1: { // Normal End
|
||||||
if (blck_useSignalEnd) then
|
if (blck_useSignalEnd) then
|
||||||
{
|
{
|
||||||
[_crates select 0] spawn blck_fnc_signalEnd;
|
[_crates select 0,150] spawn blck_fnc_signalEnd;
|
||||||
{
|
{
|
||||||
_x enableRopeAttach true;
|
_x enableRopeAttach true;
|
||||||
}forEach _crates;
|
}forEach _crates;
|
||||||
@ -102,7 +105,7 @@ switch (_endCondition) do
|
|||||||
};
|
};
|
||||||
} forEach _vehicles;
|
} forEach _vehicles;
|
||||||
|
|
||||||
[_coords,_mines,_objects,_blck_AllMissionAI,_markerName,blck_AliveAICleanUpTimer,blck_cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
|
[_coords,_mines,_objects,_hiddenObjects,_blck_AllMissionAI,_markerName,blck_AliveAICleanUpTimer,blck_cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
|
||||||
[format["Mission Completed | _coords %1 : _markerClass %2 : _markerMissionName %3",_coords,_markerName,_markerLabel]] call blck_fnc_log;
|
[format["Mission Completed | _coords %1 : _markerClass %2 : _markerMissionName %3",_coords,_markerName,_markerLabel]] call blck_fnc_log;
|
||||||
};
|
};
|
||||||
case 2: { // Aborted for moving a crate
|
case 2: { // Aborted for moving a crate
|
||||||
@ -112,7 +115,7 @@ switch (_endCondition) do
|
|||||||
} forEach _crates;
|
} forEach _crates;
|
||||||
#define illegalCrateMoveMsg "Crate moved before mission completed"
|
#define illegalCrateMoveMsg "Crate moved before mission completed"
|
||||||
[["warming",illegalCrateMoveMsg,_markerLabel]] call blck_fnc_messageplayers;
|
[["warming",illegalCrateMoveMsg,_markerLabel]] call blck_fnc_messageplayers;
|
||||||
[_coords,_mines,_objects,_blck_AllMissionAI,_markerName,cleanupAliveAITimer,cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
|
[_coords,_mines,_objects,_hiddenObjects,_blck_AllMissionAI,_markerName,cleanupAliveAITimer,cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
|
||||||
[format["Mission Aborted <CRATE MOVED> | _coords %1 : _markerClass %2 : _markerMissionName %3",_coords,_markerName,_markerLabel]] call blck_fnc_log;
|
[format["Mission Aborted <CRATE MOVED> | _coords %1 : _markerClass %2 : _markerMissionName %3",_coords,_markerName,_markerLabel]] call blck_fnc_log;
|
||||||
};
|
};
|
||||||
case 3: { // Mision aborted for killing an asset
|
case 3: { // Mision aborted for killing an asset
|
||||||
@ -123,7 +126,7 @@ switch (_endCondition) do
|
|||||||
if (local _x) then {deleteVehicle _x};
|
if (local _x) then {deleteVehicle _x};
|
||||||
}forEach _crates;
|
}forEach _crates;
|
||||||
[["warning",_endMsg,_markerLabel]] call blck_fnc_messageplayers;
|
[["warning",_endMsg,_markerLabel]] call blck_fnc_messageplayers;
|
||||||
[_coords,_mines,_objects,_blck_AllMissionAI,_markerName,cleanupAliveAITimer,cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
|
[_coords,_mines,_objects,_hiddenObjects,_blck_AllMissionAI,_markerName,cleanupAliveAITimer,cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
|
||||||
[format["Mission Aborted <ASSET KILLED> | _coords %1 : _markerClass %2 : _markerMissionName %3",_coords,_markerName,_markerLabel]] call blck_fnc_log;
|
[format["Mission Aborted <ASSET KILLED> | _coords %1 : _markerClass %2 : _markerMissionName %3",_coords,_markerName,_markerLabel]] call blck_fnc_log;
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -135,8 +138,18 @@ switch (_endCondition) do
|
|||||||
if (local _x) then {deleteVehicle _x};
|
if (local _x) then {deleteVehicle _x};
|
||||||
}forEach _crates;
|
}forEach _crates;
|
||||||
|
|
||||||
[_coords,_mines,_objects,_blck_AllMissionAI,_markerName,cleanupAliveAITimer,cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
|
[_coords,_mines,_objects,_hiddenObjects,_blck_AllMissionAI,_markerName,cleanupAliveAITimer,cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
|
||||||
};
|
};
|
||||||
|
case 5: {
|
||||||
|
#define cleanupCompositionTimer 0
|
||||||
|
#define cleanupAliveAITimer 0
|
||||||
|
|
||||||
|
{
|
||||||
|
if (local _x) then {deleteVehicle _x};
|
||||||
|
}forEach _crates;
|
||||||
|
|
||||||
|
[_coords,_mines,_objects,_hiddenObjects,_blck_AllMissionAI,_markerName,cleanupAliveAITimer,cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
blck_missionsRun = blck_missionsRun + 1;
|
blck_missionsRun = blck_missionsRun + 1;
|
||||||
|
@ -40,7 +40,7 @@ if !(isNull _group) then
|
|||||||
_building = createVehicle[_bldClassName,[0,0,0],[],0,"CAN_COLLIDE"];
|
_building = createVehicle[_bldClassName,[0,0,0],[],0,"CAN_COLLIDE"];
|
||||||
_building setPosATL (_bldRelPos vectorAdd _center);
|
_building setPosATL (_bldRelPos vectorAdd _center);
|
||||||
_building setDir _bldDir;
|
_building setDir _bldDir;
|
||||||
_buildingsSpawned pushBack _building;
|
_buildingsSpawned pushBack (netID _building);
|
||||||
_staticsSpawned = [_building,_group,_statics,_men,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,"none",_weaponList,_sideArms] call blck_fnc_spawnGarrisonInsideBuilding_ATL;
|
_staticsSpawned = [_building,_group,_statics,_men,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,"none",_weaponList,_sideArms] call blck_fnc_spawnGarrisonInsideBuilding_ATL;
|
||||||
}forEach _garrisonedBuilding_ATLsystem;
|
}forEach _garrisonedBuilding_ATLsystem;
|
||||||
};
|
};
|
||||||
|
@ -22,6 +22,10 @@ params["_center",
|
|||||||
["_sideArms",[]]
|
["_sideArms",[]]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
{
|
||||||
|
diag_log format["_fnc_garrisonBuilding_relPosSystem: _this %1 = %2",_forEachIndex,_this select _forEachIndex];
|
||||||
|
}forEach _this;
|
||||||
|
|
||||||
if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
|
if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
|
||||||
if (_sideArms isEqualTo []) then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms};
|
if (_sideArms isEqualTo []) then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms};
|
||||||
if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
|
if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
|
||||||
@ -36,13 +40,27 @@ if !(isNull _group) then
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
// ["Land_Unfinished_Building_02_F",[-21.8763,-45.978,-0.00213432],0,true,true,0.67,3,[],4],
|
// ["Land_Unfinished_Building_02_F",[-21.8763,-45.978,-0.00213432],0,true,true,0.67,3,[],4],
|
||||||
_x params["_bldClassName","_bldRelPos","_bldDir","_s","_d","_p","_noStatics","_typesStatics","_noUnits"];
|
_x params["_bldClassName","_bldRelPos","_bldDir","_allowDamage","_enableSimulation","_probabilityOfGarrision","_noStatics","_typesStatics","_noUnits"];
|
||||||
if (_typesStatics isEqualTo []) then {_typesStatics = ["B_HMG_01_high_F"]};
|
if (_typesStatics isEqualTo []) then {_typesStatics = blck_staticWeapons};
|
||||||
_building = createVehicle[_bldClassName,[0,0,0],[],0,"CAN_COLLIDE"];
|
_building = createVehicle[_bldClassName,[0,0,0],[],0,"CAN_COLLIDE"];
|
||||||
_buildingsSpawned pushBack _building;
|
_buildingsSpawned pushBack (netID _building);
|
||||||
_building setPosATL (_bldRelPos vectorAdd _center);
|
_building setPosATL (_bldRelPos vectorAdd _center);
|
||||||
[_building, _bldDir] call blck_fnc_setDirUp;
|
[_building, _bldDir] call blck_fnc_setDirUp;
|
||||||
_staticsSpawned = [_building,_group,_noStatics,_typesStatics,_noUnits,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,"none",_weaponList,_sideArms] call blck_fnc_spawnGarrisonInsideBuilding_relPos;
|
_staticsSpawned = [
|
||||||
|
_building,
|
||||||
|
_group,
|
||||||
|
_noStatics,
|
||||||
|
_typesStatics,
|
||||||
|
_noUnits,
|
||||||
|
_aiDifficultyLevel,
|
||||||
|
_uniforms,
|
||||||
|
_headGear,
|
||||||
|
_vests,
|
||||||
|
_backpacks,
|
||||||
|
"none",
|
||||||
|
_weaponList,
|
||||||
|
_sideArms
|
||||||
|
] call blck_fnc_spawnGarrisonInsideBuilding_relPos;
|
||||||
}forEach _garrisonedBuilding_relPosSystem;
|
}forEach _garrisonedBuilding_relPosSystem;
|
||||||
};
|
};
|
||||||
_return = [_group,_buildingsSpawned,_staticsSpawned];
|
_return = [_group,_buildingsSpawned,_staticsSpawned];
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||||
|
|
||||||
private ["_coords","_coordArray","_return"];
|
private ["_coords","_coordArray","_return"];
|
||||||
params["_missionCategoryDescriptors","_missionParameters"];
|
params["_missionCategoryDescriptors","_missionParameters","_missionCount"];
|
||||||
_missionCategoryDescriptors params [
|
_missionCategoryDescriptors params [
|
||||||
"_difficulty",
|
"_difficulty",
|
||||||
"_noMissions", // Max no missions of this category
|
"_noMissions", // Max no missions of this category
|
||||||
@ -50,9 +50,11 @@ _missionParameters params[
|
|||||||
"_garrisonedBuildings_BuildingPosnSystem",
|
"_garrisonedBuildings_BuildingPosnSystem",
|
||||||
"_garrisonedBuilding_ATLsystem",
|
"_garrisonedBuilding_ATLsystem",
|
||||||
"_missionLandscape",
|
"_missionLandscape",
|
||||||
|
"_simpleObjects",
|
||||||
"_missionLootBoxes",
|
"_missionLootBoxes",
|
||||||
"_missionLootVehicles",
|
"_missionLootVehicles",
|
||||||
"_missionPatrolVehicles",
|
"_missionPatrolVehicles",
|
||||||
|
"_submarinePatrols",
|
||||||
"_submarinePatrolParameters",
|
"_submarinePatrolParameters",
|
||||||
"_airPatrols",
|
"_airPatrols",
|
||||||
"_noVehiclePatrols",
|
"_noVehiclePatrols",
|
||||||
@ -64,6 +66,7 @@ _missionParameters params[
|
|||||||
"_maxNoAI",
|
"_maxNoAI",
|
||||||
"_noAIGroups",
|
"_noAIGroups",
|
||||||
"_missionGroups",
|
"_missionGroups",
|
||||||
|
"_scubaPatrols",
|
||||||
"_scubaGroupParameters",
|
"_scubaGroupParameters",
|
||||||
"_hostageConfig",
|
"_hostageConfig",
|
||||||
"_enemyLeaderConfig",
|
"_enemyLeaderConfig",
|
||||||
@ -100,15 +103,17 @@ if !(_defaultMissionLocations isEqualTo []) then
|
|||||||
_coords = [] call blck_fnc_findShoreLocation;
|
_coords = [] call blck_fnc_findShoreLocation;
|
||||||
} else {
|
} else {
|
||||||
_coords = [] call blck_fnc_findSafePosn;
|
_coords = [] call blck_fnc_findSafePosn;
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_coords isEqualTo []) exitWith
|
if (_coords isEqualTo []) exitWith
|
||||||
{
|
{
|
||||||
|
[format["No Safe Mission Spawn Position Found to spawn Mission %1",_markerMissionName],'warning'] call blck_fnc_log;
|
||||||
false;
|
false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (blck_debugLevel >= 3) then {diag_log format["_fnc_initializeMission: _markerMissionName = %1 | _coords = %2",_markerMissionName,_coords]};
|
||||||
|
|
||||||
blck_ActiveMissionCoords pushback _coords;
|
blck_ActiveMissionCoords pushback _coords;
|
||||||
blck_missionsRunning = blck_missionsRunning + 1;
|
blck_missionsRunning = blck_missionsRunning + 1;
|
||||||
|
|
||||||
@ -141,17 +146,37 @@ if (blck_debugLevel >= 3) then
|
|||||||
"_markerBrush"
|
"_markerBrush"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
private _markers = [_markerName,_markerPos,_markerMissionName,_markerColor,_markerType,_markerSize,_markerBrush] call blck_fnc_createMissionMarkers;
|
if !(toLower (_markerType) in ["ellipse","rectangle"] || isClass(configFile >> "CfgMarkers" >> _markerType)) then
|
||||||
|
{
|
||||||
|
[format["_markerType set to 'ELLIPSE': Illegal marker type %1 used for mission %2 of difficulty %3",_markerType,_markerMissionName,_difficulty],"warning"] call blck_fnc_log;
|
||||||
|
_markerType = "ELLIPSE";
|
||||||
|
_markerSize = [200,200];
|
||||||
|
_markerBrush = "SOLID";
|
||||||
|
_markerMissionName = "Invalid Marker Parameters";
|
||||||
|
_missionParameters set [1,_markerMissionName];
|
||||||
|
};
|
||||||
|
if !(isClass(configFile >> "CfgMarkerColors" >> _markerColor)) then
|
||||||
|
{
|
||||||
|
[format["_markerColor set to 'default': Illegal color %1 used for mission %2 of difficulty %3",_markerColor,_markerMissionName,_difficulty],"warning"] call blck_fnc_log;
|
||||||
|
_markerColor = "DEFAULT";
|
||||||
|
_markerMissionName = "Invalid Marker Parameters";
|
||||||
|
_missionParameters set [1,_markerMissionName];
|
||||||
|
};
|
||||||
|
|
||||||
|
private _markers = [format["%1:%2",_markerName,_missionCount],_markerPos,_markerMissionName,_markerColor,_markerType,_markerSize,_markerBrush] call blck_fnc_createMissionMarkers;
|
||||||
|
if (blck_debugLevel >= 3) then {[format["_initializeMissions (167): _marker = %1 | _markerMissionName = %2 | _difficulty = %3",_markers,_markerMissionName,_difficulty]] call blck_fnc_log};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Send a message to players.
|
Send a message to players.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[["start",_startMsg,_markerMissionName]] call blck_fnc_messageplayers;
|
[["start",_startMsg,_markerMissionName]] call blck_fnc_messageplayers;
|
||||||
|
|
||||||
private _missionTimeoutAt = diag_tickTime + blck_MissionTimeout;
|
private _missionTimeoutAt = diag_tickTime + blck_MissionTimeout;
|
||||||
private _triggered = 0;
|
private _triggered = 0;
|
||||||
private _spawnPara = if (random(1) < _chancePara) then {true} else {false};
|
private _spawnPara = if (random(1) < _chancePara) then {true} else {false};
|
||||||
private _objects = [];
|
private _objects = [];
|
||||||
|
private _hiddenObjects = [];
|
||||||
private _mines = [];
|
private _mines = [];
|
||||||
private _crates = [];
|
private _crates = [];
|
||||||
private _missionAIVehicles = [];
|
private _missionAIVehicles = [];
|
||||||
@ -159,9 +184,12 @@ private _blck_AllMissionAI = [];
|
|||||||
private _AI_Vehicles = [];
|
private _AI_Vehicles = [];
|
||||||
private _assetSpawned = objNull;
|
private _assetSpawned = objNull;
|
||||||
|
|
||||||
private _missionData = [_coords,_mines,_objects,_crates, _blck_AllMissionAI,_assetSpawned,_missionAIVehicles,_markers];
|
private _missionData = [_coords,_mines,_objects,_hiddenObjects,_crates, _blck_AllMissionAI,_assetSpawned,_missionAIVehicles,_markers];
|
||||||
blck_activeMissionsList pushBack [_missionCategoryDescriptors,_missionTimeoutAt,_triggered,_spawnPara,_missionData,_missionParameters];
|
blck_activeMissionsList pushBack [_missionCategoryDescriptors,_missionTimeoutAt,_triggered,_spawnPara,_missionData,_missionParameters];
|
||||||
|
|
||||||
[format["Initialized Mission %1 | description %2 | difficulty %3 at %4",_markerName, _markerMissionName, _difficulty, diag_tickTime]] call blck_fnc_log;
|
[format["Initialized Mission %1 | description %2 | difficulty %3 at %4",_markerName, _markerMissionName, _difficulty, diag_tickTime]] call blck_fnc_log;
|
||||||
|
if (blck_debugON) then
|
||||||
true
|
{
|
||||||
|
[format["Mission Marker = %1 | Marker Position = %2 | _coords = %3",_markers,_markerPos,_coords]] call blck_fnc_log;
|
||||||
|
};
|
||||||
|
true
|
||||||
|
@ -15,9 +15,10 @@
|
|||||||
#define delayTime 1
|
#define delayTime 1
|
||||||
private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_assetKilledMsg","_enemyLeaderConfig",
|
private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_assetKilledMsg","_enemyLeaderConfig",
|
||||||
"_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups","_loadCratesTiming","_spawnCratesTiming","_assetSpawned","_hostageConfig",
|
"_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups","_loadCratesTiming","_spawnCratesTiming","_assetSpawned","_hostageConfig",
|
||||||
"_chanceHeliPatrol","_noPara","_chanceLoot","_heliCrew","_loadCratesTiming","_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius",
|
"_chanceHeliPatrol","_noPara","_chanceLoot","_heliCrew","_loadCratesTiming","_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius","_simpleObjects",
|
||||||
"_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_noChoppers","_chancePara","_paraSkill","_marker","_vehicleCrewCount",
|
"_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_noChoppers","_chancePara","_paraSkill","_marker","_vehicleCrewCount",
|
||||||
"_defaultMissionLocations","_garrisonedbuildings_buildingposnsystem","_garrisonedBuilding_ATLsystem", "_isScubaMission","_markerlabel","_missionLootBoxes","_airpatrols"];
|
"_defaultMissionLocations","_garrisonedbuildings_buildingposnsystem","_garrisonedBuilding_ATLsystem", "_isScubaMission","_markerlabel","_missionLootBoxes","_airpatrols",
|
||||||
|
"_submarinePatrols","_scubaPatrols"];
|
||||||
|
|
||||||
params["_markerName",["_aiDifficultyLevel","Red"]];
|
params["_markerName",["_aiDifficultyLevel","Red"]];
|
||||||
if (isNil "_markerLabel") then {_markerLabel = _markerMissionName};
|
if (isNil "_markerLabel") then {_markerLabel = _markerMissionName};
|
||||||
@ -54,7 +55,9 @@ if (isNil "_garrisonedBuilding_ATLsystem") then {_garrisonedBuilding_ATLsystem =
|
|||||||
if (isNil "_garrisonedBuildings_BuildingPosnSystem") then {_garrisonedBuildings_BuildingPosnSystem = []};
|
if (isNil "_garrisonedBuildings_BuildingPosnSystem") then {_garrisonedBuildings_BuildingPosnSystem = []};
|
||||||
if (isNil "_vehicleCrewCount") then {_vehicleCrewCount = [_aiDifficultyLevel] call GMS_fnc_selectVehicleCrewCount};
|
if (isNil "_vehicleCrewCount") then {_vehicleCrewCount = [_aiDifficultyLevel] call GMS_fnc_selectVehicleCrewCount};
|
||||||
if (isNil "_airpatrols") then {_airpatrols = []};
|
if (isNil "_airpatrols") then {_airpatrols = []};
|
||||||
|
if (isNil "_submarinePatrols") then {_submarinePatrols = 0};
|
||||||
if (isNil "_submarinePatrolParameters") then {_submarinePatrolParameters = []};
|
if (isNil "_submarinePatrolParameters") then {_submarinePatrolParameters = []};
|
||||||
|
if (isNil "_scubaPatrols") then {_scubaPatrols = 0};
|
||||||
if (isNil "_scubagroupparameters") then {_scubagroupparameters = []};
|
if (isNil "_scubagroupparameters") then {_scubagroupparameters = []};
|
||||||
if (isNil "_markerMissionName") then {
|
if (isNil "_markerMissionName") then {
|
||||||
diag_log format["_fnc_missionSpawner: _markerMissionName not defined, using default value"];
|
diag_log format["_fnc_missionSpawner: _markerMissionName not defined, using default value"];
|
||||||
@ -66,6 +69,7 @@ if (isNil "_lootCratePositions") then {_lootCratePositions = []};
|
|||||||
if (isNil "_isScubaMission") then {_isScubaMission = false};
|
if (isNil "_isScubaMission") then {_isScubaMission = false};
|
||||||
if (isNil "_missionLootBoxes") then {_missionLootBoxes = []};
|
if (isNil "_missionLootBoxes") then {_missionLootBoxes = []};
|
||||||
if (isNil "_defaultMissionLocations") then {_defaultMissionLocations = []};
|
if (isNil "_defaultMissionLocations") then {_defaultMissionLocations = []};
|
||||||
|
if (isNil "_simpleObjects") then {_simpleObjects = []};
|
||||||
if !(_defaultMissionLocations isEqualTo []) then
|
if !(_defaultMissionLocations isEqualTo []) then
|
||||||
{
|
{
|
||||||
_coords = selectRandom _defaultMissionLocations;
|
_coords = selectRandom _defaultMissionLocations;
|
||||||
@ -106,9 +110,11 @@ private _table = [
|
|||||||
_garrisonedBuildings_BuildingPosnSystem,
|
_garrisonedBuildings_BuildingPosnSystem,
|
||||||
_garrisonedBuilding_ATLsystem,
|
_garrisonedBuilding_ATLsystem,
|
||||||
_missionLandscape,
|
_missionLandscape,
|
||||||
|
_simpleObjects,
|
||||||
_missionLootBoxes,
|
_missionLootBoxes,
|
||||||
_missionLootVehicles,
|
_missionLootVehicles,
|
||||||
_missionPatrolVehicles,
|
_missionPatrolVehicles,
|
||||||
|
_submarinePatrols, // Added Build 227
|
||||||
_submarinePatrolParameters,
|
_submarinePatrolParameters,
|
||||||
_airPatrols,
|
_airPatrols,
|
||||||
_noVehiclePatrols,
|
_noVehiclePatrols,
|
||||||
@ -120,6 +126,7 @@ private _table = [
|
|||||||
_maxNoAI,
|
_maxNoAI,
|
||||||
_noAIGroups,
|
_noAIGroups,
|
||||||
_missionGroups,
|
_missionGroups,
|
||||||
|
_scubaPatrols, // Added Build 227
|
||||||
_scubaGroupParameters,
|
_scubaGroupParameters,
|
||||||
_hostageConfig,
|
_hostageConfig,
|
||||||
_enemyLeaderConfig,
|
_enemyLeaderConfig,
|
||||||
|
@ -3,6 +3,13 @@
|
|||||||
by Ghostrider-GRG-
|
by Ghostrider-GRG-
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||||
|
#define missionData 4
|
||||||
|
#define noActive 2
|
||||||
|
#define waitTime 5
|
||||||
|
|
||||||
|
blck_activeMonitorThreads = blck_activeMonitorThreads + 1;
|
||||||
|
|
||||||
for "_i" from 1 to (count blck_activeMissionsList) do
|
for "_i" from 1 to (count blck_activeMissionsList) do
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -16,14 +23,10 @@ for "_i" from 1 to (count blck_activeMissionsList) do
|
|||||||
"_missionTimeoutAt", // 1
|
"_missionTimeoutAt", // 1
|
||||||
"_triggered", // 2
|
"_triggered", // 2
|
||||||
"_spawnPara", // 3
|
"_spawnPara", // 3
|
||||||
"_missionData", // 6
|
"_missionData", // 4
|
||||||
"_missionParameters" // 7
|
"_missionParameters" // 5
|
||||||
];
|
];
|
||||||
|
|
||||||
#define noActive 2
|
|
||||||
#define waitTime 5
|
|
||||||
#define missionData 6
|
|
||||||
|
|
||||||
_missionCategoryDescriptors params [
|
_missionCategoryDescriptors params [
|
||||||
"_difficulty",
|
"_difficulty",
|
||||||
"_noMissions", // Max no missions of this category
|
"_noMissions", // Max no missions of this category
|
||||||
@ -33,11 +36,20 @@ for "_i" from 1 to (count blck_activeMissionsList) do
|
|||||||
"_waitTime", // time at which a mission should be spawned
|
"_waitTime", // time at which a mission should be spawned
|
||||||
"_missionsData" //
|
"_missionsData" //
|
||||||
];
|
];
|
||||||
|
//_missionData = [_coords,_mines,_objects,_hiddenObjects,_crates,_blck_AllMissionAI,_assetSpawned,_missionAIVehicles,_markers];
|
||||||
// 0 1 2 3 4 5 6 7 8
|
_missionData params [
|
||||||
_missionData params ["_coords","_mines","_objects","_crates","_blck_AllMissionAI","_assetSpawned","_missionAIVehicles","_markers"];
|
"_coords",
|
||||||
|
"_mines",
|
||||||
|
"_objects",
|
||||||
|
"_hiddenObjects",
|
||||||
|
"_crates",
|
||||||
|
"_blck_AllMissionAI",
|
||||||
|
"_assetSpawned",
|
||||||
|
"_missionAIVehicles",
|
||||||
|
"_markers"
|
||||||
|
];
|
||||||
|
|
||||||
_missionParameters params[
|
_missionParameters params[
|
||||||
"_markerName",
|
"_markerName",
|
||||||
"_markerMissionName",
|
"_markerMissionName",
|
||||||
"_endMsg",
|
"_endMsg",
|
||||||
@ -53,9 +65,11 @@ _missionParameters params[
|
|||||||
"_garrisonedBuildings_BuildingPosnSystem",
|
"_garrisonedBuildings_BuildingPosnSystem",
|
||||||
"_garrisonedBuilding_ATLsystem",
|
"_garrisonedBuilding_ATLsystem",
|
||||||
"_missionLandscape",
|
"_missionLandscape",
|
||||||
|
"_simpleObjects",
|
||||||
"_missionLootBoxes",
|
"_missionLootBoxes",
|
||||||
"_missionLootVehicles",
|
"_missionLootVehicles",
|
||||||
"_missionPatrolVehicles",
|
"_missionPatrolVehicles",
|
||||||
|
"_submarinePatrols",
|
||||||
"_submarinePatrolParameters",
|
"_submarinePatrolParameters",
|
||||||
"_airPatrols",
|
"_airPatrols",
|
||||||
"_noVehiclePatrols",
|
"_noVehiclePatrols",
|
||||||
@ -67,6 +81,7 @@ _missionParameters params[
|
|||||||
"_maxNoAI",
|
"_maxNoAI",
|
||||||
"_noAIGroups",
|
"_noAIGroups",
|
||||||
"_missionGroups",
|
"_missionGroups",
|
||||||
|
"_scubaPatrols",
|
||||||
"_scubaGroupParameters",
|
"_scubaGroupParameters",
|
||||||
"_hostageConfig",
|
"_hostageConfig",
|
||||||
"_enemyLeaderConfig",
|
"_enemyLeaderConfig",
|
||||||
@ -91,7 +106,7 @@ _missionParameters params[
|
|||||||
"_loadCratesTiming",
|
"_loadCratesTiming",
|
||||||
"_endCondition",
|
"_endCondition",
|
||||||
"_isScubaMission"
|
"_isScubaMission"
|
||||||
];
|
];
|
||||||
|
|
||||||
private _playerInRange = [_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange;
|
private _playerInRange = [_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange;
|
||||||
#define delayTime 1
|
#define delayTime 1
|
||||||
@ -115,15 +130,16 @@ _missionParameters params[
|
|||||||
_monitorAction = 1;
|
_monitorAction = 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (_monitorAction) do
|
switch (_monitorAction) do
|
||||||
{
|
{
|
||||||
|
|
||||||
// Handle Timeout
|
// Handle Timeout
|
||||||
case -1:
|
case -1:
|
||||||
{
|
{
|
||||||
//[format["_fnc_monitorInitializedMissions: mission timed out: %1",_el]] call blck_fnc_log;
|
//[format["_fnc_monitorInitializedMissions: mission timed out: %1",_el]] call blck_fnc_log;
|
||||||
_missionCategoryDescriptors set[noActive, _noActive - 1];
|
_missionCategoryDescriptors set[noActive, _noActive - 1];
|
||||||
[_coords,_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_markers,markerPos (_markers select 1),_markerName,_markerMissionName, -1] call blck_fnc_endMission;
|
[_coords,_mines,_objects,_hiddenObjects,_crates, _blck_AllMissionAI,_endMsg,_markers,markerPos (_markers select 1),_markerName,_markerMissionName, -1] call blck_fnc_endMission;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handle mission waiting to be triggerd and player is within the range to trigger
|
// Handle mission waiting to be triggerd and player is within the range to trigger
|
||||||
@ -158,15 +174,34 @@ _missionParameters params[
|
|||||||
|
|
||||||
_temp = [_coords, _missionLandscape] call blck_fnc_spawnCompositionObjects;
|
_temp = [_coords, _missionLandscape] call blck_fnc_spawnCompositionObjects;
|
||||||
};
|
};
|
||||||
_objects append _temp;
|
_objects append (_temp select 0);
|
||||||
|
_hiddenObjects append (_temp select 1);
|
||||||
|
|
||||||
uiSleep delayTime;
|
uiSleep delayTime;
|
||||||
|
|
||||||
|
_temp = [_coords,_simpleObjects,true] call blck_fnc_spawnSimpleObjects;
|
||||||
|
_objects append _temp;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
_temp = [_coords, _minNoAI,_maxNoAI,_noAIGroups,_missionGroups,_difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionAI;
|
_temp = [_coords, _minNoAI,_maxNoAI,_noAIGroups,_missionGroups,_difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaMission] call blck_fnc_spawnMissionAI;
|
||||||
_temp params["_ai","_abort"];
|
_temp params["_ai","_abort"];
|
||||||
if (_abort) throw 1;
|
if (_abort) throw 1;
|
||||||
_blck_AllMissionAI append (_ai);
|
_blck_AllMissionAI append (_ai);
|
||||||
uiSleep delayTime;
|
uiSleep delayTime;
|
||||||
|
|
||||||
|
if !(_scubaGroupParameters isEqualTo [] || _scubaPatrols > 0) then
|
||||||
|
{
|
||||||
|
//_umsUniforms = blck_UMS_uniforms;
|
||||||
|
//_umsHeadgear = blck_UMS_headgear;
|
||||||
|
//_umsWeapons = blck_UMS_weapons;
|
||||||
|
//_umsVests = blck_UMS_vests;
|
||||||
|
|
||||||
|
_temp = [_coords, _minNoAI,_maxNoAI,_scubaPatrols,_scubaGroupParameters,_difficulty,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,_backpacks,blck_UMS_weapons,_sideArms,true] call blck_fnc_spawnMissionAI;
|
||||||
|
_temp params["_ai","_abort"];
|
||||||
|
if (_abort) throw 1;
|
||||||
|
_blck_AllMissionAI append (_ai);
|
||||||
|
};
|
||||||
|
uiSleep delayTime;
|
||||||
|
|
||||||
if !(_hostageConfig isEqualTo []) then
|
if !(_hostageConfig isEqualTo []) then
|
||||||
{
|
{
|
||||||
@ -174,7 +209,6 @@ _missionParameters params[
|
|||||||
if (_temp isEqualTo grpNull) then {throw 1} else
|
if (_temp isEqualTo grpNull) then {throw 1} else
|
||||||
{
|
{
|
||||||
_assetSpawned = _temp select 0;
|
_assetSpawned = _temp select 0;
|
||||||
_missionData set[5,_assetSpawned];
|
|
||||||
_objects pushBack (_temp select 1);
|
_objects pushBack (_temp select 1);
|
||||||
_blck_AllMissionAI pushBack _assetSpawned;
|
_blck_AllMissionAI pushBack _assetSpawned;
|
||||||
};
|
};
|
||||||
@ -186,7 +220,6 @@ _missionParameters params[
|
|||||||
if (_temp isEqualTo grpNull) then {throw 1} else
|
if (_temp isEqualTo grpNull) then {throw 1} else
|
||||||
{
|
{
|
||||||
_assetSpawned = _temp select 0;
|
_assetSpawned = _temp select 0;
|
||||||
_missiondata set[5,_assetSpawned];
|
|
||||||
_objects pushBack (_temp select 1);
|
_objects pushBack (_temp select 1);
|
||||||
_blck_AllMissionAI pushBack _assetSpawned;
|
_blck_AllMissionAI pushBack _assetSpawned;
|
||||||
};
|
};
|
||||||
@ -199,11 +232,18 @@ _missionParameters params[
|
|||||||
{
|
{
|
||||||
if (random(1) < _chanceHeliPatrol) then
|
if (random(1) < _chanceHeliPatrol) then
|
||||||
{
|
{
|
||||||
_temp = [_coords,_difficulty,_missionHelis,_uniforms,_headGear,_vests,_backpacks,_weaponList, _sideArms,"none"] call blck_fnc_spawnMissionHeli;
|
private _xaxis = _coords select 0;
|
||||||
|
private _yaxis = _coords select 1;
|
||||||
|
private _zaxis = 100;
|
||||||
|
private _offset = 15 * _i;
|
||||||
|
_temp = [[_xaxis + _offset,_yaxis + _offset, _zaxis + _offset],_difficulty,_missionHelis,_uniforms,_headGear,_vests,_backpacks,_weaponList, _sideArms,"none"] call blck_fnc_spawnMissionHeli;
|
||||||
if (typeName _temp isEqualTo "ARRAY") then
|
if (typeName _temp isEqualTo "ARRAY") then
|
||||||
{
|
{
|
||||||
blck_monitoredVehicles pushBack (_temp select 0);
|
blck_monitoredVehicles pushBack (_temp select 0);
|
||||||
|
_missionAIVehicles pushBack (_temp select 0);
|
||||||
_blck_AllMissionAI append (_temp select 1);
|
_blck_AllMissionAI append (_temp select 1);
|
||||||
|
//diag_log format["_monitorInitializeMissions(238): _temp select 0 = %1",_temp select 0];
|
||||||
|
//diag_log format["_monitorInitializedMissions(239): _temp select 1 = %1",_temp select 1];
|
||||||
} else {
|
} else {
|
||||||
if (typeName _temp isEqualTo "GROUP") then
|
if (typeName _temp isEqualTo "GROUP") then
|
||||||
{
|
{
|
||||||
@ -215,7 +255,7 @@ _missionParameters params[
|
|||||||
};
|
};
|
||||||
uisleep 3;
|
uisleep 3;
|
||||||
|
|
||||||
if (count _garrisonedBuilding_ATLsystem > 0) then // Note that there is no error checking here for nulGroups
|
if !(_garrisonedBuilding_ATLsystem isEqualTo []) then // Note that there is no error checking here for nulGroups
|
||||||
{
|
{
|
||||||
private _temp = [_coords, _garrisonedBuilding_ATLsystem, _difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_garrisonBuilding_ATLsystem;
|
private _temp = [_coords, _garrisonedBuilding_ATLsystem, _difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_garrisonBuilding_ATLsystem;
|
||||||
if (_temp isEqualTo grpNull) then {throw 1} else
|
if (_temp isEqualTo grpNull) then {throw 1} else
|
||||||
@ -228,8 +268,9 @@ _missionParameters params[
|
|||||||
};
|
};
|
||||||
uiSleep 3;
|
uiSleep 3;
|
||||||
|
|
||||||
if (count _garrisonedBuildings_BuildingPosnSystem > 0) then
|
if !(_garrisonedBuildings_BuildingPosnSystem isEqualTo []) then
|
||||||
{
|
{
|
||||||
|
// params["_building","_group",["_noStatics",0],["_typesStatics",blck_staticWeapons],["_noUnits",0],["_aiDifficultyLevel","Red"], ["_uniforms",[]],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_launcher","none"],["_weaponList",[]],["_sideArms",[]]];
|
||||||
private _temp = [_coords, _garrisonedBuildings_BuildingPosnSystem, _difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_garrisonBuilding_RelPosSystem;
|
private _temp = [_coords, _garrisonedBuildings_BuildingPosnSystem, _difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_garrisonBuilding_RelPosSystem;
|
||||||
if (_temp isEqualTo grpNull) then {throw 1} else
|
if (_temp isEqualTo grpNull) then {throw 1} else
|
||||||
// TODO: add error checks for grpNull to the RelPosSystem
|
// TODO: add error checks for grpNull to the RelPosSystem
|
||||||
@ -239,37 +280,45 @@ _missionParameters params[
|
|||||||
_blck_AllMissionAI append (units (_temp select 0));
|
_blck_AllMissionAI append (units (_temp select 0));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
uiSleep 15;
|
uiSleep 5;
|
||||||
|
|
||||||
private _userelativepos = true;
|
private _userelativepos = true;
|
||||||
private _noEmplacedWeapons = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange;
|
private _emplacedWeaponsThisMission = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange;
|
||||||
if (blck_useStatic && ((_noEmplacedWeapons > 0) || count _missionEmplacedWeapons > 0)) then
|
if (blck_useStatic && ((_emplacedWeaponsThisMission > 0) || !(_missionEmplacedWeapons isEqualTo []))) then
|
||||||
// TODO: add error checks for grpNull to the emplaced weapon spawner
|
// TODO: add error checks for grpNull to the emplaced weapon spawner
|
||||||
{
|
{
|
||||||
|
|
||||||
private _temp = [_coords,_missionEmplacedWeapons,_userelativepos,_noEmplacedWeapons,_difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray;
|
private _temp = [_coords,_missionEmplacedWeapons,_userelativepos,_emplacedWeaponsThisMission,_difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray;
|
||||||
if (_temp isEqualTo grpNull) then {throw 1} else
|
if (_temp isEqualTo grpNull) then {throw 1} else
|
||||||
{
|
{
|
||||||
_objects append (_temp select 0);
|
_objects append (_temp select 0);
|
||||||
_blck_AllMissionAI append (_temp select 1);
|
_blck_AllMissionAI append (_temp select 1);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
uisleep 10;
|
uisleep 5;
|
||||||
|
|
||||||
private _noVehiclePatrols = [_noVehiclePatrols] call blck_fnc_getNumberFromRange;
|
private _noPatrols = [_noVehiclePatrols] call blck_fnc_getNumberFromRange;
|
||||||
if (blck_useVehiclePatrols && ((_noVehiclePatrols > 0) || count _missionPatrolVehicles > 0)) then
|
if (blck_useVehiclePatrols && ((_noPatrols > 0) || !(_missionPatrolVehicles isEqualTo []))) then
|
||||||
{
|
{
|
||||||
_temp = [_coords,_noVehiclePatrols,_difficulty,_missionPatrolVehicles,_userelativepos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false,_vehicleCrewCount] call blck_fnc_spawnMissionVehiclePatrols;
|
_temp = [_coords,_noPatrols,_difficulty,_missionPatrolVehicles,_userelativepos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false,_vehicleCrewCount] call blck_fnc_spawnMissionVehiclePatrols;
|
||||||
// TODO: add grpNull checks to missionVehicleSpawner
|
// TODO: add grpNull checks to missionVehicleSpawner
|
||||||
if (_temp isEqualTo grpNull) then {throw 1} else
|
if (_temp isEqualTo grpNull) throw 1;
|
||||||
{
|
_missionAIVehicles append (_temp select 0);
|
||||||
_patrolVehicles = _temp select 0;
|
_blck_AllMissionAI append (_temp select 1);
|
||||||
_blck_AllMissionAI append (_temp select 1);
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
uiSleep delayTime;
|
uiSleep delayTime;
|
||||||
if (blck_debugLevel >= 3) then {diag_log format["monitorInitializedMissions: _spawnCrateTiming = %1 _loadCratesTiming = %2 | _markerMissionName = %3",_spawnCratesTiming,_loadCratesTiming, _markerMissionName]};
|
if (blck_useVehiclePatrols && ((_submarinePatrols > 0) || !(_submarinePatrolParameters isEqualTo []))) then
|
||||||
if (blck_debugLevel >= 3) then {diag_log format["monitorInitializedMissions: _missionLootBoxes = %1",_missionLootBoxes]};
|
{
|
||||||
|
_temp = [_coords,_noPatrols,_difficulty,_submarinePatrolParameters,_userelativepos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaMission,_vehicleCrewCount] call blck_fnc_spawnMissionVehiclePatrols;
|
||||||
|
// TODO: add grpNull checks to missionVehicleSpawner
|
||||||
|
if (_temp isEqualTo grpNull) throw 1;
|
||||||
|
_missionAIVehicles append (_temp select 0);
|
||||||
|
_blck_AllMissionAI append (_temp select 1);
|
||||||
|
};
|
||||||
|
|
||||||
|
uiSleep delayTime;
|
||||||
|
|
||||||
if (_spawnCratesTiming in ["atMissionSpawnGround","atMissionSpawnAir"]) then
|
if (_spawnCratesTiming in ["atMissionSpawnGround","atMissionSpawnAir"]) then
|
||||||
{
|
{
|
||||||
if (_missionLootBoxes isEqualTo []) then
|
if (_missionLootBoxes isEqualTo []) then
|
||||||
@ -293,8 +342,6 @@ _missionParameters params[
|
|||||||
} forEach _crates;
|
} forEach _crates;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
_missionData set[2,_objects];
|
|
||||||
_missionData set[3,_crates];
|
|
||||||
|
|
||||||
uiSleep delayTime;
|
uiSleep delayTime;
|
||||||
|
|
||||||
@ -307,11 +354,12 @@ _missionParameters params[
|
|||||||
_x setVariable["crateSpawnPos", (getPos _x)];
|
_x setVariable["crateSpawnPos", (getPos _x)];
|
||||||
} forEach _crates;
|
} forEach _crates;
|
||||||
private _spawnPara = if (random(1) < _chancePara) then {true} else {false};
|
private _spawnPara = if (random(1) < _chancePara) then {true} else {false};
|
||||||
_missionData = [_coords,_mines,_objects,_crates, _blck_AllMissionAI,_assetSpawned,_missionAIVehicles,_markers];
|
|
||||||
|
_missionData = [_coords,_mines,_objects,_hiddenObjects,_crates,_blck_AllMissionAI,_assetSpawned,_missionAIVehicles,_markers];
|
||||||
|
|
||||||
_el set[missionData, _missionData];
|
_el set[missionData, _missionData];
|
||||||
|
|
||||||
// Everything spawned withouth serous errors so lets keep the mission active for future monitoring
|
// Everything spawned withouth serious errors so lets keep the mission active for future monitoring
|
||||||
|
|
||||||
blck_activeMissionsList pushBack _el;
|
blck_activeMissionsList pushBack _el;
|
||||||
}
|
}
|
||||||
@ -321,7 +369,7 @@ _missionParameters params[
|
|||||||
if (_exception isEqualTo 1) then
|
if (_exception isEqualTo 1) then
|
||||||
{
|
{
|
||||||
_missionCategoryDescriptors set[noActive, _noActive - 1];
|
_missionCategoryDescriptors set[noActive, _noActive - 1];
|
||||||
[_coords,_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_markers,markerPos (_markers select 1),_markerName,_markerMissionName, 1] call blck_fnc_endMission;
|
[_coords,_mines,_objects,_hiddenObjects,_crates,_blck_AllMissionAI,_endMsg,_markers,markerPos (_markers select 1),_markerName,_markerMissionName, 1] call blck_fnc_endMission;
|
||||||
["Critial Error returned by one or more critical functions, mission spawning aborted!",'error'] call blck_fnc_log;
|
["Critial Error returned by one or more critical functions, mission spawning aborted!",'error'] call blck_fnc_log;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -348,10 +396,11 @@ _missionParameters params[
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (blck_debugLevel >= 4) throw 5;
|
||||||
private _playerIsNear = [_crates,20,true] call blck_fnc_playerInRangeArray;
|
private _playerIsNear = [_crates,20,true] call blck_fnc_playerInRangeArray;
|
||||||
private _minNoAliveForCompletion = (count _blck_AllMissionAI) - (round(blck_killPercentage * (count _blck_AllMissionAI)));
|
private _minNoAliveForCompletion = (count _blck_AllMissionAI) - (round(blck_killPercentage * (count _blck_AllMissionAI)));
|
||||||
private _aiKilled = if (({alive _x} count _blck_AllMissionAI) <= _minNoAliveForCompletion) then {true} else {false}; // mission complete
|
private _aiKilled = if (({alive _x} count _blck_AllMissionAI) <= _minNoAliveForCompletion) then {true} else {false}; // mission complete
|
||||||
|
|
||||||
if (_endIfPlayerNear) then
|
if (_endIfPlayerNear) then
|
||||||
{
|
{
|
||||||
if (_playerIsNear) throw 1; // mission complete
|
if (_playerIsNear) throw 1; // mission complete
|
||||||
@ -419,8 +468,8 @@ _missionParameters params[
|
|||||||
} forEach _crates;
|
} forEach _crates;
|
||||||
};
|
};
|
||||||
|
|
||||||
_missionData = [_coords,_mines,_objects,_crates, _blck_AllMissionAI,_assetSpawned,_missionAIVehicles,_markers];
|
_missionData = [_coords,_mines,_objects,_hiddenObjects,_crates, _blck_AllMissionAI,_assetSpawned,_missionAIVehicles,_markers];
|
||||||
|
|
||||||
_el set[missionData, _missionData];
|
_el set[missionData, _missionData];
|
||||||
|
|
||||||
// If there were no throws then lets check on the mission in a bit.
|
// If there were no throws then lets check on the mission in a bit.
|
||||||
@ -432,6 +481,7 @@ _missionParameters params[
|
|||||||
switch (_exception) do
|
switch (_exception) do
|
||||||
{
|
{
|
||||||
case 1: { // Normal Mission End
|
case 1: { // Normal Mission End
|
||||||
|
//diag_log format["_monitorInitializedMissions: Normal mission end"];
|
||||||
if (_spawnCratesTiming in ["atMissionEndGround","atMissionEndAir"]) then
|
if (_spawnCratesTiming in ["atMissionEndGround","atMissionEndAir"]) then
|
||||||
{
|
{
|
||||||
if (!(_secureAsset) || (_secureAsset && (alive _assetSpawned))) then
|
if (!(_secureAsset) || (_secureAsset && (alive _assetSpawned))) then
|
||||||
@ -489,7 +539,7 @@ _missionParameters params[
|
|||||||
[_assetSpawned,selectRandom(_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]])] remoteExec["switchMove",-2];
|
[_assetSpawned,selectRandom(_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]])] remoteExec["switchMove",-2];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
[_coords,_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_markers,markerPos (_markers select 1),_markerName,_markerMissionName, _exception] call blck_fnc_endMission;
|
[_coords,_mines,_objects,_hiddenObjects,_crates,_blck_AllMissionAI,_endMsg,_markers,markerPos (_markers select 1),_markerName,_markerMissionName, _exception] call blck_fnc_endMission;
|
||||||
|
|
||||||
_waitTime = diag_tickTime + _tMin + random(_tMax - _tMin);
|
_waitTime = diag_tickTime + _tMin + random(_tMax - _tMin);
|
||||||
_missionCategoryDescriptors set [noActive,_noActive - 1];
|
_missionCategoryDescriptors set [noActive,_noActive - 1];
|
||||||
@ -497,14 +547,17 @@ _missionParameters params[
|
|||||||
};
|
};
|
||||||
case 2: { // Abort, crate moved.
|
case 2: { // Abort, crate moved.
|
||||||
_endMsg = "Crate Removed from Mission Site Before Mission Completion: Mission Aborted";
|
_endMsg = "Crate Removed from Mission Site Before Mission Completion: Mission Aborted";
|
||||||
[_coords,_mines,_objects,_crates, _blck_AllMissionAI,"Crate Removed from Mission Site Before Mission Completion: Mission Aborted",_markers,markerPos (_markers select 1),_markerName,_markerMissionName, _exception] call blck_fnc_endMission;
|
[_coords,_mines,_objects,_hiddenObjects,_crates, _blck_AllMissionAI,"Crate Removed from Mission Site Before Mission Completion: Mission Aborted",_markers,markerPos (_markers select 1),_markerName,_markerMissionName, _exception] call blck_fnc_endMission;
|
||||||
};
|
};
|
||||||
case 3: { // Abort, key asset killed
|
case 3: { // Abort, key asset killed
|
||||||
[_coords,_mines,_objects,_crates,_blck_AllMissionAI,_assetKilledMsg,_markers,markerPos (_markers select 1),_markerName,_markerMissionName, _exception] call blck_fnc_endMission;
|
[_coords,_mines,_objects,_hiddenObjects,_crates,_blck_AllMissionAI,_assetKilledMsg,_markers,markerPos (_markers select 1),_markerName,_markerMissionName, _exception] call blck_fnc_endMission;
|
||||||
};
|
};
|
||||||
case 4: { // Reserved for grpNull errors in the future
|
case 4: { // Reserved for grpNull errors in the future
|
||||||
|
|
||||||
};
|
};
|
||||||
|
case 5: {
|
||||||
|
[_coords,_mines,_objects,_hiddenObjects,_crates,_blck_AllMissionAI,_assetKilledMsg,_markers,markerPos (_markers select 1),_markerName,_markerMissionName, _exception] call blck_fnc_endMission;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -513,4 +566,7 @@ _missionParameters params[
|
|||||||
blck_activeMissionsList pushBack _el;
|
blck_activeMissionsList pushBack _el;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
blck_activeMonitorThreads = blck_activeMonitorThreads - 1;
|
||||||
|
@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
private ["_start","_maxHeight","_smokeShell","_light","_lightSource"];
|
private ["_start","_maxHeight","_smokeShell","_light","_lightSource"];
|
||||||
params[["_crate",objNull],["_time",60]];
|
params[["_crate",objNull],["_time",60]];
|
||||||
if (isNull _crate) exitWith {};
|
|
||||||
_start = diag_tickTime;
|
|
||||||
|
|
||||||
_smokeShell = selectRandom ["SmokeShellOrange","SmokeShellBlue","SmokeShellPurple","SmokeShellRed","SmokeShellGreen","SmokeShellYellow"];
|
_smokeShell = selectRandom ["SmokeShellOrange","SmokeShellBlue","SmokeShellPurple","SmokeShellRed","SmokeShellGreen","SmokeShellYellow"];
|
||||||
_lightSource = selectRandom ["Chemlight_green","Chemlight_red","Chemlight_yellow","Chemlight_blue"];
|
_lightSource = selectRandom ["Chemlight_green","Chemlight_red","Chemlight_yellow","Chemlight_blue"];
|
||||||
@ -29,4 +27,5 @@ if(sunOrMoon < 0.2) then
|
|||||||
_light setPosATL (getPosATL _crate);
|
_light setPosATL (getPosATL _crate);
|
||||||
_light attachTo [_crate,[0,0,(0.55)]];
|
_light attachTo [_crate,[0,0,(0.55)]];
|
||||||
};
|
};
|
||||||
|
|
||||||
blck_illuminatedCrates pushBack [_crate,_smoke,_light,_smokeShell,_lightSource,diag_tickTime + 120, diag_tickTime + 300];
|
blck_illuminatedCrates pushBack [_crate,_smoke,_light,_smokeShell,_lightSource,diag_tickTime + 120, diag_tickTime + 300];
|
||||||
|
@ -40,5 +40,5 @@ _smoke setVariable ["LAST_CHECK", (diag_tickTime + 14400)];
|
|||||||
_smoke setPos _posWreck;
|
_smoke setPos _posWreck;
|
||||||
_smoke attachto [_fire, [0,0,1.5]];
|
_smoke attachto [_fire, [0,0,1.5]];
|
||||||
|
|
||||||
_objs = [_fire,_smoke];
|
_objs = [netID _fire,netID _smoke];
|
||||||
_objs
|
_objs
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
Spawn objects from an array using offsects from a central location.
|
|
||||||
The code provided by M3Editor EDEN has been addapted to add checks for vehicles, should they be present.
|
|
||||||
Returns an array of spawned objects.
|
|
||||||
|
|
||||||
--------------------------
|
|
||||||
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["_center","_objects"];
|
|
||||||
if (count _center == 2) then {_center pushBack 0};
|
|
||||||
private ["_newObjs","_sim","_dam","_obj","_spawnPos"];
|
|
||||||
_newObjs = [];
|
|
||||||
_obj = createVehicle ["RoadCone_L_F", _coords]; // To designate the mission center
|
|
||||||
_obj allowDamage true;
|
|
||||||
_obj enableSimulation false;
|
|
||||||
_obj enableSimulationGlobal false;
|
|
||||||
_obj enableDynamicSimulation false;
|
|
||||||
_newObjs pushBack _obj;
|
|
||||||
{
|
|
||||||
if (typeName (_x select 3) isEqualTo "ARRAY") then // assum simulation and damage settings are defined in the old way as [bool,bool]
|
|
||||||
{
|
|
||||||
_sim = (_x select 3) select 0;
|
|
||||||
_dam = (_x select 3) select 1;
|
|
||||||
};
|
|
||||||
if (typeName (_x select 3) isEqualTo "BOOL") then // assume simulation and damage settings are defined in the new way as , bool, bool, ...
|
|
||||||
{
|
|
||||||
_sim = _x select 3;
|
|
||||||
_dam = _x select 4;
|
|
||||||
};
|
|
||||||
|
|
||||||
_obj = createVehicle[(_x select 0),_center vectorAdd (_x select 1),[],0,"CAN_COLLIDE"];
|
|
||||||
_newObjs pushback _obj;
|
|
||||||
[_obj, (_x select 2)] call blck_fnc_setDirUp;
|
|
||||||
_obj enableDynamicSimulation _sim;
|
|
||||||
_obj allowDamage _dam;
|
|
||||||
if ((typeOf _obj) isKindOf "LandVehicle" || (typeOf _obj) isKindOf "Air" || (typeOf _obj) isKindOf "Sea") then
|
|
||||||
{
|
|
||||||
[_obj] call blck_fnc_configureMissionVehicle;
|
|
||||||
};
|
|
||||||
} forEach _objects;
|
|
||||||
_newObjs
|
|
||||||
|
|
@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
--------------------------
|
||||||
|
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["_center","_objects"];
|
||||||
|
private ["_dam","_sim"];
|
||||||
|
if (count _center == 2) then {_center pushBack 0};
|
||||||
|
private _newObjs = [];
|
||||||
|
private _hiddenObjs = [];
|
||||||
|
|
||||||
|
{
|
||||||
|
_x params["_className","_relPos","_dir","_booleans"];
|
||||||
|
if (typeName (_booleans) isEqualTo "ARRAY") then // assum simulation and damage settings are defined in the old way as [bool,bool]
|
||||||
|
{
|
||||||
|
_dam = (_booleans) select 0;
|
||||||
|
_sim = (_booleans) select 1;
|
||||||
|
};
|
||||||
|
if ((typeName _booleans) isEqualTo "BOOL") then // assume simulation and damage settings are defined in the new way as , bool, bool, ...
|
||||||
|
{
|
||||||
|
_sim = _x select 4;
|
||||||
|
_dam = _x select 3;
|
||||||
|
};
|
||||||
|
|
||||||
|
private _objPos = _center vectorAdd _relPos;
|
||||||
|
|
||||||
|
if (_className isKindOf "House" && blck_hideRocksAndPlants) then
|
||||||
|
{
|
||||||
|
private _shrubs = nearestTerrainObjects[_objPos,["TREE", "SMALL TREE", "BUSH","FENCE", "WALL","ROCK"], sizeOf _className];
|
||||||
|
if !(_shrubs isEqualTo []) then
|
||||||
|
{
|
||||||
|
_hiddenObjs append _shrubs;
|
||||||
|
{_x hideObjectGlobal true} forEach _shrubs;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_obj = createVehicle[_className,[0,0,0],[],0,"CAN_COLLIDE"];
|
||||||
|
_obj setPosATL _objPos;
|
||||||
|
_newObjs pushback (netID _obj);
|
||||||
|
[_obj, _dir] call blck_fnc_setDirUp;
|
||||||
|
_obj setVectorUp [0,0,1];
|
||||||
|
_obj enableDynamicSimulation _sim;
|
||||||
|
_obj allowDamage _dam;
|
||||||
|
if ((typeOf _obj) isKindOf "LandVehicle" || (typeOf _obj) isKindOf "Air" || (typeOf _obj) isKindOf "Ship") then
|
||||||
|
{
|
||||||
|
[_obj] call blck_fnc_configureMissionVehicle;
|
||||||
|
};
|
||||||
|
} forEach _objects;
|
||||||
|
|
||||||
|
[_newObjs,_hiddenObjs];
|
||||||
|
|
@ -27,18 +27,23 @@ _units = [];
|
|||||||
_abort = false;
|
_abort = false;
|
||||||
_pos = [];
|
_pos = [];
|
||||||
|
|
||||||
// Define _missionEmplacedWeapons if not already configured.
|
private _emplacedWepData = +_missionEmplacedWeapons;
|
||||||
if (_missionEmplacedWeapons isEqualTo []) then
|
//diag_log format["_spawnEmplacedWeaponArray(30): _noEmplacedWeapons = %1 | _emplacedWepData = %2",_noEmplacedWeapons,_emplacedWepData];
|
||||||
|
|
||||||
|
// Define _emplacedWepData if not already configured.
|
||||||
|
if (_emplacedWepData isEqualTo []) then
|
||||||
{
|
{
|
||||||
_missionEmplacedWeaponPositions = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius;
|
private _wepPositions = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius;
|
||||||
|
|
||||||
{
|
{
|
||||||
_static = selectRandom blck_staticWeapons;
|
_static = selectRandom blck_staticWeapons;
|
||||||
_missionEmplacedWeapons pushback [_static,_x];
|
_emplacedWepData pushback [_static,_x];
|
||||||
} forEach _missionEmplacedWeaponPositions;
|
} forEach _wepPositions;
|
||||||
_useRelativePos = false;
|
_useRelativePos = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//diag_log format["_spawnEmplacedWeaponArray(45): _noEmplacedWeapons = %1 | _emplacedWepData = %2",_noEmplacedWeapons,_emplacedWepData];
|
||||||
|
|
||||||
{
|
{
|
||||||
if (_useRelativePos) then
|
if (_useRelativePos) then
|
||||||
{
|
{
|
||||||
@ -77,7 +82,7 @@ if (_missionEmplacedWeapons isEqualTo []) then
|
|||||||
_return = grpNull;
|
_return = grpNull;
|
||||||
["createGroup returned grpNull","warning"] call blck_fnc_log;
|
["createGroup returned grpNull","warning"] call blck_fnc_log;
|
||||||
};
|
};
|
||||||
} forEach _missionEmplacedWeapons;
|
} forEach _emplacedWepData;
|
||||||
if !(_abort) then
|
if !(_abort) then
|
||||||
{
|
{
|
||||||
blck_monitoredVehicles append _emplacedWeps;
|
blck_monitoredVehicles append _emplacedWeps;
|
||||||
|
@ -10,7 +10,37 @@
|
|||||||
*/
|
*/
|
||||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||||
|
|
||||||
params["_building","_group",["_noStatics",0],["_typesStatics",blck_staticWeapons],["_noUnits",0],["_aiDifficultyLevel","Red"], ["_uniforms",[]],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_launcher","none"],["_weaponList",[]],["_sideArms",[]]];
|
/*
|
||||||
|
_building,
|
||||||
|
_group,
|
||||||
|
_noStatics,
|
||||||
|
_typesStatics,
|
||||||
|
_noUnits,
|
||||||
|
_aiDifficultyLevel,
|
||||||
|
_uniforms,
|
||||||
|
_headGear,
|
||||||
|
_vests,
|
||||||
|
_backpacks,
|
||||||
|
"none",
|
||||||
|
_weaponList,
|
||||||
|
_sideArms
|
||||||
|
*/
|
||||||
|
params[
|
||||||
|
"_building",
|
||||||
|
"_group",
|
||||||
|
["_noStatics",0],
|
||||||
|
["_typesStatics",blck_staticWeapons],
|
||||||
|
["_noUnits",0],
|
||||||
|
["_aiDifficultyLevel","Red"],
|
||||||
|
["_uniforms",[]],
|
||||||
|
["_headGear",[]],
|
||||||
|
["_vests",[]],
|
||||||
|
["_backpacks",[]],
|
||||||
|
["_launcher","none"],
|
||||||
|
["_weaponList",[]],
|
||||||
|
["_sideArms",[]]
|
||||||
|
];
|
||||||
|
|
||||||
if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
|
if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
|
||||||
if (_sideArms isEqualTo []) then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms};
|
if (_sideArms isEqualTo []) then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms};
|
||||||
if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
|
if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
|
||||||
@ -19,18 +49,20 @@ if (_vests isEqualTo []) then {_vests = [_aiDifficultyLevel] call blck_fnc_
|
|||||||
if (_backpacks isEqualTo []) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
|
if (_backpacks isEqualTo []) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks};
|
||||||
|
|
||||||
private["_unit","_obj","_staticClassName","_usedBldPsn","_pos","_obj"];
|
private["_unit","_obj","_staticClassName","_usedBldPsn","_pos","_obj"];
|
||||||
private _allBldPsn = [_building] call BIS_fnc_buildingPositions;
|
private _allBldPsn = ([_building] call BIS_fnc_buildingPositions) call BIS_fnc_arrayShuffle;
|
||||||
private _usedBldPsn = [];
|
private _countBldPsn = count _allBldPsn;
|
||||||
private _floor = floor((count _allBldPsn)/2);
|
private _statics = _noStatics min ceil(_countBldPsn/2);
|
||||||
private _ceil = ceil((count _allBldPsn)/2);
|
private _units = _countBldPsn - _statics;
|
||||||
private _statics = if (_ceil > _noStatics) then {_noStatics} else {_ceil};
|
diag_log format["_fnc_spawnGarrisonInsideBuilding_relPos: _statics = %1 | _units = %2 | count _allBldPsn = %3 | _allBldPsn %4",_statics,_units,count _allBldPsn,_allBldPsn];
|
||||||
private _units = if (_floor > _noUnits) then {_noUnits} else {_floor};
|
|
||||||
private _staticsSpawned = [];
|
private _staticsSpawned = [];
|
||||||
|
private _locsUsed = [];
|
||||||
uiSleep 1;
|
uiSleep 1;
|
||||||
for "_i" from 1 to _statics do
|
for "_i" from 1 to _statics do
|
||||||
{
|
{
|
||||||
_pos = selectRandom _allBldPsn;
|
if (_allBldPsn isEqualTo []) exitWith {};
|
||||||
_allBldPsn = _allBldPsn - [_pos];
|
_pos = _allBldPsn deleteAt 0;
|
||||||
|
diag_log format["_fnc_spawnGarrisonInsideBuilding_relPos: _pos = %1",_pos];
|
||||||
|
_locsUsed pushBack _pos;
|
||||||
_staticClassName = selectRandom _typesStatics;
|
_staticClassName = selectRandom _typesStatics;
|
||||||
_obj = [_staticClassName, [0,0,0]] call blck_fnc_spawnVehicle;
|
_obj = [_staticClassName, [0,0,0]] call blck_fnc_spawnVehicle;
|
||||||
_obj setVariable["GRG_vehType","emplaced"];
|
_obj setVariable["GRG_vehType","emplaced"];
|
||||||
@ -39,12 +71,20 @@ for "_i" from 1 to _statics do
|
|||||||
_unit = [[0,0,0],_group,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_launcher,_weaponList,_sideArms,false,true] call blck_fnc_spawnUnit;
|
_unit = [[0,0,0],_group,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_launcher,_weaponList,_sideArms,false,true] call blck_fnc_spawnUnit;
|
||||||
_unit moveInGunner _obj;
|
_unit moveInGunner _obj;
|
||||||
};
|
};
|
||||||
|
private _infantryPos = _allBldPsn;
|
||||||
for "_i" from 1 to _units do
|
for "_i" from 1 to _units do
|
||||||
{
|
{
|
||||||
_pos = selectRandom _allBldPsn;
|
if (_allBldPsn isEqualTo []) exitWith {};
|
||||||
_allBldPsn = _allBldPsn - [_pos];
|
_pos = _allBldPsn deleteAt 0;
|
||||||
_unit = [[0,0,0],_group,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_launcher,_weaponList,_sideArms,false,true] call blck_fnc_spawnUnit;
|
_unit = [[0,0,0],_group,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_launcher,_weaponList,_sideArms,false,true] call blck_fnc_spawnUnit;
|
||||||
_unit setPosATL _pos;
|
_unit setPosATL _pos;
|
||||||
|
{
|
||||||
|
_wp = _group addWaypoint [_x, 0];
|
||||||
|
_wp setWaypointType "MOVE";
|
||||||
|
_wp setWaypointCompletionRadius 0;
|
||||||
|
_wp waypointAttachObject _building;
|
||||||
|
_wp setWaypointHousePosition _foreachindex;
|
||||||
|
_wp setWaypointTimeout [15, 20, 30];
|
||||||
|
} forEach (_building buildingPos -1);
|
||||||
};
|
};
|
||||||
_staticsSpawned
|
_staticsSpawned
|
||||||
|
@ -22,22 +22,25 @@ if (_backpacks isEqualTo []) then {_backpacks = [_skillAI] call blck_fnc_sele
|
|||||||
if (_weaponList isEqualTo []) then {_weaponList = [_skillAI] call blck_fnc_selectAILoadout};
|
if (_weaponList isEqualTo []) then {_weaponList = [_skillAI] call blck_fnc_selectAILoadout};
|
||||||
if (_sideArms isEqualTo []) then {[_skillAI] call blck_fnc_selectAISidearms};
|
if (_sideArms isEqualTo []) then {[_skillAI] call blck_fnc_selectAISidearms};
|
||||||
|
|
||||||
|
private["_spawnPos","_return"];
|
||||||
|
private _vehicles = [];
|
||||||
private["_vehGroup","_vehiclePatrolSpawns","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_vehicle","_return","_abort","_spawnPos","_v"];
|
private _missionAI = [];
|
||||||
_vehicles = [];
|
private _abort = false;
|
||||||
_missionAI = [];
|
private _patrolsThisMission = +_missionPatrolVehicles;
|
||||||
_abort = false;
|
//diag_log format["_spawnMissionVehiclePatrols(30): _noVehiclePatrols = %1 | _patrolsThisMission = %2",_noVehiclePatrols,_patrolsThisMission];
|
||||||
|
if (_patrolsThisMission isEqualTo []) then
|
||||||
if (_missionPatrolVehicles isEqualTo []) then
|
|
||||||
{
|
{
|
||||||
_useRelativePos = false;
|
_useRelativePos = false;
|
||||||
_vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius;
|
private _spawnLocations = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius;
|
||||||
|
//diag_log format["_spawnMissionVehiclePatrols (35): _spawnLocations = %1",_spawnLocations];
|
||||||
{
|
{
|
||||||
_v = [_skillAI] call blck_fnc_selectPatrolVehicle;
|
|
||||||
_missionPatrolVehicles pushBack [_v, _x];
|
private _v = [_skillAI] call blck_fnc_selectPatrolVehicle;
|
||||||
}forEach _vehiclePatrolSpawns;
|
_patrolsThisMission pushBack [_v, _x];
|
||||||
|
diag_log format["_spawnMissionVehiclePatrols(36): _v = %1 | _patrolsThisMission = %2",_v,_patrolsThisMission];
|
||||||
|
}forEach _spawnLocations;
|
||||||
};
|
};
|
||||||
|
//diag_log format["_spawnMissionVehiclePatrols(42): _patrolsThisMission = %1",_patrolsThisMission];
|
||||||
#define configureWaypoints false
|
#define configureWaypoints false
|
||||||
{
|
{
|
||||||
if (_useRelativePos) then
|
if (_useRelativePos) then
|
||||||
@ -46,16 +49,16 @@ if (_missionPatrolVehicles isEqualTo []) then
|
|||||||
} else {
|
} else {
|
||||||
_spawnPos = _x select 1;
|
_spawnPos = _x select 1;
|
||||||
};
|
};
|
||||||
_vehicle = _x select 0;
|
private _vehicle = _x select 0;
|
||||||
_vehGroup = [blck_AI_Side,true] call blck_fnc_createGroup;
|
private _vehGroup = [blck_AI_Side,true] call blck_fnc_createGroup;
|
||||||
_patrolVehicle = objNull;
|
_patrolVehicle = objNull;
|
||||||
|
|
||||||
if !(isNull _vehGroup) then
|
if !(isNull _vehGroup) then
|
||||||
{
|
{
|
||||||
_vehGroup setVariable["soldierType","vehicle"];
|
_vehGroup setVariable["soldierType","vehicle"];
|
||||||
[_vehGroup,_spawnPos,_coords,_crewCount,_crewCount,_skillAI,1,2,false,_uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup;
|
[_vehGroup,_spawnPos,_coords,_crewCount,_crewCount,_skillAI,1,2,false,_uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup;
|
||||||
_missionAI append (units _vehGroup);
|
_missionAI append (units _vehGroup);
|
||||||
blck_monitoredMissionAIGroups pushBack _vehGroup;
|
blck_monitoredMissionAIGroups pushBack _vehGroup;
|
||||||
|
_spawnPos = _spawnPos findEmptyPosition[0,50,_vehicle];;
|
||||||
#define useWaypoints true
|
#define useWaypoints true
|
||||||
_patrolVehicle = [_coords,_spawnPos,_vehicle,40,60,_vehGroup,useWaypoints,_crewCount] call blck_fnc_spawnVehiclePatrol;
|
_patrolVehicle = [_coords,_spawnPos,_vehicle,40,60,_vehGroup,useWaypoints,_crewCount] call blck_fnc_spawnVehiclePatrol;
|
||||||
|
|
||||||
@ -66,7 +69,8 @@ if (_missionPatrolVehicles isEqualTo []) then
|
|||||||
} else {
|
} else {
|
||||||
_abort = true;
|
_abort = true;
|
||||||
};
|
};
|
||||||
} forEach _missionPatrolVehicles;
|
} forEach _patrolsThisMission;
|
||||||
|
|
||||||
if !(_abort) then
|
if !(_abort) then
|
||||||
{
|
{
|
||||||
blck_monitoredVehicles append _vehicles;
|
blck_monitoredVehicles append _vehicles;
|
||||||
|
@ -17,10 +17,10 @@ if (blck_missionsRunning >= blck_maxSpawnedMissions) exitWith {};
|
|||||||
|
|
||||||
if (_noActiveMissions < _maxNoMissions && diag_tickTime > _waitTime && blck_missionsRunning < blck_maxSpawnedMissions) then
|
if (_noActiveMissions < _maxNoMissions && diag_tickTime > _waitTime && blck_missionsRunning < blck_maxSpawnedMissions) then
|
||||||
{
|
{
|
||||||
|
blck_dynamicMissionsSpawned = blck_dynamicMissionsSpawned + 1;
|
||||||
// time to reset timers and spawn something.
|
// time to reset timers and spawn something.
|
||||||
private _wt = diag_tickTime + _tmin + (random(_tMax - _tMin));
|
private _wt = diag_tickTime + _tmin + (random(_tMax - _tMin));
|
||||||
private _missionInitialized = [_x,selectRandom _missionsData] call blck_fnc_initializeMission;
|
private _missionInitialized = [_x,selectRandom _missionsData,blck_dynamicMissionsSpawned] call blck_fnc_initializeMission;
|
||||||
if (blck_debugLevel >= 3) then
|
if (blck_debugLevel >= 3) then
|
||||||
{
|
{
|
||||||
if !(_missionInitialized) then
|
if !(_missionInitialized) then
|
||||||
|
@ -13,30 +13,33 @@
|
|||||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||||
params["_coords","_missionLandscape",["_min",3],["_max",15],["_nearest",1]];
|
params["_coords","_missionLandscape",["_min",3],["_max",15],["_nearest",1]];
|
||||||
|
|
||||||
private["_objects","_wreck","_dir","_dirOffset"];
|
|
||||||
#define maxObjectSpawnRadius 25
|
#define maxObjectSpawnRadius 25
|
||||||
#define minObjectSpawnRadius 15
|
#define minObjectSpawnRadius 15
|
||||||
private _objectSpawnRange = maxObjectSpawnRadius - minObjectSpawnRadius;
|
private _objectSpawnRange = maxObjectSpawnRadius - minObjectSpawnRadius;
|
||||||
|
|
||||||
_objects = [];
|
private _newObjs = [];
|
||||||
_wreck = createVehicle ["RoadCone_L_F", _coords]; // To designate the mission center
|
private _hiddenObjs = [];
|
||||||
_wreck allowDamage true;
|
|
||||||
_wreck enableSimulation false;
|
|
||||||
_wreck enableSimulationGlobal false;
|
|
||||||
_wreck enableDynamicSimulation false;
|
|
||||||
_objects pushBack _wreck;
|
|
||||||
{
|
|
||||||
|
|
||||||
private _dir = random(360);
|
{
|
||||||
private _radius = minObjectSpawnRadius + random(maxObjectSpawnRadius);
|
private _spawnPos = _coords getPos[minObjectSpawnRadius + random(maxObjectSpawnRadius), random(359)];
|
||||||
_wreck = createVehicle[_x, _coords getPos[_radius,_dir], [], 2];
|
private _objClassName = _x;
|
||||||
_wreck allowDamage true;
|
if (_objClassName isKindOf "House" && blck_hideRocksAndPlants) then
|
||||||
_wreck enableSimulation false;
|
{
|
||||||
_wreck enableSimulationGlobal false;
|
private _shrubs = nearestTerrainObjects[_spawnPos,["TREE", "SMALL TREE", "BUSH","FENCE", "WALL","ROCK"], sizeOf _objClassName];
|
||||||
_wreck enableDynamicSimulation false;
|
if !(_shrubs isEqualTo []) then
|
||||||
_wreck setDir (_wreck getRelDir _coords);
|
{
|
||||||
_objects pushback _wreck;
|
_hiddenObjs append _shrubs;
|
||||||
|
{_x hideObjectGlobal true} forEach _shrubs;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
private _obj = createVehicle[_x, _spawnPos, [], 2];
|
||||||
|
_obj allowDamage true;
|
||||||
|
_obj enableSimulation false;
|
||||||
|
_obj enableSimulationGlobal false;
|
||||||
|
_obj enableDynamicSimulation false;
|
||||||
|
_obj setDir (_obj getRelDir _coords);
|
||||||
|
_newObjs pushback (netID _obj);
|
||||||
sleep 0.1;
|
sleep 0.1;
|
||||||
} forEach _missionLandscape;
|
} forEach _missionLandscape;
|
||||||
|
|
||||||
_objects
|
[_newObjs,_hiddenObjs]
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
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";
|
||||||
|
|
||||||
|
params["_center","_objects","_relative"];
|
||||||
|
private _spawnedObjects = [];
|
||||||
|
{
|
||||||
|
_x params["_className","_relPos","_dir","_booleans"];
|
||||||
|
private _objPos = _center vectorAdd _relPos;
|
||||||
|
private _obj = createSimpleObject [_className,ATLToASL _objPos];
|
||||||
|
_obj setDir _dir;
|
||||||
|
_obj setVectorUp [0,0,1];
|
||||||
|
_spawnedObjects pushBack _obj;
|
||||||
|
} forEach _objects;
|
||||||
|
_spawnedObjects
|
@ -18,7 +18,8 @@
|
|||||||
|
|
||||||
if (diag_tickTime > _unit getVariable ["blck_cleanupAt",0]) then
|
if (diag_tickTime > _unit getVariable ["blck_cleanupAt",0]) then
|
||||||
{
|
{
|
||||||
if (_nearplayer isequalto []) then {
|
if (_nearplayer isequalto []) then
|
||||||
|
{
|
||||||
{
|
{
|
||||||
deleteVehicle _x;
|
deleteVehicle _x;
|
||||||
}forEach nearestObjects [getPos _unit,["WeaponHolderSimulated","GroundWeapoonHolder"],3];
|
}forEach nearestObjects [getPos _unit,["WeaponHolderSimulated","GroundWeapoonHolder"],3];
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||||
|
|
||||||
private ["_i","_weap","_skin","_unit","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices","_optics","_pointers","_muzzles","_underbarrel","_legalOptics"];
|
private ["_i","_weap","_unit","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices","_optics","_pointers","_muzzles","_underbarrel","_legalOptics"];
|
||||||
params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", []],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false],["_garrison",false]];
|
params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", []],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false],["_garrison",false]];
|
||||||
|
|
||||||
if (_weaponList isEqualTo []) then {_weaponList = [_skillLevel] call blck_fnc_selectAILoadout};
|
if (_weaponList isEqualTo []) then {_weaponList = [_skillLevel] call blck_fnc_selectAILoadout};
|
||||||
@ -60,11 +60,6 @@ if (_scuba) then
|
|||||||
_unit swiminDepth (([_pos] call blck_fnc_findWaterDepth) / 2);
|
_unit swiminDepth (([_pos] call blck_fnc_findWaterDepth) / 2);
|
||||||
};
|
};
|
||||||
|
|
||||||
_skin = "";
|
|
||||||
_counter = 1;
|
|
||||||
|
|
||||||
_unit forceAddUniform (selectRandom _uniforms);
|
|
||||||
|
|
||||||
//Sets AI Tactics
|
//Sets AI Tactics
|
||||||
_unit enableAI "ALL";
|
_unit enableAI "ALL";
|
||||||
if(_garrison) then
|
if(_garrison) then
|
||||||
@ -75,6 +70,14 @@ _unit allowDammage true;
|
|||||||
_unit setBehaviour "COMBAT";
|
_unit setBehaviour "COMBAT";
|
||||||
_unit setunitpos "AUTO";
|
_unit setunitpos "AUTO";
|
||||||
|
|
||||||
|
if (surfaceIsWater (getPos _unit)) then
|
||||||
|
{
|
||||||
|
_uniforms = blck_UMS_uniforms;
|
||||||
|
_headGear = blck_UMS_headgear;
|
||||||
|
_weaponList = blck_UMS_weapons;
|
||||||
|
_vests = blck_UMS_vests;
|
||||||
|
};
|
||||||
|
_unit forceAddUniform (selectRandom _uniforms);
|
||||||
if !(_headGear isEqualTo []) then
|
if !(_headGear isEqualTo []) then
|
||||||
{
|
{
|
||||||
_unit addHeadgear (selectRandom _headGear);
|
_unit addHeadgear (selectRandom _headGear);
|
||||||
@ -89,18 +92,17 @@ _weap = selectRandom _weaponList;
|
|||||||
_unit addWeaponGlobal _weap;
|
_unit addWeaponGlobal _weap;
|
||||||
_ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines");
|
_ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines");
|
||||||
_unit addMagazines[selectRandom _ammochoices,3];
|
_unit addMagazines[selectRandom _ammochoices,3];
|
||||||
|
/*
|
||||||
_optics = getArray (configfile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems");
|
_optics = getArray (configfile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems");
|
||||||
_pointers = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "PointerSlot" >> "compatibleItems");
|
_pointers = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "PointerSlot" >> "compatibleItems");
|
||||||
_muzzles = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "MuzzleSlot" >> "compatibleItems");
|
_muzzles = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "MuzzleSlot" >> "compatibleItems");
|
||||||
_underbarrel = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "UnderBarrelSlot" >> "compatibleItems");
|
_underbarrel = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "UnderBarrelSlot" >> "compatibleItems");
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom ([_weap, 101] call BIS_fnc_compatibleItems))}; // muzzles
|
||||||
|
if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom ([_weap, 201] call BIS_fnc_compatibleItems))}; // optics
|
||||||
if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom _muzzles)};
|
if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom ([_weap, 301] call BIS_fnc_compatibleItems))}; // pointers
|
||||||
if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom _optics)};
|
if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom ([_weap, 302] call BIS_fnc_compatibleItems))}; // underbarrel
|
||||||
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
|
if ((count(getArray (configFile >> "cfgWeapons" >> _weap >> "muzzles"))) > 1) then
|
||||||
{
|
{
|
||||||
_unit addMagazine "1Rnd_HE_Grenade_shell";
|
_unit addMagazine "1Rnd_HE_Grenade_shell";
|
||||||
@ -123,7 +125,8 @@ if (round(random 10) <= 5) then
|
|||||||
{
|
{
|
||||||
_unit addItem selectRandom blck_specialItems;
|
_unit addItem selectRandom blck_specialItems;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
if ( !(_Launcher isEqualTo "none") && !(_backpacks isEqualTo [])) then
|
if ( !(_Launcher isEqualTo "none") && !(_backpacks isEqualTo [])) then
|
||||||
{
|
{
|
||||||
_unit addWeaponGlobal _Launcher;
|
_unit addWeaponGlobal _Launcher;
|
||||||
@ -139,6 +142,26 @@ if ( !(_Launcher isEqualTo "none") && !(_backpacks isEqualTo [])) then
|
|||||||
_unit addBackpack selectRandom _backpacks;
|
_unit addBackpack selectRandom _backpacks;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
if !(_backpacks isEqualTo []) then
|
||||||
|
{
|
||||||
|
if (_Launcher isEqualTo "none") then
|
||||||
|
{
|
||||||
|
if ( random (1) < blck_chanceBackpack) then
|
||||||
|
{
|
||||||
|
_unit addBackpack selectRandom _backpacks;
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
_unit addWeaponGlobal _Launcher;
|
||||||
|
_unit addBackpack (selectRandom _backpacks);
|
||||||
|
private _mags = getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines");
|
||||||
|
for "_i" from 1 to 3 do
|
||||||
|
{
|
||||||
|
_unit addItemToBackpack (_mags select 0); // call BIS_fnc_selectRandom;
|
||||||
|
};
|
||||||
|
_unit setVariable["Launcher",_launcher,true];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
if(sunOrMoon < 0.2 && blck_useNVG)then
|
if(sunOrMoon < 0.2 && blck_useNVG)then
|
||||||
{
|
{
|
||||||
|
@ -12,15 +12,50 @@
|
|||||||
*/
|
*/
|
||||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||||
|
|
||||||
params["_vehType","_pos",["_special","NONE"],["_radius",30]];
|
params["_vehType",["_pos",[]],["_special","NONE"],["_radius",30]];
|
||||||
|
|
||||||
private _veh = createVehicle[_vehType, _pos, [], _radius, _special];
|
private _veh = createVehicle[_vehType, _pos, [], _radius, _special];
|
||||||
|
if (count _pos == 2) then {
|
||||||
|
_pos pushBack 0;
|
||||||
|
[format["_fnc_spawnVehicle(20): _pos had only 2 parameters, new value = %1",_pos],'warning'] call blck_fnc_log;
|
||||||
|
};
|
||||||
|
if (_pos isEqualTo []) then
|
||||||
|
{
|
||||||
|
[format["_fnc_spawnVehicle(20): _pos undefined, now set to [0,0,0]"],'warning'] call blck_fnc_log;
|
||||||
|
};
|
||||||
_veh setVectorUp surfaceNormal position _veh;
|
_veh setVectorUp surfaceNormal position _veh;
|
||||||
_veh allowDamage true;
|
_veh allowDamage true;
|
||||||
_veh enableRopeAttach true;
|
_veh enableRopeAttach true;
|
||||||
_veh setVariable["blck_vehicle",true];
|
_veh setVariable["blck_vehicle",true];
|
||||||
[_veh] call blck_fnc_protectVehicle;
|
[_veh] call blck_fnc_protectVehicle;
|
||||||
[_veh] call blck_fnc_emptyObject;
|
[_veh] call blck_fnc_emptyObject;
|
||||||
|
if (_vehType isKindOf "Plane") then {
|
||||||
|
private _pos = [_pos select 0, _pos select 1, ((getPos _veh) select 2) + 400];
|
||||||
|
_veh setPosATL _pos;
|
||||||
|
// adapted from: https://community.bistudio.com/wiki/setVelocity
|
||||||
|
private _vel = velocity _veh;
|
||||||
|
private _dir = direction _veh;
|
||||||
|
#define speedIncr 150
|
||||||
|
_veh setVelocity [
|
||||||
|
(_vel select 0) + (sin _dir * speedIncr),
|
||||||
|
(_vel select 1) + (cos _dir * speedIncr),
|
||||||
|
(_vel select 2)
|
||||||
|
];
|
||||||
|
_veh flyInHeightASL [200,100,400];
|
||||||
|
};
|
||||||
|
if (_vehType isKindOf "Helicopter") then
|
||||||
|
{
|
||||||
|
private _pos = [_pos select 0, _pos select 1, ((getPos _veh) select 2) + 100];
|
||||||
|
_veh setPosATL _pos;
|
||||||
|
private _vel = velocity _veh;
|
||||||
|
private _dir = direction _veh;
|
||||||
|
#define speedIncr 25
|
||||||
|
_veh setVelocity [
|
||||||
|
(_vel select 0) + (sin _dir * speedIncr),
|
||||||
|
(_vel select 1) + (cos _dir * speedIncr),
|
||||||
|
(_vel select 2)
|
||||||
|
];
|
||||||
|
_veh flyInHeightASL [200,100,400];
|
||||||
|
};
|
||||||
_veh
|
_veh
|
||||||
|
|
||||||
|
@ -15,9 +15,8 @@
|
|||||||
private _functions = [
|
private _functions = [
|
||||||
// General functions
|
// General functions
|
||||||
["blck_fnc_waitTimer","\q\addons\custom_server\Compiles\Functions\GMS_fnc_waitTimer.sqf"],
|
["blck_fnc_waitTimer","\q\addons\custom_server\Compiles\Functions\GMS_fnc_waitTimer.sqf"],
|
||||||
//["blck_fnc_timedOut","\q\addons\custom_server\Compiles\Functions\GMS_fnc_timedOut.sqf"],
|
["blck_fnc_restoreHiddenObjects","\q\addons\custom_server\Compiles\Functions\GMS_fnc_restoreHiddenObjects.sqf"],
|
||||||
["blck_fnc_FindSafePosn","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findSafePosn.sqf"],
|
["blck_fnc_FindSafePosn","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findSafePosn_4.sqf"],
|
||||||
["blck_fnc_findSafePosn_2","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findSafePosn_2.sqf"],
|
|
||||||
["blck_fnc_randomPosition","\q\addons\custom_server\Compiles\Functions\GMS_fnc_randomPosn.sqf"], // find a randomPosn. see script for details.
|
["blck_fnc_randomPosition","\q\addons\custom_server\Compiles\Functions\GMS_fnc_randomPosn.sqf"], // find a randomPosn. see script for details.
|
||||||
["blck_fnc_findPositionsAlongARadius","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findPositionsAlongARadius.sqf"],
|
["blck_fnc_findPositionsAlongARadius","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findPositionsAlongARadius.sqf"],
|
||||||
["blck_fnc_giveTakeCrypto","\q\addons\custom_server\Compiles\Functions\GMS_fnc_giveTakeCrypto.sqf"],
|
["blck_fnc_giveTakeCrypto","\q\addons\custom_server\Compiles\Functions\GMS_fnc_giveTakeCrypto.sqf"],
|
||||||
@ -75,7 +74,7 @@ private _functions = [
|
|||||||
["blck_fnc_spawnCrate","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnCrate.sqf"], // Simply spawns a crate of a specified type at a specific position.
|
["blck_fnc_spawnCrate","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnCrate.sqf"], // Simply spawns a crate of a specified type at a specific position.
|
||||||
["blck_fnc_spawnMissionCrates","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionCrates.sqf"],
|
["blck_fnc_spawnMissionCrates","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionCrates.sqf"],
|
||||||
["blck_fnc_cleanupObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_cleanUpObjects.sqf"],
|
["blck_fnc_cleanupObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_cleanUpObjects.sqf"],
|
||||||
["blck_fnc_spawnCompositionObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnBaseObjects.sqf"],
|
["blck_fnc_spawnCompositionObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnCompositionObjects.sqf"],
|
||||||
["blck_fnc_spawnRandomLandscape","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnRandomLandscape.sqf"],
|
["blck_fnc_spawnRandomLandscape","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnRandomLandscape.sqf"],
|
||||||
["blck_fnc_spawnMissionVehiclePatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionVehiclePatrols.sqf"],
|
["blck_fnc_spawnMissionVehiclePatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionVehiclePatrols.sqf"],
|
||||||
["blck_fnc_spawnEmplacedWeaponArray","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnEmplacedWeaponArray.sqf"],
|
["blck_fnc_spawnEmplacedWeaponArray","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnEmplacedWeaponArray.sqf"],
|
||||||
@ -118,7 +117,8 @@ private _functions = [
|
|||||||
["blck_fnc_sm_AddGroupToArray", "\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_AddGroupToArray.sqf"],
|
["blck_fnc_sm_AddGroupToArray", "\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_AddGroupToArray.sqf"],
|
||||||
["blck_fnc_initializeMission", "\q\addons\custom_server\Compiles\Missions\GMS_fnc_initializeMission.sqf"],
|
["blck_fnc_initializeMission", "\q\addons\custom_server\Compiles\Missions\GMS_fnc_initializeMission.sqf"],
|
||||||
["blck_fnc_monitorInitializedMissions","\q\addons\custom_server\Compiles\Missions\GMS_fnc_monitorInitializedMissions.sqf"],
|
["blck_fnc_monitorInitializedMissions","\q\addons\custom_server\Compiles\Missions\GMS_fnc_monitorInitializedMissions.sqf"],
|
||||||
|
["blck_fnc_spawnSimpleObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnSimpleObjects.sqf"],
|
||||||
|
|
||||||
// Group-related functions
|
// Group-related functions
|
||||||
["blck_fnc_spawnGroup","\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"], // Spawn a single group and populate it with AI units]
|
["blck_fnc_spawnGroup","\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"], // Spawn a single group and populate it with AI units]
|
||||||
["blck_fnc_setupWaypoints","\q\addons\custom_server\Compiles\Groups\GMS_fnc_setupWaypoints.sqf"], // Set default waypoints for a group
|
["blck_fnc_setupWaypoints","\q\addons\custom_server\Compiles\Groups\GMS_fnc_setupWaypoints.sqf"], // Set default waypoints for a group
|
||||||
|
@ -26,6 +26,7 @@ blck_TriggerDistance = 1500;
|
|||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
// Do Not Touch Anything Below This Line
|
// Do Not Touch Anything Below This Line
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
|
|
||||||
blck_townLocations = []; //nearestLocations [blck_mapCenter, ["NameCity","NameCityCapital"], 30000];
|
blck_townLocations = []; //nearestLocations [blck_mapCenter, ["NameCity","NameCityCapital"], 30000];
|
||||||
blck_ActiveMissionCoords = [];
|
blck_ActiveMissionCoords = [];
|
||||||
blck_recentMissionCoords = [];
|
blck_recentMissionCoords = [];
|
||||||
@ -33,6 +34,7 @@ blck_monitoredVehicles = [];
|
|||||||
blck_livemissionai = [];
|
blck_livemissionai = [];
|
||||||
blck_monitoredMissionAIGroups = []; // Used to track groups in active missions for whatever purpose
|
blck_monitoredMissionAIGroups = []; // Used to track groups in active missions for whatever purpose
|
||||||
blck_oldMissionObjects = [];
|
blck_oldMissionObjects = [];
|
||||||
|
blck_hiddenTerrainObjects = [];
|
||||||
blck_pendingMissions = [];
|
blck_pendingMissions = [];
|
||||||
blck_missionsRunning = 0;
|
blck_missionsRunning = 0;
|
||||||
blck_missionsRun = 0;
|
blck_missionsRun = 0;
|
||||||
@ -45,13 +47,13 @@ blck_temporaryMarkers = [];
|
|||||||
blck_illuminatedCrates = []; // [crate,duration,freq of replacement]
|
blck_illuminatedCrates = []; // [crate,duration,freq of replacement]
|
||||||
blck_mainThreadUpdateInterval = 60;
|
blck_mainThreadUpdateInterval = 60;
|
||||||
blck_revealMode = "detailed"; //""basic" /*group or vehicle level reveals*/,detailed /*unit by unit reveals*/";
|
blck_revealMode = "detailed"; //""basic" /*group or vehicle level reveals*/,detailed /*unit by unit reveals*/";
|
||||||
|
blck_dynamicMissionsSpawned = 0;
|
||||||
blck_spawnerMode = 1;
|
blck_spawnerMode = 1;
|
||||||
blck_missionData = [];
|
blck_missionData = [];
|
||||||
blck_activeMissionsList = [];
|
blck_activeMissionsList = [];
|
||||||
blck_initializedMissionsList = [];
|
blck_initializedMissionsList = [];
|
||||||
blck_blackListedLocations = []; // [ [marker, time]]
|
blck_blackListedLocations = []; // [ [marker, time]]
|
||||||
|
blck_activeMonitorThreads = 0;
|
||||||
blck_validEndStates = ["allUnitsKilled", "playerNear", "allKilledOrPlayerNear","assetSecured"];
|
blck_validEndStates = ["allUnitsKilled", "playerNear", "allKilledOrPlayerNear","assetSecured"];
|
||||||
blck_validLootSpawnTimings = ["atMissionSpawnGround","atMissionSpawnAir","atMissionEndGround","atMissionEndAir"];
|
blck_validLootSpawnTimings = ["atMissionSpawnGround","atMissionSpawnAir","atMissionEndGround","atMissionEndAir"];
|
||||||
blck_validLootLoadTimings = ["atMissionCompletion", "atMissionSpawn"];
|
blck_validLootLoadTimings = ["atMissionCompletion", "atMissionSpawn"];
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp"
|
#include "\q\addons\custom_server\Configs\blck_defines.hpp"
|
||||||
#include "\q\addons\custom_server\init\build.sqf"
|
#include "\q\addons\custom_server\init\build.sqf"
|
||||||
/*
|
/*
|
||||||
changing any of these variables may break the mission systemChat
|
changing any of these variables may break the mission system
|
||||||
*/
|
*/
|
||||||
blck_locationBlackList = []; // Do not touch ...
|
blck_locationBlackList = []; // Do not touch ...
|
||||||
blck_debugON = false; // Do not touch ...
|
blck_debugON = false; // should be set to false; ...
|
||||||
blck_debugLevel = 0; // Do not touch ...
|
blck_debugLevel = 0; // should be set to 0 ...
|
||||||
#ifdef blck_milServer
|
#ifdef blck_milServer
|
||||||
if (true) exitWith
|
if (true) exitWith
|
||||||
{
|
{
|
||||||
@ -45,7 +45,8 @@
|
|||||||
blck_spawnMapAddons = false; // When true map addons will be spawned based on parameters define in custum_server\MapAddons\MapAddons_init.sqf
|
blck_spawnMapAddons = false; // When true map addons will be spawned based on parameters define in custum_server\MapAddons\MapAddons_init.sqf
|
||||||
blck_spawnStaticLootCrates = false; // When true, static loot crates will be spawned and loaded with loot as specified in custom_server\SLS\SLS_init_Epoch.sqf (or its exile equivalent).
|
blck_spawnStaticLootCrates = false; // When true, static loot crates will be spawned and loaded with loot as specified in custom_server\SLS\SLS_init_Epoch.sqf (or its exile equivalent).
|
||||||
blck_simulationManager = blck_useBlckeaglsSimulationManager;
|
blck_simulationManager = blck_useBlckeaglsSimulationManager;
|
||||||
//diag_log format["[blckeagls] blck_configs: blck_simulationManager = %1",blck_simulationManager];
|
blck_hideRocksAndPlants = true; // When true, any rocks, trees or bushes under enterable buildings will be 'hidden'
|
||||||
|
|
||||||
/*
|
/*
|
||||||
blck_simulationManagementOff - no simulation management occurs
|
blck_simulationManagementOff - no simulation management occurs
|
||||||
blck_useBlckeaglsSimulationManager - simulation is enabled/disabled by periodic checks for nearby players; a 'wake' function is included when a units simulation is turned on
|
blck_useBlckeaglsSimulationManager - simulation is enabled/disabled by periodic checks for nearby players; a 'wake' function is included when a units simulation is turned on
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
blck_spawnMapAddons = true; // When true map addons will be spawned based on parameters define in custum_server\MapAddons\MapAddons_init.sqf
|
blck_spawnMapAddons = true; // When true map addons will be spawned based on parameters define in custum_server\MapAddons\MapAddons_init.sqf
|
||||||
blck_spawnStaticLootCrates = true; // When true, static loot crates will be spawned and loaded with loot as specified in custom_server\SLS\SLS_init_Epoch.sqf (or its exile equivalent).
|
blck_spawnStaticLootCrates = true; // When true, static loot crates will be spawned and loaded with loot as specified in custom_server\SLS\SLS_init_Epoch.sqf (or its exile equivalent).
|
||||||
blck_simulationManager = blck_useBlckeaglsSimulationManagement;
|
blck_simulationManager = blck_useBlckeaglsSimulationManagement;
|
||||||
//diag_log format["[blckeagls] blck_configs: blck_simulationManager = %1",blck_simulationManager];
|
blck_hideRocksAndPlants = true; // When true, any rocks, trees or bushes under enterable buildings will be 'hidden'
|
||||||
|
|
||||||
// Note that you can define map-specific variants in custom_server\configs\blck_custom_config.sqf
|
// Note that you can define map-specific variants in custom_server\configs\blck_custom_config.sqf
|
||||||
blck_useTimeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below.
|
blck_useTimeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below.
|
||||||
blck_timeAccelerationDay = 2; // Daytime time accelearation
|
blck_timeAccelerationDay = 2; // Daytime time accelearation
|
||||||
|
@ -43,6 +43,6 @@ switch (toLower worldName) do
|
|||||||
case "lingor":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;};
|
case "lingor":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;};
|
||||||
case "takistan":{blck_mapCenter = [5500, 6500, 0];blck_mapRange = 5000;};
|
case "takistan":{blck_mapCenter = [5500, 6500, 0];blck_mapRange = 5000;};
|
||||||
case "lythium":{blck_mapCenter = [10000,10000,0];blck_mapRange = 8500;};
|
case "lythium":{blck_mapCenter = [10000,10000,0];blck_mapRange = 8500;};
|
||||||
case "vt7": {_mapCenter = [9000,9000,0]; _maxDistance = 9000};
|
case "vt7": {blck_mapCenter = [9000,9000,0]; blck_mapRange = 9000};
|
||||||
default {blck_mapCenter = [6322,7801,0]; blck_mapRange = 6000};
|
default {blck_mapCenter = [6322,7801,0]; blck_mapRange = 6000};
|
||||||
};
|
};
|
||||||
|
@ -107,7 +107,7 @@ switch (blck_simulationManager) do
|
|||||||
if ( !(blck_debugON) && (blck_debugLevel isEqualTo 0)) then
|
if ( !(blck_debugON) && (blck_debugLevel isEqualTo 0)) then
|
||||||
{
|
{
|
||||||
waitUntil{{isPlayer _x}count allPlayers > 0};
|
waitUntil{{isPlayer _x}count allPlayers > 0};
|
||||||
["]Player Connected, spawning missions"] call blck_fnc_log;
|
["Player Connected, spawning missions"] call blck_fnc_log;
|
||||||
} else {
|
} else {
|
||||||
["Debug mode ON, proceding without players"] call blck_fnc_log;
|
["Debug mode ON, proceding without players"] call blck_fnc_log;
|
||||||
};
|
};
|
||||||
@ -163,9 +163,6 @@ private _other = ["NameLocal"] call _fn_setupLocationType;
|
|||||||
private _airport = ["Airport"] call _fn_setupLocationType;
|
private _airport = ["Airport"] call _fn_setupLocationType;
|
||||||
|
|
||||||
blck_townLocations = _villages + _cites + _capitals + _marine + _other + _airport;
|
blck_townLocations = _villages + _cites + _capitals + _marine + _other + _airport;
|
||||||
{
|
|
||||||
blck_locationBlackList pushBack [locationPosition _x, blck_minDistanceFromTowns];
|
|
||||||
} forEach blck_townLocations;
|
|
||||||
|
|
||||||
//Start the mission timers
|
//Start the mission timers
|
||||||
if (blck_enableOrangeMissions > 0) then
|
if (blck_enableOrangeMissions > 0) then
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
#define blck_buildNumber 218
|
#define blck_buildNumber 230 // Address issues with cleanup of objects
|
||||||
#define blck_versionNumber 7.00
|
#define blck_versionNumber 7.02
|
||||||
#define blck_buildDate "8-29-20"
|
#define blck_buildDate "10-5-20"
|
||||||
|
Binary file not shown.
@ -8,17 +8,16 @@ params["_u",["_category","House"]];
|
|||||||
private _pos = getPosASL _u;
|
private _pos = getPosASL _u;
|
||||||
private _building = objNull;
|
private _building = objNull;
|
||||||
private _surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,10];
|
private _surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,10];
|
||||||
//diag_log format["_surfacesAbove = %1",_surfacesAbove];
|
|
||||||
{
|
{
|
||||||
if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)};
|
if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)};
|
||||||
} forEach _surfacesAbove;
|
} forEach _surfacesAbove;
|
||||||
if (_building isEqualTo objNull) then
|
if (_building isEqualTo objNull) then
|
||||||
{
|
{
|
||||||
private _surfacesBelow = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10],_u,_u,true,100];
|
private _surfacesBelow = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10],_u,_u,true,100];
|
||||||
//diag_log format["_surfacesBelow = %1",_surfacesBelow];
|
|
||||||
{
|
{
|
||||||
if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)};
|
if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)};
|
||||||
} forEach _surfacesBelow;
|
} forEach _surfacesBelow;
|
||||||
};
|
};
|
||||||
//diag_log format["_fn_buildingContainer: _u = %1 | _building = %2",_u,_building];
|
|
||||||
_building
|
_building
|
@ -1,34 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
#define oddsOfGarrison 0.67
|
|
||||||
#define maxGarrisonStatics 3
|
|
||||||
#define maxGarrisonUnits 4
|
|
||||||
#define typesGarrisonStatics [] // When empty a static will be randomly chosen from the defaults for blckeagls
|
|
||||||
#define garrisonMarkerObject "Sign_Sphere100cm_F" // This can be anything you like. I find this large sphere easy to see and convenient.
|
|
||||||
#define unitMarkerObject "Sign_Arrow_Direction_Green_F" // This can be anything. I chose this arrow type because it allows you to easily indicate direction.
|
|
||||||
|
|
||||||
_helpers = allMissionObjects garrisonMarkerObject;
|
|
||||||
//diag_log format["_helpers = %1",_helpers];
|
|
||||||
{
|
|
||||||
if ( (typeOf _x) isEqualTo garrisonMarkerObject) then
|
|
||||||
{
|
|
||||||
private _isInside = [_x] call _fn_isInside;
|
|
||||||
if (_isInside) then
|
|
||||||
{
|
|
||||||
_building = [_x] call _fn_buildingContainer;
|
|
||||||
blck_garrisonedBuildings pushbackunique _building;
|
|
||||||
blck_garrisonedBuildings pushbackunique _x;
|
|
||||||
// data structure ["building Classname",[/*building pos*/],/*building dir*/,/*odds of garrison*/, /*Max Statics*/,/*types statics*/,/*max units*/],
|
|
||||||
// 1 2 3 4 5 6 7 8 9
|
|
||||||
_line = format[' ["%1",%2,%3,%4,%5,%6,%7,%8,%9]',typeOf _building,(getPosATL _building) vectorDiff CENTER,getDir _building, 'true','true',oddsOfGarrison,maxGarrisonStatics,typesGarrisonStatics,maxGarrisonUnits];
|
|
||||||
systemChat _line;
|
|
||||||
//diag_log _line;
|
|
||||||
if (_forEachIndex == 0) then
|
|
||||||
{
|
|
||||||
_cb = _cb + format["%1%2",endl,_line];
|
|
||||||
} else {
|
|
||||||
_cb = _cb + format[",%1%2",endl,_line];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} forEach _helpers;
|
|
@ -1,9 +1,12 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
params["_building","_center"];
|
||||||
|
|
||||||
private _building = _this select 0;
|
|
||||||
private _CENTER = _this select 1;
|
|
||||||
private _pos = getPosATL _building;
|
private _pos = getPosATL _building;
|
||||||
private _garrisonedBuildings = missionNamespace getVariable["blck_garrisonedBuildings",[]];
|
private _garrisonedBuildings = missionNamespace getVariable["blck_garrisonedBuildings",[]];
|
||||||
private _count = 0;
|
private _count = 0;
|
||||||
@ -13,6 +16,7 @@ private _buildingGarrisonATL = [];
|
|||||||
private _configuredStatics = [];
|
private _configuredStatics = [];
|
||||||
private _configuredUnits = [];
|
private _configuredUnits = [];
|
||||||
private _statics = nearestObjects[getPosATL _building,["StaticWeapon"],sizeOf (typeOf _building)];
|
private _statics = nearestObjects[getPosATL _building,["StaticWeapon"],sizeOf (typeOf _building)];
|
||||||
|
private _units = nearestObjects[getPosATL _building,["Man"],sizeOf (typeOf _building)] select {(vehicle _x) isEqualTo _x};
|
||||||
private _lineBreak = toString [10];
|
private _lineBreak = toString [10];
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -20,11 +24,9 @@ private _lineBreak = toString [10];
|
|||||||
{
|
{
|
||||||
private _isInside = [_x] call blck3DEN_fnc_isInside;
|
private _isInside = [_x] call blck3DEN_fnc_isInside;
|
||||||
private _container = [_x] call blck3DEN_fnc_buildingContainer;
|
private _container = [_x] call blck3DEN_fnc_buildingContainer;
|
||||||
//diag_log format["evaluating building %1 static %2 isInside = %3 container = %4",_building,_x,_isInside,_container];
|
|
||||||
if (_isInside && (_container isEqualTo _building)) then
|
if (_isInside && (_container isEqualTo _building)) then
|
||||||
{
|
{
|
||||||
_configuredStatics pushBackUnique _x;
|
_configuredStatics pushBackUnique _x;
|
||||||
//diag_log format["Building %1 | buildingPos %2 | _pos %3",typeOf _x, getPosATL _x,_pos];
|
|
||||||
_staticsText pushBack [format['%1',typeOf _x],(getPosATL _x) vectorDiff (_pos),getDir _x];
|
_staticsText pushBack [format['%1',typeOf _x],(getPosATL _x) vectorDiff (_pos),getDir _x];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -32,7 +34,6 @@ private _lineBreak = toString [10];
|
|||||||
_staticsText joinString _lineBreak;
|
_staticsText joinString _lineBreak;
|
||||||
|
|
||||||
// Since this is run from the editor we do not have to worry about units running off from their original locations
|
// Since this is run from the editor we do not have to worry about units running off from their original locations
|
||||||
private _units = nearestObjects[getPosATL _building,["Man"],sizeOf (typeOf _building)] select {(vehicle _x) isEqualTo _x};
|
|
||||||
{
|
{
|
||||||
if !(_x in _configuredUnits) then
|
if !(_x in _configuredUnits) then
|
||||||
{
|
{
|
||||||
@ -47,20 +48,28 @@ private _units = nearestObjects[getPosATL _building,["Man"],sizeOf (typeOf _buil
|
|||||||
} forEach _units;
|
} forEach _units;
|
||||||
_unitsText joinString _lineBreak;
|
_unitsText joinString _lineBreak;
|
||||||
|
|
||||||
//diag_log format["_staticsText for building %1 = %2",_building,_staticsText];
|
|
||||||
//diag_log format["_unitsText for building %1 = %2",_building,_unitsText];
|
|
||||||
if !((_staticsText isEqualTo []) && (_unitsText isEqualTo [])) then
|
if !((_staticsText isEqualTo []) && (_unitsText isEqualTo [])) then
|
||||||
{
|
{
|
||||||
|
private _allowDamage = (_building get3DENAttribute "allowDamage") select 0;
|
||||||
|
private _enableSimulation = (_building get3DENAttribute "enableSimulation") select 0;
|
||||||
|
diag_log format["_configureGarrisonATL: _building %1 | damage %2 | simulation %3",_allowDamage,_enableSimulation];
|
||||||
_buildingGarrisonATL = [
|
_buildingGarrisonATL = [
|
||||||
format["%1",
|
format["%1",
|
||||||
typeOf _building],
|
typeOf _building],
|
||||||
(getPosATL _building) vectorDiff _pos,
|
(getPosATL _building) vectorDiff _center,
|
||||||
getDir _building,
|
getDir _building,
|
||||||
true,
|
_allowDamage,
|
||||||
true,
|
_enableSimulation,
|
||||||
_staticsText,
|
_staticsText,
|
||||||
_unitsText
|
_unitsText
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
//diag_log format["_buildingGarrisonATL = %1",_buildingGarrisonATL];
|
|
||||||
[_buildingGarrisonATL,_configuredStatics,_configuredUnits]
|
private "_return";
|
||||||
|
if (_buildingGarrisonATL isEqualTo []) then
|
||||||
|
{
|
||||||
|
_return = [];
|
||||||
|
} else {
|
||||||
|
_return = [_buildingGarrisonATL,_configuredStatics,_configuredUnits];
|
||||||
|
};
|
||||||
|
_return
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
params["_object"];
|
params["_object"];
|
||||||
|
|
||||||
@ -10,5 +15,4 @@ _p2 = _bbr select 1;
|
|||||||
_height = abs ((_p2 select 2) - (_p1 select 2));
|
_height = abs ((_p2 select 2) - (_p1 select 2));
|
||||||
_marker setPosATL [_markerPos select 0, _markerPos select 1, (_markerPos select 2) + _height];
|
_marker setPosATL [_markerPos select 0, _markerPos select 1, (_markerPos select 2) + _height];
|
||||||
_object setVariable ["marker",_marker];
|
_object setVariable ["marker",_marker];
|
||||||
diag_log format["_createGarrisonMarker: _object = %1 | _marker = %2 | _height = %3",_object,_marker,_height];
|
|
||||||
true
|
true
|
@ -1,4 +1,9 @@
|
|||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
params["_object"];
|
params["_object"];
|
||||||
|
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
params["_message"];
|
params["_message"];
|
||||||
|
|
||||||
// As found in fn_3DENExportTerrainBuilder.sqf
|
// As found in fn_3DENExportTerrainBuilder.sqf
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
params["_state"];
|
params["_state"];
|
||||||
all3DENEntities params ["_objects"];
|
all3DENEntities params ["_objects"];
|
||||||
_objects = _objects select {_x getVariable["garrisoned",false]};
|
_objects = _objects select {_x getVariable["garrisoned",false]};
|
||||||
diag_log format["displayGarrisonMarkers: _state = %2 | _objects = %1",_objects,_state];
|
|
||||||
missionNameSpace setVariable["blck_displayGarrisonMarkerOn",_state];
|
missionNameSpace setVariable["blck_displayGarrisonMarkerOn",_state];
|
||||||
{
|
{
|
||||||
if (_state) then // if the request was to show the markers then ....
|
if (_state) then // if the request was to show the markers then ....
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
params["_state"];
|
params["_state"];
|
||||||
all3DENEntities params ["_objects"];
|
all3DENEntities params ["_objects"];
|
||||||
_objects = _objects select {_x getVariable ["lootVehicle",false]};
|
_objects = _objects select {_x getVariable ["lootVehicle",false]};
|
||||||
diag_log format["displayLootMarkers: _state = %2 | _objects = %1",_objects,_state];
|
|
||||||
missionNamespace setVariable["blck_displayLootMarkerOn",_state];
|
missionNamespace setVariable["blck_displayLootMarkerOn",_state];
|
||||||
{
|
{
|
||||||
if (_state) then // if the request was to show the markers then ....
|
if (_state) then // if the request was to show the markers then ....
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
params["_end"];
|
params["_end"];
|
||||||
missionNamespace setVariable["blck_endMessage",_end];
|
missionNamespace setVariable["blck_endMessage",_end];
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
private _objects = get3DENSelected "object";
|
private _objects = get3DENSelected "object";
|
||||||
private "_message";
|
private "_message";
|
||||||
diag_log format["getGarrisonInfo: _object = %1",format["%1",_object]];
|
diag_log format["getGarrisonInfo: _object = %1",format["%1",_object]];
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship" || (typeOf _x) isKindOf "ThingX"};
|
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship" || (typeOf _x) isKindOf "ThingX"};
|
||||||
private "_message";
|
private "_message";
|
||||||
|
|
||||||
|
@ -8,5 +8,4 @@
|
|||||||
|
|
||||||
private _u = _this select 0;
|
private _u = _this select 0;
|
||||||
private _isInfantry = if ((_u isKindOf "Man") && (vehicle _u) isEqualTo _u) then {true} else {false};
|
private _isInfantry = if ((_u isKindOf "Man") && (vehicle _u) isEqualTo _u) then {true} else {false};
|
||||||
//diag_log format["_fn_isInfantry: _isInfantry = %1",_isInfantry];
|
|
||||||
_isInfantry
|
_isInfantry
|
@ -1,3 +1,9 @@
|
|||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
params["_object"];
|
params["_object"];
|
||||||
if !(_object getVariable["marker",""] isEqualTo "") then
|
if !(_object getVariable["marker",""] isEqualTo "") then
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
params["_object"];
|
params["_object"];
|
||||||
if !(_object getvariable["marker",""] isEqualTo "") then
|
if !(_object getvariable["marker",""] isEqualTo "") then
|
||||||
{
|
{
|
||||||
[_object] call blck3DEN_fnc_removeMarker;
|
[_object] call blck3DEN_fnc_removeMarker;
|
||||||
_object setVariable ["marker",nil];
|
_object setVariable ["marker",nil];
|
||||||
//_object setVariable ["lootVehicle",nil];
|
|
||||||
//_object setVariable ["garrisoned",nil];
|
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
params["_object"];
|
params["_object"];
|
||||||
|
|
||||||
_object removeAllEventHandlers "UnregisteredFromWorld3DEN";
|
_object removeAllEventHandlers "UnregisteredFromWorld3DEN";
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
params["_state"];
|
params["_state"];
|
||||||
|
private _markersStateON = missionNamespace getVariable["blck_displayGarrisonMarkerOn",false];
|
||||||
|
[false] call blck3DEN_fnc_displayGarrisonMarkers;
|
||||||
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "House"};
|
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "House"};
|
||||||
private "_message";
|
private "_message";
|
||||||
if (_objects isEqualTo []) exitWith
|
if (_objects isEqualTo []) exitWith
|
||||||
@ -8,6 +15,7 @@ if (_objects isEqualTo []) exitWith
|
|||||||
_message = "Select one or more buildings to configure";
|
_message = "Select one or more buildings to configure";
|
||||||
systemChat _message;
|
systemChat _message;
|
||||||
diag_log _message;
|
diag_log _message;
|
||||||
|
[_message,"Status"] call BIS_fnc_3DENShowMessage;
|
||||||
};
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -24,10 +32,16 @@ if (_objects isEqualTo []) exitWith
|
|||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
_message = format["Object type %1 ignored: only enterable buildings can be garrisoned",typeOf _x];
|
_message = format["Object type %1 ignored: only enterable buildings can be garrisoned",typeOf _x];
|
||||||
systemChat _x;
|
systemChat _message;
|
||||||
diag_log _x;
|
diag_log _message;
|
||||||
|
[_message,"Status"] call BIS_fnc_3DENShowMessage;
|
||||||
};
|
};
|
||||||
|
|
||||||
} forEach _objects;
|
} forEach _objects;
|
||||||
_message = format["Garrison State of %1 buildings updated to %2",count _objects,_state];
|
_message = format["Garrison State of %1 buildings updated to %2",count _objects,_state];
|
||||||
systemChat _message;
|
systemChat _message;
|
||||||
|
if (_markersStateON) then
|
||||||
|
{
|
||||||
|
[true] call blck3DEN_fnc_displayGarrisonMarkers;
|
||||||
|
};
|
||||||
|
[_message,"Status"] call BIS_fnc_3DENShowMessage;
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
params["_state"];
|
params["_state"];
|
||||||
|
private _markerStateON = missionNameSpace getVariable["blck_displayLootMarkerOn",false];
|
||||||
|
[false] call blck3DEN_fnc_displayLootMarkers;
|
||||||
private "_message";
|
private "_message";
|
||||||
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship"}; //
|
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship"}; //
|
||||||
if (_objects isEqualTo []) exitWith
|
if (_objects isEqualTo []) exitWith
|
||||||
@ -38,5 +40,10 @@ if (_objects isEqualTo []) exitWith
|
|||||||
systemChat _message;
|
systemChat _message;
|
||||||
};
|
};
|
||||||
} forEach _objects;
|
} forEach _objects;
|
||||||
|
|
||||||
|
if (_markerStateON) then
|
||||||
|
{
|
||||||
|
[true] call blck3DEN_fnc_displayLootMarkers;
|
||||||
|
};
|
||||||
_message = format["Loot Vehicle State of %1 objects updated to %2",count _objects,_state];
|
_message = format["Loot Vehicle State of %1 objects updated to %2",count _objects,_state];
|
||||||
systemChat _m;
|
systemChat _m;
|
@ -1,4 +1,9 @@
|
|||||||
|
/*
|
||||||
|
blckeagls 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
private _objects = get3DENSelected "object";
|
private _objects = get3DENSelected "object";
|
||||||
private _markers select {(typeOf _x) = _markerType};
|
private _markers select {(typeOf _x) = _markerType};
|
||||||
{
|
{
|
||||||
|
@ -1,16 +1,11 @@
|
|||||||
|
|
||||||
|
all3DENEntities params ["_objects"];
|
||||||
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship"}; //
|
|
||||||
if (count _objects == 1) then
|
|
||||||
{
|
{
|
||||||
private _obj = _objects select 0;
|
diag_log format [
|
||||||
private _marker = create3DENEntity ["object","Sign_Arrow_Blue_F",getPos _obj];
|
"classname %1 | position %2 | direction %3 | isSimple = %4",
|
||||||
private _bbr = boundingBoxReal vehicle player;
|
(_x get3DENAttribute "ItemClass") select 0,
|
||||||
_p1 = _bbr select 0;
|
(_x get3DENAttribute "position") select 0,
|
||||||
_p2 = _bbr select 1;
|
((_x get3DENAttribute "rotation") select 0) select 2,
|
||||||
_height = abs ((_p2 select 2) - (_p1 select 2));
|
(_x get3DENAttribute "objectIsSimple") select 0
|
||||||
_markerPos = getPos _marker;
|
];
|
||||||
_marker setPosATL [_markerPos select 0, _markerPos select 1, (_markerPos select 2) + _height];
|
} forEach _objects;
|
||||||
} else {
|
|
||||||
systemChat "no vehicles selected";
|
|
||||||
};
|
|
||||||
|
@ -23,26 +23,6 @@ lootVehicleVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "
|
|||||||
buildingPosGarrisonVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "buildingPosGarrisonVariableName");
|
buildingPosGarrisonVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "buildingPosGarrisonVariableName");
|
||||||
buildingATLGarrisionVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "buildingATLGarrisionVariableName");
|
buildingATLGarrisionVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "buildingATLGarrisionVariableName");
|
||||||
|
|
||||||
/*
|
|
||||||
{
|
|
||||||
diag_log format["param %1 = %2",_forEachIndex,_x];
|
|
||||||
} forEach [
|
|
||||||
objectAtMissionCenter,
|
|
||||||
blck_minAI,
|
|
||||||
blck_maxAI,
|
|
||||||
minPatrolRadius,
|
|
||||||
maxPatrolRadius,
|
|
||||||
maxVehiclePatrolRadius,
|
|
||||||
aircraftPatrolRadius,
|
|
||||||
oddsOfGarison,
|
|
||||||
maxGarrisonStatics,
|
|
||||||
typesGarrisonStatics,
|
|
||||||
blck_MissionDifficulty,
|
|
||||||
lootVehicleVariableName,
|
|
||||||
buildingPosGarrisonVariableName,
|
|
||||||
buildingATLGarrisionVariableName
|
|
||||||
];*/
|
|
||||||
|
|
||||||
CENTER = [0,0,0];
|
CENTER = [0,0,0];
|
||||||
|
|
||||||
diag_log format["Dynamic Export called at %1",diag_tickTime];
|
diag_log format["Dynamic Export called at %1",diag_tickTime];
|
||||||
@ -87,8 +67,8 @@ if (isNil "blck_missionEndCondition") then
|
|||||||
Look for an object defined in CfgBlck3DEN \ configs \ that marks the center of the mission
|
Look for an object defined in CfgBlck3DEN \ configs \ that marks the center of the mission
|
||||||
and set the coords of the center if such an object is found
|
and set the coords of the center if such an object is found
|
||||||
*/
|
*/
|
||||||
|
all3DENEntities params ["_objects","_groups","_triggers","_systems","_waypoints","_markers","_layers","_comments"];
|
||||||
private _centerMarkers = allMissionObjects objectAtMissionCenter;
|
private _centerMarkers = _objects select {(typeOf _x) isEqualTo objectAtMissionCenter};
|
||||||
diag_log format["_centerMarkers = %1",_centerMarkers];
|
diag_log format["_centerMarkers = %1",_centerMarkers];
|
||||||
if !(_centerMarkers isEqualTo []) then
|
if !(_centerMarkers isEqualTo []) then
|
||||||
{
|
{
|
||||||
@ -99,13 +79,6 @@ if !(_centerMarkers isEqualTo []) then
|
|||||||
diag_log format["Place such an object or a marker to ensure the mission is accurately stored and spawned"];
|
diag_log format["Place such an object or a marker to ensure the mission is accurately stored and spawned"];
|
||||||
};
|
};
|
||||||
|
|
||||||
all3DENEntities params ["_objects","_groups","_triggers","_systems","_waypoints","_markers","_layers","_comments"];
|
|
||||||
private _units = [];
|
|
||||||
{
|
|
||||||
{
|
|
||||||
if (vehicle _x isEqualTo _x) then {_units pushBack _x};
|
|
||||||
} forEach (units _x);
|
|
||||||
} forEach _groups;
|
|
||||||
|
|
||||||
private["_m1","_markerPos","_markerType","_markerShape","_markerColor","_markerText","_markerBrush","_markerSize","_markerAlpha"];
|
private["_m1","_markerPos","_markerType","_markerShape","_markerColor","_markerText","_markerBrush","_markerSize","_markerAlpha"];
|
||||||
/*
|
/*
|
||||||
@ -115,11 +88,11 @@ if !(_markers isEqualTo []) then
|
|||||||
{
|
{
|
||||||
_m1 = _markers select 0;
|
_m1 = _markers select 0;
|
||||||
_markerType = (_m1 get3DENAttribute "itemClass") select 0;
|
_markerType = (_m1 get3DENAttribute "itemClass") select 0;
|
||||||
_markerShape = (_m1 get3DENAttribute "markerType") select 0;
|
//_markerShape = (_m1 get3DENAttribute "markerType") select 0;
|
||||||
_markerColor = (_m1 get3DENAttribute "baseColor") select 0;
|
_markerColor = (_m1 get3DENAttribute "baseColor") select 0;
|
||||||
_markerText = (_m1 get3DENAttribute "text") select 0;
|
_markerText = (_m1 get3DENAttribute "text") select 0;
|
||||||
if !(_markerText isEqualTo "") then {blck_dynamicmarkerMissionName = _markerText};
|
if !(_markerText isEqualTo "") then {blck_dynamicmarkerMissionName = _markerText};
|
||||||
_markerBrush = (_m1 get3DENAttribute "markerBrush") select 0;
|
_markerBrush = (_m1 get3DENAttribute "brush") select 0;
|
||||||
_markerPos = (_m1 get3DENAttribute "position") select 0;
|
_markerPos = (_m1 get3DENAttribute "position") select 0;
|
||||||
_markerSize = (_m1 get3DENAttribute "size2") select 0;
|
_markerSize = (_m1 get3DENAttribute "size2") select 0;
|
||||||
_markerText = (_m1 get3DENAttribute "text") select 0;
|
_markerText = (_m1 get3DENAttribute "text") select 0;
|
||||||
@ -136,11 +109,11 @@ if !(_markers isEqualTo []) then
|
|||||||
diag_log format["<WARNING> More than one marker was found; only the first marker was processed"];
|
diag_log format["<WARNING> More than one marker was found; only the first marker was processed"];
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
_markerType = "mil_square";
|
_markerType = "ELLIPSE";
|
||||||
_markerShape = "null";
|
//_markerShape = "ELLIPSE";
|
||||||
_markerSize = "[0,0]";
|
_markerSize = "[250,250]";
|
||||||
_markerColor = "COLORRED";
|
_markerColor = "COLORRED";
|
||||||
_markerBrush = "null";
|
_markerBrush = "SOLID";
|
||||||
if !(_objects isEqualTo []) then
|
if !(_objects isEqualTo []) then
|
||||||
{
|
{
|
||||||
CENTER = getPosATL (_objects select 0);
|
CENTER = getPosATL (_objects select 0);
|
||||||
@ -149,7 +122,6 @@ if !(_markers isEqualTo []) then
|
|||||||
};
|
};
|
||||||
diag_log format["<WARNING> No marker was found, using default values and position for mission center position"];
|
diag_log format["<WARNING> No marker was found, using default values and position for mission center position"];
|
||||||
};
|
};
|
||||||
diag_log format["_m1 = %1 | _type = %2 | _shape = %3 | _size = %4 | _color = %5 | _brush = %6 | _text = %7",_m1,_markerType,_markerShape,_markerSize,_markerColor,_markerBrush,_markerText];
|
|
||||||
|
|
||||||
if (CENTER isEqualTo [0,0,0]) then
|
if (CENTER isEqualTo [0,0,0]) then
|
||||||
{
|
{
|
||||||
@ -162,7 +134,7 @@ private _garisonedStatics = [];
|
|||||||
private _garisonedUnits = [];
|
private _garisonedUnits = [];
|
||||||
|
|
||||||
private _landscape = _objects select{
|
private _landscape = _objects select{
|
||||||
!(isSimpleObject _x) &&
|
!((_x get3DENAttribute "objectIsSimple") select 0) &&
|
||||||
((typeOf _x) isKindOf "Static" || ( (typeOf _x) isKindOf "ThingX")) &&
|
((typeOf _x) isKindOf "Static" || ( (typeOf _x) isKindOf "ThingX")) &&
|
||||||
!((typeOf _x) isKindOf "ReammoBox_F") &&
|
!((typeOf _x) isKindOf "ReammoBox_F") &&
|
||||||
!(_x getVariable["isLootContainer",false]) &&
|
!(_x getVariable["isLootContainer",false]) &&
|
||||||
@ -170,51 +142,80 @@ private _landscape = _objects select{
|
|||||||
};
|
};
|
||||||
|
|
||||||
private _garisonedPos = [];
|
private _garisonedPos = [];
|
||||||
private _helpers = _objects select {((typeOf _x) isEqualTo garisonMarkerObject)};
|
diag_log format["_exportDynamic (152): count _landscape = %1",count _landscape];
|
||||||
|
for "_i" from 1 to (count _landscape) do
|
||||||
{
|
{
|
||||||
if (_x getVariable["garrisoned",false]) then
|
if (isNull _building) exitWith {};
|
||||||
|
private _building = _landscape deleteAt 0;
|
||||||
|
if (_building getVariable["garrisoned",false]) then
|
||||||
{
|
{
|
||||||
_garisonedBuildings pushbackunique _building;
|
private _allowDamage = (_building get3DENAttribute "allowDamage") select 0;
|
||||||
// data structure ["building Classname",[/*building pos*/],/*building dir*/,/*odds of garrison*/, /*Max Statics*/,/*types statics*/,/*max units*/],
|
private _enableSimulation = (_building get3DENAttribute "enableSimulation") select 0;
|
||||||
// 1 2 3 4 5 6 7 8 9
|
diag_log format["_exportDynamic-garisonedPos: _building %1 | damage %2 | simulation %3",_building,_allowDamage,_enableSimulation];
|
||||||
_garisonedPos pushBack format[' [" %1",%2,%3,%4,%5,%6,%7,%8,%9]',typeOf _building,(getPosATL _building) vectorDiff CENTER,getDir _building, 'true','true',oddsOfGarrison,maxGarrisonStatics,typesGarrisonStatics,maxGarrisonUnits];
|
/*
|
||||||
|
// From blck_fnc_garrisonBuilding_RelPosSystem
|
||||||
|
// ["Land_Unfinished_Building_02_F",[-21.8763,-45.978,-0.00213432],0,true,true,0.67,3,[],4],
|
||||||
|
_x params["_bldClassName","_bldRelPos","_bldDir","_s","_d","_p","_noStatics","_typesStatics","_noUnits"];
|
||||||
|
*/
|
||||||
|
_garisonedPos pushBack format[' ["%1",%2,%3,%4,%5,%6,%7,%8,%9]',
|
||||||
|
typeOf _building,
|
||||||
|
(getPosATL _building) vectorDiff CENTER,
|
||||||
|
getDir _building,
|
||||||
|
_allowDamage,
|
||||||
|
_enableSimulation,
|
||||||
|
oddsOfGarrison,
|
||||||
|
maxGarrisonStatics,
|
||||||
|
typesGarrisonStatics,
|
||||||
|
maxGarrisonUnits];
|
||||||
|
} else {
|
||||||
|
_landscape pushBack _building;
|
||||||
};
|
};
|
||||||
} forEach _landscape;
|
};
|
||||||
//diag_log format["CENTER = %1 | _landscape = %2",CENTER,_landscape];
|
|
||||||
private _garrisonATL = [];
|
private _garrisonATL = [];
|
||||||
|
diag_log format["_exportDynamic (169): count _landscape = %1",count _landscape];
|
||||||
|
for "_i" from 1 to (count _landscape) do
|
||||||
{
|
{
|
||||||
_atl = [_x,CENTER] call blck3DEN_fnc_configureGarrisonATL;
|
if (isNull _building) exitWith {};
|
||||||
|
private _building = _landscape deleteAt 0;
|
||||||
// format["_fnc_exportDynamic: _building = %1 | _atl = %2",_x,_atl];
|
_atl = [_building,CENTER] call blck3DEN_fnc_configureGarrisonATL;
|
||||||
//diag_log format["_fnc_exportDynamic: typeName _atl = %1",typeName _atl];
|
if (_atl isEqualTo []) then {
|
||||||
if (typeName _atl isEqualTo "STRING") then {diag_log format["_fnc_exportDynamic: length _atl = %1 | _atl = '' is %2",count _atl, _atl isEqualTo ""]};
|
_landscape pushBack _building;
|
||||||
if !(_atl isEqualTo []) then {
|
} else {
|
||||||
if !((_atl select 0) isEqualTo []) then
|
|
||||||
{
|
|
||||||
_garrisonATL pushBack (format[" %1",_atl select 0]);
|
_garrisonATL pushBack (format[" %1",_atl select 0]);
|
||||||
_garisonedBuildings pushBack _x;
|
_garisonedBuildings pushBack _building;
|
||||||
_garisonedStatics append (_atl select 1);
|
_garisonedStatics append (_atl select 1);
|
||||||
_garisonedUnits append (_atl select 2)
|
_garisonedUnits append (_atl select 2);
|
||||||
//diag_log format["_fnc_exportDynamic: garrisoned building added: %1",_atl];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
} forEach _landscape;
|
};
|
||||||
|
|
||||||
diag_log format["_garrisonATL = %1",_garrisonATL];
|
diag_log format["_garrisonATL = %1",_garrisonATL];
|
||||||
|
diag_log format["_exportDynamic (185): count _landscape = %1",count _landscape];
|
||||||
private _missionLandscape = [];
|
private _missionLandscape = [];
|
||||||
|
for "_i" from 1 to (count _landscape) do
|
||||||
{
|
{
|
||||||
if !(_x in _garisonedBuildings) then
|
private _building = _landscape deleteAt 0;
|
||||||
|
if (isNull _building) exitWith {};
|
||||||
|
if !(_building getVariable["marker",false]) then
|
||||||
{
|
{
|
||||||
_missionLandscape pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true'];
|
private _allowDamage = (_building get3DENAttribute "allowDamage") select 0;
|
||||||
|
private _enableSimulation = (_building get3DENAttribute "enableSimulation") select 0;
|
||||||
|
diag_log format["typeOf _x = %1 | damage = %2 | simulation = %3",typeOf _building,_allowDamage,_enableSimulatoin];
|
||||||
|
_missionLandscape pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _building,(getPosATL _building) vectorDiff CENTER,getDir _building, _allowDamage,_enableSimulation];
|
||||||
};
|
};
|
||||||
}forEach _landscape;
|
};
|
||||||
|
|
||||||
private _simpleObjects = _objects select {isSimpleObject _x};
|
private _simpleObjects = _objects select {(_x get3DENAttribute "objectIsSimple") select 0};
|
||||||
diag_log format["_simpleObjects = %1",_simpleObjects];
|
diag_log format["_simpleObjects = %1",_simpleObjects];
|
||||||
private _missionSimpleObjects = [];
|
private _missionSimpleObjects = [];
|
||||||
{
|
{
|
||||||
_missionSimpleObjects pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true'];
|
private _object = format[' ["%1",%2,%3]',
|
||||||
|
(_x get3DENAttribute "ItemClass") select 0,
|
||||||
|
((_x get3DENAttribute "position") select 0) vectorDiff CENTER,
|
||||||
|
((_x get3DENAttribute "rotation") select 0) select 2
|
||||||
|
];
|
||||||
|
diag_log format["_object = %1",_object];
|
||||||
|
_missionSimpleObjects pushBack _object;
|
||||||
} forEach _simpleObjects;
|
} forEach _simpleObjects;
|
||||||
|
|
||||||
private _missionLootVehicles = [];
|
private _missionLootVehicles = [];
|
||||||
@ -232,7 +233,7 @@ _missionPatrolVehicles = [];
|
|||||||
private _patrolVehicles = _objects select {
|
private _patrolVehicles = _objects select {
|
||||||
(((typeOf _x) isKindOf "Car") || ((typeOf _x) isKindOf "Tank") || ((typeOf _x) isKindOf "Ship")) &&
|
(((typeOf _x) isKindOf "Car") || ((typeOf _x) isKindOf "Tank") || ((typeOf _x) isKindOf "Ship")) &&
|
||||||
!((typeOf _x) isKindOf "SDV_01_base_F") &&
|
!((typeOf _x) isKindOf "SDV_01_base_F") &&
|
||||||
!(_x in _lootVehicles)
|
!(_x getVariable["lootvehicle",false])
|
||||||
};
|
};
|
||||||
diag_log format["_patrolVehicles = %1",_patrolVehicles];
|
diag_log format["_patrolVehicles = %1",_patrolVehicles];
|
||||||
{
|
{
|
||||||
@ -275,6 +276,12 @@ private _infantry = _units select {
|
|||||||
};
|
};
|
||||||
diag_log format["_garisonedUnits = %1",_garisonedUnits];
|
diag_log format["_garisonedUnits = %1",_garisonedUnits];
|
||||||
diag_log format["_infantry = %1",_infantry];
|
diag_log format["_infantry = %1",_infantry];
|
||||||
|
private _units = [];
|
||||||
|
{
|
||||||
|
{
|
||||||
|
if (vehicle _x isEqualTo _x) then {_units pushBack _x};
|
||||||
|
} forEach (units _x);
|
||||||
|
} forEach _groups;
|
||||||
_infantryGroups = [];
|
_infantryGroups = [];
|
||||||
{
|
{
|
||||||
_infantryGroups pushBack format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,blck_minAI,blck_maxAI,blck_MissionDifficulty,minPatrolRadius,maxPatrolRadius];
|
_infantryGroups pushBack format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,blck_minAI,blck_maxAI,blck_MissionDifficulty,minPatrolRadius,maxPatrolRadius];
|
||||||
@ -339,7 +346,7 @@ _lines pushback (_missionLandscape joinString (format [",%1", _lineBreak]));
|
|||||||
_lines pushBack "];";
|
_lines pushBack "];";
|
||||||
_lines pushBack "";
|
_lines pushBack "";
|
||||||
_lines pushBack "_simpleObjects = [";
|
_lines pushBack "_simpleObjects = [";
|
||||||
_lines pushback (_simpleObjects joinString (format [",%1", _lineBreak]));
|
_lines pushback (_missionSimpleObjects joinString (format [",%1", _lineBreak]));
|
||||||
_lines pushBack "];";
|
_lines pushBack "];";
|
||||||
_lines pushBack "";
|
_lines pushBack "";
|
||||||
_lines pushBack "_missionLootVehicles = [";
|
_lines pushBack "_missionLootVehicles = [";
|
||||||
@ -407,6 +414,8 @@ _lines pushBack format["_maxNoAI = blck_MaxAI_%1;",blck_MissionDifficulty];
|
|||||||
_lines pushBack format["_noAIGroups = blck_AIGrps_%1;",blck_MissionDifficulty];
|
_lines pushBack format["_noAIGroups = blck_AIGrps_%1;",blck_MissionDifficulty];
|
||||||
_lines pushBack format["_noVehiclePatrols = blck_SpawnVeh_%1;",blck_MissionDifficulty];
|
_lines pushBack format["_noVehiclePatrols = blck_SpawnVeh_%1;",blck_MissionDifficulty];
|
||||||
_lines pushBack format["_noEmplacedWeapons = blck_SpawnEmplaced_%1;",blck_MissionDifficulty];
|
_lines pushBack format["_noEmplacedWeapons = blck_SpawnEmplaced_%1;",blck_MissionDifficulty];
|
||||||
|
_lines pushBack "_submarinePatrols = 0; // Default number of submarine patrols at pirate missions";
|
||||||
|
_lines pushBack "_scubaPatrols = 0; // Default number of scuba diver patrols at pirate missions";
|
||||||
_lines pushBack "";
|
_lines pushBack "";
|
||||||
_lines pushBack '#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";';
|
_lines pushBack '#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";';
|
||||||
|
|
||||||
|
@ -89,11 +89,11 @@ if !(_markers isEqualTo []) then
|
|||||||
{
|
{
|
||||||
_m1 = _markers select 0;
|
_m1 = _markers select 0;
|
||||||
_markerType = (_m1 get3DENAttribute "itemClass") select 0;
|
_markerType = (_m1 get3DENAttribute "itemClass") select 0;
|
||||||
_markerShape = (_m1 get3DENAttribute "markerType") select 0;
|
//_markerShape = (_m1 get3DENAttribute "markerType") select 0;
|
||||||
_markerColor = (_m1 get3DENAttribute "baseColor") select 0;
|
_markerColor = (_m1 get3DENAttribute "baseColor") select 0;
|
||||||
_markerText = (_m1 get3DENAttribute "text") select 0;
|
_markerText = (_m1 get3DENAttribute "text") select 0;
|
||||||
if !(_markerText isEqualTo "") then {blck_dynamicmarkerMissionName = _markerText};
|
if !(_markerText isEqualTo "") then {blck_dynamicmarkerMissionName = _markerText};
|
||||||
_markerBrush = (_m1 get3DENAttribute "markerBrush") select 0;
|
_markerBrush = (_m1 get3DENAttribute "brush") select 0;
|
||||||
_markerPos = (_m1 get3DENAttribute "position") select 0;
|
_markerPos = (_m1 get3DENAttribute "position") select 0;
|
||||||
_markerSize = (_m1 get3DENAttribute "size2") select 0;
|
_markerSize = (_m1 get3DENAttribute "size2") select 0;
|
||||||
_markerText = (_m1 get3DENAttribute "text") select 0;
|
_markerText = (_m1 get3DENAttribute "text") select 0;
|
||||||
@ -103,7 +103,7 @@ if !(_markers isEqualTo []) then
|
|||||||
*/
|
*/
|
||||||
} else {
|
} else {
|
||||||
_markerType = "mil_square";
|
_markerType = "mil_square";
|
||||||
_markerShape = "";
|
//_markerShape = "";
|
||||||
_markerSize = [0,0];
|
_markerSize = [0,0];
|
||||||
_markerColor = "COLORRED";
|
_markerColor = "COLORRED";
|
||||||
_markerBrush = "";
|
_markerBrush = "";
|
||||||
@ -116,7 +116,7 @@ private _garisonedStatics = [];
|
|||||||
private _garisonedUnits = [];
|
private _garisonedUnits = [];
|
||||||
|
|
||||||
private _landscape = _objects select{
|
private _landscape = _objects select{
|
||||||
!(isSimpleObject _x) &&
|
!((_x get3DENAttribute "objectIsSimple") select 0) &&
|
||||||
((typeOf _x) isKindOf "Static") &&
|
((typeOf _x) isKindOf "Static") &&
|
||||||
!((typeOf _x) isKindOf "Helper")
|
!((typeOf _x) isKindOf "Helper")
|
||||||
};
|
};
|
||||||
@ -124,14 +124,20 @@ private _landscape = _objects select{
|
|||||||
diag_log format["CENTER = %1 | _landscape = %2","ignored",_landscape];
|
diag_log format["CENTER = %1 | _landscape = %2","ignored",_landscape];
|
||||||
private _missionLandscape = [];
|
private _missionLandscape = [];
|
||||||
{
|
{
|
||||||
_missionLandscape pushBack format[' ["%1",%2,%3,%4]',typeOf _x,(getPosATL _x),[vectorDir _x,vectorUp _x], [true,true]];
|
private _allowDamage = (_x get3DENAttribute "allowDamage") select 0;
|
||||||
|
private _enableSimulation = (_x get3DENAttribute "enableSimulation") select 0;
|
||||||
|
_missionLandscape pushBack format[' ["%1",%2,%3,%4]',typeOf _x,(getPosATL _x),[vectorDir _x,vectorUp _x], [_allowDamage,_enableSimulation]];
|
||||||
}forEach _landscape;
|
}forEach _landscape;
|
||||||
|
|
||||||
private _simpleObjects = _objects select {isSimpleObject _x};
|
private _simpleObjects = _objects select {(_x get3DENAttribute "objectIsSimple") select 0};
|
||||||
diag_log format["_simpleObjects = %1",_simpleObjects];
|
diag_log format["_simpleObjects = %1",_simpleObjects];
|
||||||
private _missionSimpleObjects = [];
|
private _missionSimpleObjects = [];
|
||||||
{
|
{
|
||||||
_missionSimpleObjects pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x),[vectorDir _x,vectorUp _x], 'true','true'];
|
_missionSimpleObjects pushBack format[' ["%1",%2,%3]',
|
||||||
|
(_x get3DENAttribute "ItemClass") select 0,
|
||||||
|
((_x get3DENAttribute "position") select 0),
|
||||||
|
((_x get3DENAttribute "rotation") select 0) select 2
|
||||||
|
];
|
||||||
} forEach _simpleObjects;
|
} forEach _simpleObjects;
|
||||||
|
|
||||||
private _missionLootVehicles = [];
|
private _missionLootVehicles = [];
|
||||||
@ -247,7 +253,7 @@ _lines pushback (_missionLandscape joinString (format [",%1", _lineBreak]));
|
|||||||
_lines pushBack "];";
|
_lines pushBack "];";
|
||||||
_lines pushBack "";
|
_lines pushBack "";
|
||||||
_lines pushBack "_simpleObjects = [";
|
_lines pushBack "_simpleObjects = [";
|
||||||
_lines pushback (_simpleObjects joinString (format [",%1", _lineBreak]));
|
_lines pushback (_missionSimpleObjects joinString (format [",%1", _lineBreak]));
|
||||||
_lines pushBack "];";
|
_lines pushBack "];";
|
||||||
_lines pushBack "";
|
_lines pushBack "";
|
||||||
_lines pushBack "_missionLootVehicles = [";
|
_lines pushBack "_missionLootVehicles = [";
|
||||||
@ -285,7 +291,6 @@ _lines pushBack "";
|
|||||||
_lines pushBack "/*";
|
_lines pushBack "/*";
|
||||||
_lines pushBack " Use the parameters below to customize your mission - see the template or blck_configs.sqf for details about each them";
|
_lines pushBack " Use the parameters below to customize your mission - see the template or blck_configs.sqf for details about each them";
|
||||||
_lines pushBack "*/";
|
_lines pushBack "*/";
|
||||||
|
|
||||||
_linse pushBack "_useMines = blck_useMines;";
|
_linse pushBack "_useMines = blck_useMines;";
|
||||||
_lines pushBack "_uniforms = blck_SkinList;";
|
_lines pushBack "_uniforms = blck_SkinList;";
|
||||||
_lines pushBack "_headgear = blck_headgear;";
|
_lines pushBack "_headgear = blck_headgear;";
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
Variables to define
|
|
||||||
marker parameters
|
|
||||||
Marker Text
|
|
||||||
|
|
||||||
Mission start message
|
|
||||||
Mission end message
|
|
||||||
Mission level
|
|
||||||
|
|
||||||
To pull units:
|
|
||||||
private _units = allUnits;
|
|
||||||
|
|
||||||
|
|
||||||
To pull objects:
|
|
||||||
_center = allMissionObejcts "RoadCone_L_F";
|
|
||||||
_buildings = allMissionObjects "Building";
|
|
||||||
_things = allMissionObjects "ThingX";
|
|
||||||
_baseObjects = _buildings append _things;
|
|
||||||
|
|
||||||
_static = allMissionObejcts "StaticWeapon";
|
|
||||||
_vehicles = allMissionObejcts "Car" + allMissionObejcts "Tank" + allMissionObejcts "Ship";
|
|
||||||
_air = allMissionObejcts "Air";
|
|
@ -52,8 +52,8 @@ class CfgBlck3DEN
|
|||||||
class CfgVersion
|
class CfgVersion
|
||||||
{
|
{
|
||||||
version = 1.0;
|
version = 1.0;
|
||||||
build = 4;
|
build = 8;
|
||||||
date = "09/5/20";
|
date = "10/05/20";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@ class CfgFunctions
|
|||||||
|
|
||||||
class about {};
|
class about {};
|
||||||
class buildingContainer {};
|
class buildingContainer {};
|
||||||
|
class configureGarrisonATL {};
|
||||||
class createLootMarker {};
|
class createLootMarker {};
|
||||||
class createGarrisonMarker {};
|
class createGarrisonMarker {};
|
||||||
class display {};
|
class display {};
|
||||||
@ -54,11 +55,6 @@ class CfgFunctions
|
|||||||
class displayLootMarkers {};
|
class displayLootMarkers {};
|
||||||
class getGarrisonInfo {};
|
class getGarrisonInfo {};
|
||||||
class getLootVehicleInfo {};
|
class getLootVehicleInfo {};
|
||||||
//class getMissionGarrisonInfo {};
|
|
||||||
//class getMissionLootVehicleInfo {};
|
|
||||||
class help {};
|
|
||||||
class initializeAttributes {};
|
|
||||||
class isInfantry {};
|
|
||||||
class isInside {};
|
class isInside {};
|
||||||
class loadCratesTiming {};
|
class loadCratesTiming {};
|
||||||
class onDrag {};
|
class onDrag {};
|
||||||
@ -71,10 +67,6 @@ class CfgFunctions
|
|||||||
class setLootVehicle {};
|
class setLootVehicle {};
|
||||||
class setSpawnLocations {};
|
class setSpawnLocations {};
|
||||||
class spawnCratesTiming {};
|
class spawnCratesTiming {};
|
||||||
|
|
||||||
//class endMessage {};
|
|
||||||
//class startMessage {};
|
|
||||||
//class configureGarrisonATL {};
|
|
||||||
class versionInfo {};
|
class versionInfo {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
7
@blckeagls_EDEN/addons/Guidelines.txt
Normal file
7
@blckeagls_EDEN/addons/Guidelines.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Features:
|
||||||
|
|
||||||
|
Exports static or dynamic missions preformated in .sqf code. Simply paste the output of the editor into a new .sqf file, edit entires to refine mission parameters and add the name of the mission file to GMS_missionLists.
|
||||||
|
Captures simple objects, sets allow dammage and allow similation according to editor settings, and captures marker configurations.
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -9,17 +9,24 @@ Many thanks for new Coding and ideas from Grahame.
|
|||||||
|
|
||||||
Significant Changes:
|
Significant Changes:
|
||||||
|
|
||||||
|
|
||||||
=====================
|
=====================
|
||||||
7.00 Build 218
|
7.02 Build 230
|
||||||
|
|
||||||
|
New: Option to hide bushes and trees that happen to be under the location in which an enterable building is spawned
|
||||||
|
blck_hideRocksAndPlants = true; // When true, any rocks, trees or bushes under enterable buildings will be 'hidden'
|
||||||
|
|
||||||
|
New: Added support for simple objects. Note that these can be exported by the editor tool now.
|
||||||
|
|
||||||
New: Option to drop crates on a parachute at mission spawn which adds some randomness to where crates end up.
|
New: Option to drop crates on a parachute at mission spawn which adds some randomness to where crates end up.
|
||||||
blck_spawnCratesTiming = "atMissionSpawnAir";
|
blck_spawnCratesTiming = "atMissionSpawnAir";
|
||||||
|
|
||||||
New: You can now add money to crates at static missions by defining the following parameter in your .sqf for the mission.
|
New: You can now add money to crates at static missions by defining the following parameter in your .sqf for the mission.
|
||||||
_crateMoney = 10000;
|
_crateMoney = 10000;
|
||||||
// this can be a value or a range such as [1000,10000];
|
this can be a value or a range such as [1000,10000];
|
||||||
a random amount of money from 0 to the maximum defined will be added.
|
a random amount of money from 0 to the maximum defined will be added.
|
||||||
|
|
||||||
|
New: Added checks and logging for invalid marker types and colors; default values are now provided.
|
||||||
|
|
||||||
New: Added some basic error checking and logging for incorrect entries for some key settings.
|
New: Added some basic error checking and logging for incorrect entries for some key settings.
|
||||||
|
|
||||||
New: 3DEN Editor plugin exports missions as .sqf formated text ready to paste into a file.
|
New: 3DEN Editor plugin exports missions as .sqf formated text ready to paste into a file.
|
||||||
@ -27,16 +34,20 @@ New: 3DEN Editor plugin exports missions as .sqf formated text ready to paste in
|
|||||||
|
|
||||||
Fixed: Don and Hostage missions could not be completed
|
Fixed: Don and Hostage missions could not be completed
|
||||||
Fixed: Missions tended to spawn all at once
|
Fixed: Missions tended to spawn all at once
|
||||||
Fixed: vehicles are spawned at a safe spot which should reduce unintended explosions
|
Fixed: Vehicles sometimes blew up on spawn. vehicles are spawned at a safe spot which should reduce unintended explosions
|
||||||
Fixed: Missions sometimes spawned on steep hillsides.
|
Fixed: Missions sometimes spawned on steep hillsides.
|
||||||
Fixed: Vehicles sometimes blew up on spawn.
|
Fixed: Missions were not distributed over the entire map. The scripts now pick a random quadrant to search thus ensuring broader distribution of mission locations.
|
||||||
Fixed: Money was not added to crates at dynamic missions
|
Fixed: Money was not added to crates at dynamic missions
|
||||||
|
Fixed: Markers were not shown if more than once instance of a mission was spawned.
|
||||||
|
Fixed: No subs or scuba units were spawned at dynamic UMS missions.
|
||||||
|
Fixed: Jets crashed at spawn in.
|
||||||
|
|
||||||
Changed: Timers for spawning missions adjusted a bit to space out spawn/timeouts a bit more.
|
Changed: Timers for spawning missions adjusted a bit to space out spawn/timeouts a bit more.
|
||||||
Changed: The system has been upgreaded to a state-based system, meaning only one script (GMS_fnc_mainThread)is running once all missions are initialized.
|
Changed: The system has been upgraded to a state-based system, meaning only one script (GMS_fnc_mainThread)is running once all missions are initialized.
|
||||||
Changed: a lot of debugging was removed.
|
Changed: a lot of debugging code was removed.
|
||||||
Changed: List of missions for dynamic Underwater missions was moved to \Missions\GMS_missionLIsts.sqf
|
Changed: List of missions for dynamic Underwater missions was moved to \Missions\GMS_missionLIsts.sqf
|
||||||
|
Changed: Units spawned where the surface is water are spawned with UMS gear now.
|
||||||
|
Changed: Added some CBA compatability (Thanks to porkeid for the fixes)
|
||||||
|
|
||||||
6.98 Build 206
|
6.98 Build 206
|
||||||
FIXED: few minor bug fixes.
|
FIXED: few minor bug fixes.
|
||||||
@ -59,12 +70,6 @@ Removed: some debugging and map sepcific settings from blck_custom_config.sqf
|
|||||||
Changed: some code for finding locations for a new mission.
|
Changed: some code for finding locations for a new mission.
|
||||||
Added: all blckeagls map markers have the same prefix: "blckeagls_marker"
|
Added: all blckeagls map markers have the same prefix: "blckeagls_marker"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
6.96 Build 199
|
6.96 Build 199
|
||||||
Added support for Arma servers not running Epoch or Exile
|
Added support for Arma servers not running Epoch or Exile
|
||||||
|
|
||||||
@ -117,8 +122,6 @@ Added offloading of AI to clients
|
|||||||
// TODO: set to false before release
|
// TODO: set to false before release
|
||||||
blck_limit_ai_offload_to_blckeagls = true; // when true, only groups spawned by blckeagls are evaluated.
|
blck_limit_ai_offload_to_blckeagls = true; // when true, only groups spawned by blckeagls are evaluated.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Fixed - Vehicle unlock when empty of crew through adding a getOut event handler.
|
Fixed - Vehicle unlock when empty of crew through adding a getOut event handler.
|
||||||
Code for spawning vehicles redone to reduced redundancy.
|
Code for spawning vehicles redone to reduced redundancy.
|
||||||
Monitoring of groups refined to route mission groups that have left the mission area back to it.
|
Monitoring of groups refined to route mission groups that have left the mission area back to it.
|
||||||
@ -241,7 +244,7 @@ Added: A new mission completion condition for hostage and captive missions.
|
|||||||
|
|
||||||
Added: Mission crates can now be spawned on the ground or in the air at mission completion.
|
Added: Mission crates can now be spawned on the ground or in the air at mission completion.
|
||||||
blck_spawnCratesTiming sets the default for all missions.
|
blck_spawnCratesTiming sets the default for all missions.
|
||||||
blck_spawnCratesTiming = "atMissionEndAir"; // Choices: "atMissionSpawnGround","atMissionStartAir","atMissionEndGround","atMissionEndAir".
|
blck_spawnCratesTiming = "atMissionEndAir"; // Choices: "atMissionSpawnGround","atMissionSpawnAir","atMissionEndGround","atMissionEndAir".
|
||||||
Define _spawnCratesTiming to set this parameter for a particular mission.
|
Define _spawnCratesTiming to set this parameter for a particular mission.
|
||||||
_spawnCratesTiming = "atMissionEndAir";
|
_spawnCratesTiming = "atMissionEndAir";
|
||||||
See the hostage1.sqf mission as an example.
|
See the hostage1.sqf mission as an example.
|
||||||
|
Loading…
Reference in New Issue
Block a user