HeMan's tweaks to SLS, Static and Static underwater missions.
This commit is contained in:
parent
471079d365
commit
9d91cba88f
@ -16,10 +16,10 @@ private ["_staticMissions"];
|
||||
_staticMissions = [
|
||||
// [mod (Epoch, Exile), map (Altis, Tanoa etc), mission center, eg [10445,2014,0], filename.sqf (name of static mission template for that mission)];
|
||||
//["Epoch","Altis","template.sqf"],
|
||||
["Epoch","Altis","staticMissionExample2_Epoch.sqf"],
|
||||
//["Epoch","Altis","staticMissionExample2_Epoch.sqf"],
|
||||
//["Epoch","Altis","destroyer.sqf"],
|
||||
//["Exile","Altis","template.sqf"],
|
||||
["Exile","Altis","staticMissionExample2_Exile.sqf"]
|
||||
//["Exile","Altis","staticMissionExample2_Exile.sqf"]
|
||||
];
|
||||
|
||||
diag_log "[blckeagls] GMS_StaticMissions_Lists.sqf <Loaded>";
|
||||
|
@ -23,12 +23,7 @@ blck_sm_patrolRespawnInterval = 30;
|
||||
{
|
||||
if ((toLower worldName) isEqualTo toLower(_x select 1)) then
|
||||
{
|
||||
if ((blck_ModType isEqualTo "Epoch") && (toLower(_x select 0) isEqualTo "epoch")) then
|
||||
{
|
||||
call compilefinal preprocessFileLineNumbers format["\q\addons\custom_server\Missions\Static\missions\%1",(_x select 2)];
|
||||
};
|
||||
|
||||
if ((blck_ModType isEqualTo "Exile") && (toLower(_x select 0) isEqualTo "exile")) then
|
||||
if ((toLower blck_modType) isEqualTo (toLower(_x select 0))) then
|
||||
{
|
||||
call compilefinal preprocessFileLineNumbers format["\q\addons\custom_server\Missions\Static\missions\%1",(_x select 2)];
|
||||
};
|
||||
|
@ -14,26 +14,14 @@
|
||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||
#include "\q\addons\custom_server\Missions\UMS\GMS_UMS_StaticMissions_Lists.sqf";
|
||||
|
||||
|
||||
|
||||
private["_mod","_map","_missionMod","_missionMap","_missionLocation","_missionDataFile"];
|
||||
_mod = toLower(toLower blck_modType);
|
||||
|
||||
|
||||
{
|
||||
diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf <Evaluating Mission = %1>",_x];
|
||||
diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf <worldName = %1 | _mod = %2>",toLower worldName,(toLower blck_modType)];
|
||||
if ((toLower worldName) isEqualTo toLower(_x select 1)) then
|
||||
{
|
||||
if ((_mod isEqualTo "epoch") && (toLower(_x select 0) isEqualTo "epoch")) then
|
||||
{
|
||||
|
||||
call compilefinal preprocessFileLineNumbers format["\q\addons\custom_server\Missions\UMS\staticMissions\%1",(_x select 2)];
|
||||
};
|
||||
|
||||
if ((_mod isEqualTo "exile") && (toLower(_x select 0) isEqualTo "exile")) then
|
||||
if ((toLower blck_modType) isEqualTo (toLower(_x select 0))) then
|
||||
{
|
||||
call compilefinal preprocessFileLineNumbers format["\q\addons\custom_server\Missions\UMS\staticMissions\%1",(_x select 2)];
|
||||
};
|
||||
};
|
||||
}forEach _staticMissions;
|
||||
|
||||
|
||||
}forEach _staticMissions;
|
@ -1,495 +0,0 @@
|
||||
|
||||
|
||||
_fn_isInside = { // returns true if an object is inside, underneath or on top of a building otherwise returns false.
|
||||
//////////////////////
|
||||
// Determin if a unit is inside a building using two separate checkVisibility
|
||||
//////////////////////
|
||||
// lineIntersects [ eyePos player, aimPos chopper, player, chopper]
|
||||
params["_u",["_category","House"]];
|
||||
private ["_u","_pos","_above","_below"];
|
||||
_pos = getPosASL _u;
|
||||
_above = lineIntersects [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u];
|
||||
_below = lineintersects [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 2],_u];
|
||||
diag_log format["_fn_isInside: _u %1 | _category = %5 | typeOf _u %4 | _above %2 | _below %3 ",_u,_above,_below,typeOf _u, _category];
|
||||
// If there is something above or below the object do a quick double-check to make sure there is a building there and not something else.
|
||||
if (_above) then // test if any surfaces above are from buildingPos
|
||||
{
|
||||
_surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,100];
|
||||
_above = false;
|
||||
{
|
||||
//diag_log format["_fn_isInside: _x-2 = %2 | typeOf _x = %3",_x,_x select 2,typeOf (_x select 2)];
|
||||
if ((_x select 2) isKindOf _category) then {_above = true};
|
||||
}forEach _surfacesAbove;
|
||||
};
|
||||
if (_below) then
|
||||
{
|
||||
_surfacesBelow = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10],_u,_u,true,100];
|
||||
_above = false;
|
||||
{
|
||||
//diag_log format["_fn_isInside: _x-2 = %2 | typeOf _x = %3",_x,_x select 2,typeOf (_x select 2)];
|
||||
if ((_x select 2) isKindOf _category) then {_above = true};
|
||||
}forEach _surfacesBelow;
|
||||
};
|
||||
|
||||
_isInside = if (_above || _below) then {true} else {false};
|
||||
//diag_log format["_fn_isInside: _isInside = %1",_isInside];
|
||||
_isInside
|
||||
};
|
||||
|
||||
_fn_buildingContainer = { // returns the builing containing an object or objNull
|
||||
private["_u","_pos","_building","_surfacesAbove","_surfacesBelow"];
|
||||
params["_u",["_category","House"]];
|
||||
_pos = getPosASL _u;
|
||||
private _building = objNull;
|
||||
// lineIntersectsSurfaces [begPosASL, endPosASL, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2, returnUnique]
|
||||
_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)};
|
||||
} forEach _surfacesAbove;
|
||||
if (_building isEqualTo objNull) then
|
||||
{
|
||||
_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)};
|
||||
} forEach _surfacesBelow;
|
||||
};
|
||||
diag_log format["_fn_buildingContainer: _u = %1 | _building = %2",_u,_building];
|
||||
_building
|
||||
};
|
||||
|
||||
_fn_isInfantry = { // returns true if a unit is on foot otherwise returns false.
|
||||
//////////////////////
|
||||
// Determine if a unit isinfantry rather than a unit manning a turret or vehicle
|
||||
//////////////////////
|
||||
_u = _this select 0;
|
||||
private _isInfantry = if ((_u isKindOf "Man") && (vehicle _u) isEqualTo _u) then {true} else {false};
|
||||
//diag_log format["_fn_isInfantry: _isInfantry = %1",_isInfantry];
|
||||
_isInfantry
|
||||
};
|
||||
|
||||
diag_log "========== <START> ==========================";
|
||||
|
||||
///////////////////
|
||||
// Define some values for our AI
|
||||
// Change values of these variables to suit your needs
|
||||
///////////////////
|
||||
#define aiDifficulty "Red"
|
||||
#define minAI 3
|
||||
#define maxAI 6
|
||||
#define minPatrolRadius 30
|
||||
#define maxPatrolRadius 45
|
||||
#define AI_respawnTime 600
|
||||
#define aiVehiclePatrolRadius 75
|
||||
#define vehiclePatrolRespawnTime 600
|
||||
#define staticWeaponRespawnTime 600
|
||||
#define aiAircraftPatrolRespawnTime 600
|
||||
#define aiAircraftPatrolRadius 1700
|
||||
#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.
|
||||
#define objectAtMissionCenter "RoadCone_L_F"
|
||||
#define lootVehicleMarker "Sign_Arrow_F"
|
||||
#define landVehicles "LandVehicle"
|
||||
|
||||
///////////////////
|
||||
// Define the coordinates of the center of the mission.
|
||||
///////////////////
|
||||
|
||||
CENTER = [0,0,0];
|
||||
|
||||
if (isNil "CENTER" || CENTER isEqualTo [0,0,0]) then
|
||||
{
|
||||
hint "Please define a center point for your mission";
|
||||
_obj = allMissionObjects objectAtMissionCenter;
|
||||
_obj1 = _obj select 0;
|
||||
diag_log format["Determining position of first roadcone found which is located at %1 with player found at %2",getPos _obj1,position Player];
|
||||
if (count _obj > 0) then
|
||||
{
|
||||
CENTER = [3,3,0] vectorAdd (getPosATL _obj1);
|
||||
};
|
||||
hint format["Position of Road Cone at %1 used to define mission center",CENTER];
|
||||
diag_log format["Position of Road Cone at %1 used to define mission center",CENTER];
|
||||
diag_log format["Player located at position %1",position player];
|
||||
};
|
||||
|
||||
///////////////////
|
||||
// Identify any buildings in which a garrison should be spawned using the Arma building positions.
|
||||
// Tell the script which buildings to garrison by placing an object inside that designates them as such.
|
||||
// I use a large yellow sphere for this purpose.
|
||||
// The function below assembles a list of such buildings for use in defining the data for mission buildings.
|
||||
///////////////////
|
||||
|
||||
_cb = "";
|
||||
|
||||
//////////////////
|
||||
// *** OPTIONAL ****
|
||||
// Place a marker over your mission and configure it as you would like to to appear in the tame.
|
||||
// The marker configuration will be included in the output of this script.
|
||||
// Note ** Only the first marker placed will be processed **
|
||||
// Configure Marker
|
||||
/////////////////
|
||||
/*
|
||||
_markerType = ["ELIPSE",[175,175],"GRID"];
|
||||
_markerType = ["mil_triangle",[0,0]];
|
||||
*/
|
||||
_allmkr = allMapMarkers;
|
||||
diag_log format["_allmkr = %1",_allmkr];
|
||||
if (count _allmkr == 0) then
|
||||
//if !(typeName _mk isEqualTo "STRING") then
|
||||
{
|
||||
hint "No Marker Found, no Marker Definitions Will Be generated";
|
||||
uiSleep 5;
|
||||
} else {
|
||||
_mk = _allmkr select 0;
|
||||
diag_log format["_mk = %1",_mk];
|
||||
|
||||
if ((getMarkerType _mk) in ["ELIPSE","RECTANGLE"]) then
|
||||
{
|
||||
_cb = _cb + format['_markerType = ["%1",%2,%3];%4',getMarkerType _mk,getMarkerSize _mk,markerBrush _mk,endl];
|
||||
} else {
|
||||
_cb = _cb + format['_markerType = ["%1",[0,0]];%2',getMarkerType _mk,endl];
|
||||
};
|
||||
_cb = _cb + format['_markerColor = "%1";%2',markerColor _mk,endl];
|
||||
_cb = _cb + format['_markerLabel = "%1";%2',MarkerText _mk,endl];
|
||||
_cb = _cb + format["%1%1",endl];
|
||||
};
|
||||
|
||||
////////////////////////
|
||||
// Begin pulling data here
|
||||
///////////////////////
|
||||
|
||||
_cb = _cb + format["_garrisonedBuildings_BuildingPosnSystem = [",endl];
|
||||
private _garrisonedBuildings = [];
|
||||
private _allStatics = [];
|
||||
_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;
|
||||
_garrisonedBuildings pushbackunique _building;
|
||||
_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;
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
_logging = format["_garrisonedBuildings = %1",_garrisonedBuildings];
|
||||
//diag_log _logging;
|
||||
systemChat _logging;
|
||||
//diag_log format["_cb = %1%2",endl,_cb];
|
||||
|
||||
_configuredStatics = [];
|
||||
_configuredUnits = [];
|
||||
/*
|
||||
This bit will set up the garrison for each building having units and / or statics inside it or on top.
|
||||
Coding must ensure that nothing is repeated but everything is captured.
|
||||
*/
|
||||
|
||||
_fn_configureGarrisonForBuildingATL = {
|
||||
private["_b","_staticsInBuilding","_unitsInBuilding","_staticsText","_unitsText","_buildingGarrisonATL","_staticsInBuilding","_unitsInBuilding","_count"];
|
||||
_b = _this select 0;
|
||||
_count = 0;
|
||||
if (_b in _garrisonedBuildings) exitWith {""};
|
||||
_staticsText = "";
|
||||
_unitsText = "";
|
||||
_buildingGarrisonATL = "";
|
||||
_staticsInBuilding = nearestObjects[getPosATL _building,["StaticWeapon"],sizeOf (typeOf _building)];
|
||||
{
|
||||
if !(_x in _configuredStatics) then
|
||||
{
|
||||
_isInside = [_x] call _fn_isInside;
|
||||
if (_isInside) then {_building = [_x] call _fn_buildingContainer};
|
||||
if (_b isEqualTo _building) then
|
||||
{
|
||||
_configuredStatics pushBackUnique _x;
|
||||
|
||||
if (_staticsText isEqualTo "") then
|
||||
{
|
||||
_staticsText = format['["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff (getPosATL _b),getDir _x];
|
||||
} else {
|
||||
_staticsText = _staticsText + format[',["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff (getPosATL _b),getDir _x];
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach _staticsInBuilding;
|
||||
_unitsInBuilding = nearestObjects[getPosATL _building,[unitMarkerObject],sizeOf (typeOf _building)];
|
||||
|
||||
{
|
||||
if !(_x in _configuredUnits) then
|
||||
{
|
||||
_isInside = [_x] call _fn_isInside;
|
||||
if (_isInside) then {_building = [_x] call _fn_buildingContainer};
|
||||
if (_b isEqualTo _building) then
|
||||
{
|
||||
_configuredUnits pushBackUnique _x;
|
||||
|
||||
if (_unitsText isEqualTo "") then
|
||||
{
|
||||
_unitsText = format["[%1,%2]",(getPosATL _x) vectorDiff (getPosATL _b),getDir _x];
|
||||
} else {
|
||||
_unitsText = _unitsText + format[",[%1,%2]",(getPosATL _x) vectorDiff (getPosATL _b),getDir _x];
|
||||
};
|
||||
_count = _count + 1;
|
||||
};
|
||||
};
|
||||
} forEach _unitsInBuilding;
|
||||
if ( !(_staticsText isEqualTo "") || !(_unitsText isEqualTo "")) then
|
||||
{
|
||||
_buildingGarrisonATL = format[' ["%1",%2,%3,%4,%5,[%6],[%7]]',typeOf _b,(getPosATL _b) vectorDiff CENTER,getDir _b,'true','true',_staticsText,_unitsText];
|
||||
_garrisonedBuildings pushBackUnique _b;
|
||||
};
|
||||
_buildingGarrisonATL
|
||||
};
|
||||
|
||||
private _count = 0;
|
||||
_cb = _cb + "_garrisonedBuilding_ATLsystem = [";
|
||||
{
|
||||
private _isInside = [_x] call _fn_isInside;
|
||||
if (_isInside) then
|
||||
{
|
||||
private _building = [_x] call _fn_buildingContainer;
|
||||
private _include = if ( !(_building in _garrisonedBuildings) && !((typeOf _building) isEqualTo unitMarkerObject) && !((typeOf _building) isEqualTo garrisonMarkerObject)) then {true} else {false};
|
||||
if (_include) then
|
||||
{
|
||||
//diag_log format["_x = %1 | _building = %1",_x,_building];
|
||||
private _buildingGarrisonInformation = [_building] call _fn_configureGarrisonForBuildingATL;
|
||||
//diag_log format["_buildingGarrisonInformation = %1",_buildingGarrisonInformation];
|
||||
if (_count == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_buildingGarrisonInformation];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_buildingGarrisonInformation];
|
||||
};
|
||||
|
||||
_count = _count + 1;
|
||||
};
|
||||
};
|
||||
|
||||
} forEach ((allMissionObjects "StaticWeapon") + (allMissionObjects unitMarkerObject));
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
///////////////////
|
||||
// Configure info remaining mission landscape
|
||||
///////////////////
|
||||
_land = allMissionObjects "Static";
|
||||
|
||||
_cb = _cb + format["_missionLandscape = [",endl];
|
||||
{
|
||||
diag_log format["evaluating mission landscape: _x = %1 | typeOf _x = %1",_x, typeOf _x];
|
||||
//diag_log format["evaluating mission landscape: _x %1 | typeOf _x %1",_x, _x isKindOf "Helper_Base_F"];
|
||||
if !(_x in _garrisonedBuildings && !((typeOf _x) isEqualTo unitMarkerObject) && !((typeOf _x) isEqualTo garrisonMarkerObject)) then
|
||||
{
|
||||
_line = format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true'];
|
||||
|
||||
systemChat _line;
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
};
|
||||
}forEach allMissionObjects "Static";
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
///////////////////
|
||||
// Configure loot boxes
|
||||
///////////////////
|
||||
_cb = _cb + "_missionLootBoxes = [";
|
||||
{
|
||||
_line = format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _x];
|
||||
systemChat _line;
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
}forEach ((allMissionObjects "ReammoBox") + (allMissionObjects "ReammoBox_F"));
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
///////////////////
|
||||
// Setup Info for loot vehicles
|
||||
///////////////////
|
||||
_missionLootVehicles = [];
|
||||
_missionVehicles = ((allMissionObjects "Car") + (allMissionObjects "Tank") + allMissionObjects "Ship");
|
||||
_lootVehicleMarkers = allMissionObjects lootVehicleMarker;
|
||||
diag_log format["_lootVehicleMarkers = %1",_lootVehicleMarkers];
|
||||
_cb = _cb + format["_missionLootVehicles = ["];
|
||||
{
|
||||
_kindOf = "nothing";
|
||||
_isInside = [_x,"Car"] call _fn_isInside;
|
||||
if (_isInside) then {_kindOf = "Car"};
|
||||
if !(_isInside) then {_isInside = [_x,"Ship"] call _fn_isInside};
|
||||
if (_isInside) then {_kindOf = "Ship"};
|
||||
if (_isInside) then
|
||||
{
|
||||
|
||||
_object = [_x,_kindOf] call _fn_buildingContainer;
|
||||
diag_log format["object %1 is inside object %2",_x,_object];
|
||||
_missionLootVehicles pushBack _object;
|
||||
_line = format[' ["%1",%2,%3,%4,%5]',typeOf _object,(getPosATL _x) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _x];
|
||||
systemChat _line;
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
};
|
||||
} forEach allMissionObjects lootVehicleMarker;
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
///////////////////
|
||||
// Setup Info for vehicle patrols
|
||||
///////////////////
|
||||
_cb = _cb + format["_missionPatrolVehicles = ["];
|
||||
{
|
||||
if ( !((typeOf _x) isKindOf "SDV_01_base_F") && !(_x in _missionLootVehicles) ) then
|
||||
{
|
||||
_line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x];
|
||||
systemChat _line;
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
};
|
||||
}forEach ((allMissionObjects "Car") + (allMissionObjects "Tank") + allMissionObjects "Ship");
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
_cb = _cb + "_submarinePatrolParameters = [";
|
||||
{
|
||||
if ((typeOf _x) isKindOf "SDV_01_base_F") then
|
||||
{
|
||||
_line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x];
|
||||
systemChat _line;
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
};
|
||||
}forEach allMissionObjects "Ship";
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
///////////////////
|
||||
// Configs for Air Patrols
|
||||
///////////////////
|
||||
_cb = _cb + "_airPatrols = [";
|
||||
//[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"blue",1000,60]
|
||||
{
|
||||
_line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true'];
|
||||
systemChat _line;
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
}forEach allMissionObjects "Air";
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
///////////////////
|
||||
// Setup info for remaining static/emplaced weapons
|
||||
///////////////////
|
||||
_cb = _cb + format["_missionEmplacedWeapons = ["];
|
||||
{
|
||||
|
||||
if !(_x in _configuredStatics) then
|
||||
{
|
||||
// ["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10]
|
||||
_line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true'];
|
||||
systemChat _line;
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
};
|
||||
|
||||
}forEach allMissionObjects "StaticWeapon";
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
///////////////////
|
||||
// Setup information for infantry groups spawning outside buildings
|
||||
///////////////////
|
||||
_cb = _cb + format["_missionGroups = ["];
|
||||
{
|
||||
//[[22920.4,16887.3,3.19144],"red",[1,2], 75,120],
|
||||
_isInside = [_x] call _fn_isInside;
|
||||
_isInfantry = [_x] call _fn_isInfantry;
|
||||
//diag_log format["_missionGroups: _unit %1 | _isInside %2 _isInfantry %3",_x,_isInside,_isInfantry];
|
||||
if (_isInfantry) then
|
||||
{
|
||||
if (!(surfaceIsWater (getPos _x)) && !(_isInside) && !(isPlayer _x)) then
|
||||
{
|
||||
_line = format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,minAI,maxAI,aiDifficulty,minPatrolRadius,maxPatrolRadius];
|
||||
systemChat _line;
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
};
|
||||
};
|
||||
}forEach allMissionObjects "Man";
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
_cb = _cb + "_scubaGroupParameters = [";
|
||||
{
|
||||
//[[22920.4,16887.3,3.19144],"red",[1,2], 75,120],
|
||||
_isInside = [_x] call _fn_isInside;
|
||||
_isInfantry = [_x] call _fn_isInfantry;
|
||||
//diag_log format["_missionGroups: _unit %1 | _isInside %2 _isInfantry %3",_x,_isInside,_isInfantry];
|
||||
if (_isInfantry) then
|
||||
{
|
||||
if ((surfaceIsWater (getPos _x)) && !(_isInside) && !(isPlayer _x)) then
|
||||
{
|
||||
_line = format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,minAI,maxAI,aiDifficulty,minPatrolRadius,maxPatrolRadius];
|
||||
systemChat _line;
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
};
|
||||
};
|
||||
}forEach allMissionObjects "Man";
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
///////////////////
|
||||
// All done, notify the user and copy the output to the clipboard
|
||||
///////////////////
|
||||
_msg = "All Objects organzied, formated and copied to the Clipboard";
|
||||
hint _msg;
|
||||
systemChat _msg;
|
||||
systemChat format["_cb has %1 characters",count _cb];
|
||||
copyToClipboard _cb;
|
||||
diag_log "DONE";
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
By Ghostrider [GRG]
|
||||
Copyright 2016
|
||||
|
||||
|
||||
--------------------------
|
||||
License
|
||||
--------------------------
|
||||
@ -14,29 +14,259 @@
|
||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||
_lootBoxes =
|
||||
[
|
||||
/*[
|
||||
|
||||
"altis", // map name
|
||||
"Camp1", // a name for this region for logging and debuging purpses and to help identify the definition down the road when changing things on the server
|
||||
2, // number of locations specified from the list below at which to spawn crates
|
||||
[ // format here is [[position x, y, z], direction, exact / loose placement (true/false), smoke near crate (true/false]
|
||||
[[23555.9,18422.7,0.730287],0,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position
|
||||
[[23542.1,18435.9,0.00143886],0,true, false],
|
||||
[[23514,18452.5,0.00143886],0,true, false],
|
||||
[[23534.2,18418.8,0.00143886],0,false, true]
|
||||
]
|
||||
|
||||
],
|
||||
[ "altis",
|
||||
"refuel",
|
||||
2,
|
||||
[ // format here is [[position x, y, z], direction, exact / loose placement (true/false), smoke near crate (true/false]
|
||||
[[22963.8,17041.3,0.00143886],0,false, false],
|
||||
[[22942.8,17038,0.00143886],0,false, false],
|
||||
[[22948.7,17054,0.00143886],0,false, false]
|
||||
] // No comma after this last one
|
||||
] // No comma after this last one
|
||||
*/
|
||||
#ifdef GRG_TestServer
|
||||
["altis","APTrader",10,
|
||||
[
|
||||
[[14658.1, 16790.9, 18.3795],0,false,false],
|
||||
[[14660, 16788.5, 18.3795],0,false,false],
|
||||
[[17518.4,13260.7,12.7337],0,false,false],
|
||||
[[17528.1,13270.2,12.725],0,false,false],
|
||||
[[17537.4,13278.2,12.706],0,false,false],
|
||||
[[17547.9,13286,12.6121],0,false,false],
|
||||
[[17599.5,13240.5,13.327],0,false,false],
|
||||
[[17593.1,13231.9,13.4375],0,false,false],
|
||||
[[17586.5,13224.6,13.5832],0,false,false],
|
||||
[[17580.5,13217.8,13.6708],0,false,false]
|
||||
]
|
||||
],
|
||||
#endif
|
||||
|
||||
// Ferres
|
||||
/*
|
||||
["altis","Ferres", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
|
||||
[
|
||||
[[21693.887,7731.0264,13.955027],0,true, true], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
|
||||
[[21850.063,7504.3203,14.677059],0,true, true],
|
||||
[[21693.674,7431.4141,15.578629],0,true, true],
|
||||
[[21631.227,7773.9927,14.149431],0,true, true],
|
||||
[[21572.559,7462.2661,17.827536],0,true, true],
|
||||
[[21801.348,7631.4448,13.80711],0,true, true],
|
||||
[[21508.932,7585.6309,15.844649],0,true, true],
|
||||
[[21547.027,7695.6738,15.754698],0,true, true]
|
||||
]
|
||||
],*/
|
||||
#ifndef blck_milServer
|
||||
// Dump
|
||||
["altis","Dump", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
|
||||
[
|
||||
[[5791,20314.5,0],0,false,true], // crate position 1, loadout (0-4), false=random placement near position, true = show smoke at position
|
||||
[[5902.33,20272.7,0],0,false,true],
|
||||
[[5955.21,20136.2,0],0,false,true],
|
||||
[[5908.32,20088.3,0],0,false,true],
|
||||
[[55843.54,20171.6,0],0,false,true],
|
||||
[[5775.42,20163.3,0],0,false,true],
|
||||
[[5979.18,20206.5,0],0,false,true],
|
||||
[[5943.89,20076.7,0],0,false,true]
|
||||
]
|
||||
],
|
||||
// Beach #1
|
||||
["altis","Beach", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
|
||||
[
|
||||
[[22769.8,7051.28,0],0,false,true], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
|
||||
[[22934.3,6990.53,0],0,false,true],
|
||||
[[22831.7,7003.24,0],0,false,true],
|
||||
[[22666.6,7009.22,0],0,false,true],
|
||||
[[22634.6,6985.3,0],0,false,true],
|
||||
[[22583.4,6935.63,0],0,false,true],
|
||||
[[22651.1,7060.75,0],0,false,true]
|
||||
]
|
||||
],
|
||||
["altis","Pack-1", 1, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
|
||||
[
|
||||
[[14269.6,13016.2,0],0,false,false], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
|
||||
[[14359.9,13047.7,0],0,false,false],
|
||||
[[14293.5,12956.9,0],0,false,false]
|
||||
]
|
||||
],
|
||||
["altis","Pack-2", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
|
||||
[
|
||||
[[26810,24557.2,0.00140762],0,false,false], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
|
||||
[[26746,24652.6,0.520973],0,false,false],
|
||||
[[26798.1,24668.3,0.001297],0,false,false],
|
||||
[[26873,24635.1,17.4495],0,false,false],
|
||||
[[26940.7,24642.2,0.732187],0,false,false],
|
||||
[[26955.5,24658.4,0.739138],0,false,false],
|
||||
[[26943.8,24666.2,0.722866],0,false,false],
|
||||
[[26930.2,24651.9,0.727114],0,false,false],
|
||||
[[26965.5,24684.1,7.63653],0,false,false],
|
||||
[[26928.3,24714.8,7.63206],0,false,false],
|
||||
[[26940.7,24730.5,7.76619],0,false,false],
|
||||
[[26952,24750.5,0.602812],0,false,false],
|
||||
[[26932.7,24730.8,0.635454],0,false,false],
|
||||
[[26931.2,24739,0.724504],0,false,false],
|
||||
[[26968.1,24700.1,0.599913],0,false,false],
|
||||
[[26847.9,24821.4,0.340788],0,false,false],
|
||||
[[26783.4,24788.2,12.5849],0,false,false],
|
||||
[[26729.8,24759.1,0.296225],0,false,false]
|
||||
]
|
||||
],
|
||||
#endif
|
||||
["taviana","Zoo", 3, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
|
||||
[
|
||||
[[18614.1,3029.22,0],0,false, true], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
|
||||
[[19215.7,2260.17,0],0,false, true],
|
||||
[[19073.2,2775.83,0],0,false, true],
|
||||
[[18632.1,2967.54,0],0,false, true],
|
||||
[[18671.2,2869.73,0],0,false, true]
|
||||
]
|
||||
],
|
||||
// Power Plant
|
||||
["taviana","NPP", 3, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
|
||||
[
|
||||
[[9478.98,4481.12,0],0,false, false], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
|
||||
[[9584.39,4474.86,0],0,false, false],
|
||||
[[9485.74,4303.65,0],0,false, false],
|
||||
[[9549.64,4236.95,0],0,false, false],
|
||||
[[9347.52,4656.96,0],0,false, false],
|
||||
[[9427.53,4585.94,0],0,false, false],
|
||||
[[9542.42,4603.89,0],0,false, false]
|
||||
]
|
||||
],
|
||||
["bornholm","Stronghold1",4,
|
||||
// Stronghold 1
|
||||
[
|
||||
[[16776.3,2841.59,0.115455],2,true, false],
|
||||
[[16885.1,2763.64,0.0635304],4,true, false],
|
||||
[[16953.7,2588.12,0.0866053],2,true, false],
|
||||
[[17028.5,2645.56,0.0632489],4,true, false],
|
||||
[[16818.7,2627.68,0.0635295],2,true, false],
|
||||
[[16828.1,2794.94,0.086482],4,true, false],
|
||||
[[16776.8,2842.19,0.115454],2,true, false]
|
||||
]
|
||||
],
|
||||
["bornholm","Stronghold2", 4,
|
||||
// Stronghold 2
|
||||
[
|
||||
[[4342.52,19974.5,1.5059],2,false, false],
|
||||
[[4364.01,19957.2,1.7643],4,false, false],
|
||||
[[4337.55,19886.1,0.923979],2,false, false],
|
||||
[[4317.76,19915.3,0.336912],4,false, false],
|
||||
[[4261.73,19957,0.0783005],2,false, false],
|
||||
[[4280.66,19961.2,0.180275],4,false, false],
|
||||
[[4318.1,19916.5,0.514435],2,false, false]
|
||||
]
|
||||
],
|
||||
["bornholm","Object99",4,// ** Note that there is no comma after the last entry.
|
||||
// Object 99 blah blah
|
||||
[
|
||||
/*
|
||||
// Darthrogues Obj 99
|
||||
[[7231.91,11975.8,0.836342],2,false, false],
|
||||
[[7266.08,11981.6,1.0471],4,false, false],
|
||||
[[7337.64,12011.6,12.7679],2,false, false],
|
||||
[[7264.35,12020.1,0.661186],4,false, false],
|
||||
[[7204.27,12058.5,0.632904],2,false, false],
|
||||
[[7265.46,12128.6,0.00143433],4,false, false],
|
||||
[[7250.85,12142.9,3.16084],2,false, false],
|
||||
[[7215.93,12121.1,0.224915],4,false, false],
|
||||
[[7207.59,12159.8,0.73732],2,false, false],
|
||||
[[7184.07,12231.1,8.72117],4,false, false],
|
||||
[[7172.28,12021.2,0.664284],2,false, false],
|
||||
[[7147.93,12056.5,0.848099],4,false, false],
|
||||
[[7137.67,12110.8,4.0068],2,false, false],
|
||||
[[7166,12138,3.86438],4,false, false],
|
||||
[[7130.52,12207.9,0.56971],4,false, false]
|
||||
*/
|
||||
// Mr. Squirrel's Obj 69
|
||||
[[7253.48,12101.4,0],2,false, false],
|
||||
[[7276.15,12118.1,0],4,false, false],
|
||||
[[7158.4,12068.5,0],2,false, false],
|
||||
[[7128.27,12206.9,0],4,false, false],
|
||||
[[7167.57,12218.9,0],2,false, false],
|
||||
[[7218.71,12188.5,0],4,false, false],
|
||||
[[7209.02,12166.9,0],2,false, false],
|
||||
[[7233.2,12067.5,0],4,false, false],
|
||||
[[7167.75,12038.4,0],2,false, false],
|
||||
[[7106.96,12119.2,0],4,false, false],
|
||||
[[7161.82,12126.7,0],2,false, false],
|
||||
[[7096.61,12195.9,0],4,false, false],
|
||||
[[7083.88,12141.1,0],2,false, false],
|
||||
[[7060.33,12146.2,0],4,false, false],
|
||||
[[7135.81,12168.1,0],2,false, false],
|
||||
[[7055.72,12159.2,0.38678],4,false, false],
|
||||
[[7119.19,12100.2,0.801155],2,false, false],
|
||||
[[7124.51,12095.7,1.16968],4,false, false]
|
||||
]
|
||||
],
|
||||
["bornholm","Mafia Island", 4,
|
||||
[// Mafia Island
|
||||
[[19296.5, 22308.8, 0],2,false, false],
|
||||
[[19279, 22352.2, 0],4,false, false],
|
||||
[[19213.8, 22358.6, 0],2,false, false],
|
||||
[[19190.4, 22367.4, 0],4,false, false],
|
||||
[[19204.3, 22314.9, 0],2,false, false],
|
||||
[[19368.7, 22347.3, 0],4,false, false],
|
||||
[[19462.8, 22306.1, 0],2,false, false],
|
||||
[[19321.4, 22240.1, 3.46751],4,false, false]
|
||||
]
|
||||
],
|
||||
["bornholm","Science Compound", 4,
|
||||
[// Science Compound
|
||||
[[7922.43,7347, 0],2,false, false],
|
||||
[[7926.59,7427.49, 0],4,false, false],
|
||||
[[7929.08,7421.45, 0],2,false, false],
|
||||
[[7984.89,7474.71, 0],4,false, false],
|
||||
[[7974.01,7472.63, 0],2,false, false],
|
||||
[[7934.56,7572.23, 0],4,false, false],
|
||||
[[7945.09,7587.68, 0],2,false, false],
|
||||
[[7949.19,7567.18,0],4,false, false]
|
||||
]
|
||||
],
|
||||
//[[21572.559,7462.2661,17.827536],4,true, true]
|
||||
//[[21801.348,7631.4448,13.80711],1,true, true],
|
||||
//[[21508.932,7585.6309,15.844649],2,true, true],
|
||||
//[[21547.027,7695.6738,15.754698],3,true, true]
|
||||
|
||||
[ "lythium", "RaiderBase", 3,
|
||||
[
|
||||
[[18950.6,13115.8,233.078],1,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position
|
||||
[[18958,13095.9,231.687],2,true, false],
|
||||
[[19048.7,13134,229.004],2,true, false],
|
||||
[[19062.3,13126.6,229.646],1,true, false],
|
||||
[[19032.2,13087.3,227.428],3,true, false],
|
||||
[[18988,13192.7,223.058],1,true, false],
|
||||
[[19076.2,13105.2,231.051],3,true, false]
|
||||
]
|
||||
],
|
||||
[ "lythium","chemical", 4,
|
||||
[
|
||||
[[9081.29,19774.8,704.102],1,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position
|
||||
[[9081.29,19774.8,704.102],2,true, false],
|
||||
[[8926.25,19856.5,728.456],2,true, false],
|
||||
[[8999.95,19917.9,714.447],1,true, false],
|
||||
[[9391.22,19888,713.624],3,true, false],
|
||||
[[9026.12,20360,687.103],1,true, false],
|
||||
[[8972.81,20222.4,714.263],3,true, false],
|
||||
[[9406.59,19506.8,635.903],3,true, false],
|
||||
[[7715.5,20352.6,822.616],3,true, false]
|
||||
]
|
||||
],
|
||||
[ "lythium","nwaste", 4,
|
||||
[
|
||||
[[19123.5,1726.78,77.169],1,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position
|
||||
[[19000.5,1657.84,79.3068],2,true, false],
|
||||
[[19028.6,1525.28,80.0602],2,true, false],
|
||||
[[19076.7,1536.15,78.7828],1,true, false],
|
||||
[[19393.5,1784.66,32.3623],3,true, false],
|
||||
[[19391,1783.63,32.5241],1,true, false],
|
||||
[[19255.1,2204.95,46.3486],3,true, false],
|
||||
[[19398.7,2323,42.8409],3,true, false]
|
||||
|
||||
]
|
||||
],
|
||||
[ "lythium","mine", 4,
|
||||
[
|
||||
[[4114.84,905.004,357.621],1,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position
|
||||
[[3714.22,760.414,383.659],2,true, false],
|
||||
[[3774.63,684.883,384.924],2,true, false],
|
||||
[[3747.2,777.427,384.203],1,true, false],
|
||||
[[3761.07,611.827,383.125],3,true, false],
|
||||
[[3709.12,780.889,383.27],1,true, false],
|
||||
[[3712.96,805.05,382.848],3,true, false],
|
||||
[[3688.47,713.877,382.692],3,true, false],
|
||||
[[4373.19,607.184,370.77],3,true, false]
|
||||
]
|
||||
]
|
||||
|
||||
];
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
/*
|
||||
for ghostridergaming
|
||||
By Ghostrider [GRG]
|
||||
Copyright 2016
|
||||
Last Modified 8-23-17
|
||||
|
||||
--------------------------
|
||||
License
|
||||
@ -71,7 +69,6 @@ _fn_spawnCrate = {
|
||||
_crate = [[0,0,0],_selectedCrateType] call blck_fnc_spawnCrate;
|
||||
_crate setPosATL _pos;
|
||||
_crate setDir round(random(360));
|
||||
//uiSleep 1;
|
||||
_crate setVectorUp surfaceNormal _pos;
|
||||
_crate
|
||||
};
|
||||
@ -81,7 +78,7 @@ _fn_setupCrates = {
|
||||
private["_crate"];
|
||||
|
||||
_crate = [_location,_randomPos] call _fn_SpawnCrate;
|
||||
while {_lootType == 0} do {_lootType = round(random(3));};
|
||||
_lootType = selectrandom [1,2,3];
|
||||
switch(_lootType) do
|
||||
{
|
||||
// format here is [_arrayOfLoot, crateToLoad, magazinesToAddForEachWeaponLoaded]
|
||||
@ -102,37 +99,31 @@ _fn_setupCrates = {
|
||||
_crate
|
||||
};
|
||||
//diag_log "[blckeagls] SLS System: Functions Initialized!";
|
||||
private["_cratePosnList","_no","_ar","_x","_cratePos","_lootType","_randomPos","_useSmoke"];
|
||||
|
||||
private["_cratePos","_lootType","_randomPos","_useSmoke"];
|
||||
{
|
||||
_map = _x select 0;
|
||||
_name = _x select 1;
|
||||
_no = _x select 2;
|
||||
_ar = _x select 3;
|
||||
private["_index"];
|
||||
_index = 1;
|
||||
if (blck_debugON) then
|
||||
_x params ["_map","_name","_no","_ar"];
|
||||
private["_index"];
|
||||
_index = 1;
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["[blckeagls] SLS :: main function: Location name = %3 |count _ar = %1 | _index = %2", count _ar, _index, _name];
|
||||
diag_log format["[blckeagls] SLS :: main function: count _ar = %1", _ar];
|
||||
};
|
||||
if ((tolower _map) isEqualto (toLower(worldName))) then
|
||||
{
|
||||
for "_i" from 1 to _no do
|
||||
{
|
||||
diag_log format["[blckeagls] SLS :: main function: Location name = %3 |count _ar = %1 | _index = %2", count _ar, _index, _name];
|
||||
diag_log format["[blckeagls] SLS :: main function: count _ar = %1", _ar];
|
||||
};
|
||||
if (_map isEqualto (toLower(worldName))) then
|
||||
{
|
||||
_usedLocations = [];
|
||||
for "_i" from 1 to _no do
|
||||
// Pick a random element and be sure it has not already been selected
|
||||
_ar = _ar call Bis_fnc_arrayshuffle;
|
||||
_crateParams = _ar deleteat 0;
|
||||
if (blck_debugON) then
|
||||
{
|
||||
// Pick a random element and be sure it has not already been selected_crateParams
|
||||
_crateParams = selectRandom _ar;
|
||||
while {_crateParams in _usedLocations} do {_crateParams = selectRandom _ar;}; // selectRandom is about 5X faster than BIS_fnc_selectRandom in my testing.
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["[blckeagls] SLS:: spawning crate spawning crate at location name %1 with parameters of %2 --->>> %1",_name,_crateParams];
|
||||
};
|
||||
_usedLocations pushback _crateParams;
|
||||
_crateParams params["_cratePos","_lootType","_randomPos","_useSmoke"]; // params is about 5x faster in my testing over _this select 0 where many local variables are defined by parsing _this.
|
||||
[_cratePos,_lootType,_randomPos,_useSmoke] call _fn_setupCrates;
|
||||
diag_log format["[blckeagls] SLS:: spawning crate spawning crate at location name %1 with parameters of %2 --->>> %1",_name,_crateParams];
|
||||
};
|
||||
// _crateParams params["_cratePos","_lootType","_randomPos","_useSmoke"];
|
||||
_crateParams call _fn_setupCrates;
|
||||
};
|
||||
};
|
||||
} forEach _lootBoxes;
|
||||
|
||||
|
||||
|
@ -15,14 +15,13 @@
|
||||
#endif
|
||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||
|
||||
if not (isNull( configFile >> "CfgPatches" >> "a3_epoch_server" )) then
|
||||
if ((tolower blck_modType) isEqualto "epoch") then
|
||||
{
|
||||
[] execVM "\q\addons\custom_server\SLS\SLS_init_epoch.sqf";
|
||||
call compile preprocessfilelinenumbers "\q\addons\custom_server\SLS\SLS_init_epoch.sqf";
|
||||
};
|
||||
|
||||
if not (isNull ( configFile >> "CfgPatches" >> "exile_server" ) ) then
|
||||
if ((tolower blck_modType) isEqualto "exile") then
|
||||
{
|
||||
[] execVM "\q\addons\custom_server\SLS\SLS_init_exile.sqf";
|
||||
call compile preprocessfilelinenumbers "\q\addons\custom_server\SLS\SLS_init_exile.sqf";
|
||||
};
|
||||
diag_log "[blckeagls] SLS System: Static loot crates ran successfully!";
|
||||
blck_SLSComplete = true;
|
||||
blck_SLSComplete = true;
|
||||
|
Loading…
Reference in New Issue
Block a user