initial files
This commit is contained in:
8
kp_liberation.brf_sumava/scripts/client/CfgFunctions.hpp
Normal file
8
kp_liberation.brf_sumava/scripts/client/CfgFunctions.hpp
Normal file
@@ -0,0 +1,8 @@
|
||||
class client_tutorial {
|
||||
file = "scripts\client\tutorial";
|
||||
|
||||
class handleCrateStorageTask {};
|
||||
class handleHealCivTask {};
|
||||
class handleTakePowTask {};
|
||||
class tutorial {ext = ".fsm";};
|
||||
};
|
||||
103
kp_liberation.brf_sumava/scripts/client/actions/do_recycle.sqf
Normal file
103
kp_liberation.brf_sumava/scripts/client/actions/do_recycle.sqf
Normal file
@@ -0,0 +1,103 @@
|
||||
// TODO Split this in an added action to the vehicles and add the dorecycle == 1 part in a button action
|
||||
params ["_vehToRecycle"];
|
||||
|
||||
if (_vehToRecycle getVariable ["KP_liberation_preplaced", false]) exitWith {hint localize "STR_PREPLACED_ERROR";};
|
||||
|
||||
dorecycle = 0;
|
||||
|
||||
private _type = typeOf _vehToRecycle;
|
||||
private _cfg = configFile >> "cfgVehicles";
|
||||
private _suppMulti = 0.5;
|
||||
private _ammoMulti = 0.5;
|
||||
private _fuelMulti = 0.5;
|
||||
|
||||
if !(
|
||||
((toLower _type) in KPLIB_b_buildings_classes) ||
|
||||
((toLower _type) in KPLIB_storageBuildings) ||
|
||||
((toLower _type) in KPLIB_upgradeBuildings) ||
|
||||
(_type in KP_liberation_ace_crates) ||
|
||||
(_type == "B_Slingload_01_Repair_F") ||
|
||||
(_type == "B_Slingload_01_Fuel_F") ||
|
||||
(_type == "B_Slingload_01_Ammo_F")
|
||||
) then {
|
||||
private _currentAmmo = 0;
|
||||
private _allAmmo = 0;
|
||||
if (count (magazinesAmmo _vehToRecycle) > 0) then {
|
||||
{
|
||||
_currentAmmo = _currentAmmo + (_x select 1);
|
||||
_allAmmo = _allAmmo + (getNumber(configFile >> "CfgMagazines" >> (_x select 0) >> "count"));
|
||||
} forEach (magazinesAmmo _vehToRecycle);
|
||||
} else {
|
||||
_allAmmo = 1;
|
||||
};
|
||||
|
||||
_suppMulti = (((_vehToRecycle getHitPointDamage "HitEngine") - 1) * -1) * (((_vehToRecycle getHitPointDamage "HitHull") - 1) * -1);
|
||||
_ammoMulti = _currentAmmo/_allAmmo;
|
||||
_fuelMulti = fuel _vehToRecycle;
|
||||
|
||||
if (_type in boats_names) then {
|
||||
_suppMulti = (((_vehToRecycle getHitPointDamage "HitEngine") - 1) * -1);
|
||||
};
|
||||
};
|
||||
|
||||
private _price_s = 0;
|
||||
private _price_a = 0;
|
||||
private _price_f = 0;
|
||||
|
||||
if ((toLower _type) in KPLIB_o_allVeh_classes) then {
|
||||
if (_vehToRecycle isKindOf "Car") then {
|
||||
_price_s = round (60 * _suppMulti);
|
||||
_price_a = round (25 * _ammoMulti);
|
||||
_price_f = round (40 * _fuelMulti);
|
||||
};
|
||||
if (_vehToRecycle isKindOf "Tank") then {
|
||||
_price_s = round (150 * _suppMulti);
|
||||
_price_a = round (120 * _ammoMulti);
|
||||
_price_f = round (100 * _fuelMulti);
|
||||
};
|
||||
if (_vehToRecycle isKindOf "Air") then {
|
||||
_price_s = round (250 * _suppMulti);
|
||||
_price_a = round (200 * _ammoMulti);
|
||||
_price_f = round (150 * _fuelMulti);
|
||||
};
|
||||
} else {
|
||||
private _objectinfo = ((light_vehicles + heavy_vehicles + air_vehicles + static_vehicles + support_vehicles + buildings) select {_type == (_x select 0)}) select 0;
|
||||
_price_s = round ((_objectinfo select 1) * GRLIB_recycling_percentage * _suppMulti);
|
||||
_price_a = round ((_objectinfo select 2) * GRLIB_recycling_percentage * _ammoMulti);
|
||||
_price_f = round ((_objectinfo select 3) * GRLIB_recycling_percentage * _fuelMulti);
|
||||
};
|
||||
|
||||
createDialog "liberation_recycle";
|
||||
waitUntil {sleep 0.1; dialog};
|
||||
|
||||
ctrlSetText [134, format [localize "STR_RECYCLING_YIELD", getText (_cfg >> _type >> "displayName")]];
|
||||
ctrlSetText [131, format ["%1", _price_s]];
|
||||
ctrlSetText [132, format ["%1", _price_a]];
|
||||
ctrlSetText [133, format ["%1", _price_f]];
|
||||
|
||||
waitUntil {sleep 0.1; !dialog || !alive player || dorecycle != 0};
|
||||
|
||||
if (dialog) then {closeDialog 0};
|
||||
|
||||
if (dorecycle == 1 && !(isnull _vehToRecycle) && alive _vehToRecycle) then {
|
||||
if (!(KP_liberation_recycle_building_near) && ((_price_s + _price_a + _price_f) > 0)) exitWith {hint localize "STR_NORECBUILDING_ERROR";};
|
||||
|
||||
private _storage_areas = (([] call KPLIB_fnc_getNearestFob) nearobjects (GRLIB_fob_range * 1.2)) select {(_x getVariable ["KP_liberation_storage_type",-1]) == 0};
|
||||
private _crateSum = (ceil (_price_s / 100)) + (ceil (_price_a / 100)) + (ceil (_price_f / 100));
|
||||
private _spaceSum = 0;
|
||||
|
||||
{
|
||||
if (typeOf _x == KP_liberation_large_storage_building) then {
|
||||
_spaceSum = _spaceSum + (count KP_liberation_large_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
if (typeOf _x == KP_liberation_small_storage_building) then {
|
||||
_spaceSum = _spaceSum + (count KP_liberation_small_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
} forEach _storage_areas;
|
||||
|
||||
if (_spaceSum < _crateSum) then {
|
||||
hint localize "STR_CANCEL_ERROR";
|
||||
} else {
|
||||
[_vehToRecycle, _price_s, _price_a, _price_f, _storage_areas] remoteExec ["recycle_remote_call",2];
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
dorepackage = 0;
|
||||
|
||||
createDialog "liberation_repackage_fob";
|
||||
waitUntil {sleep 0.1; dialog};
|
||||
waitUntil {sleep 0.1; !dialog || !alive player || dorepackage != 0};
|
||||
|
||||
if (dorepackage > 0) then {
|
||||
closeDialog 0;
|
||||
waitUntil {sleep 0.1; !dialog};
|
||||
|
||||
private _fob = [] call KPLIB_fnc_getNearestFob;
|
||||
|
||||
if !(_fob isEqualTo []) then {
|
||||
GRLIB_all_fobs = GRLIB_all_fobs - [_fob];
|
||||
KP_liberation_clearances deleteAt (KP_liberation_clearances findIf {(_x select 0) isEqualTo _fob});
|
||||
publicVariable "GRLIB_all_fobs";
|
||||
publicVariable "KP_liberation_clearances";
|
||||
};
|
||||
|
||||
{deleteVehicle _x} forEach (((getPos player) nearobjects [FOB_typename, 250]) select {getObjectType _x >= 8});
|
||||
|
||||
sleep 0.5;
|
||||
|
||||
private _spawnpos = zeropos;
|
||||
while {_spawnpos distance2d zeropos < 1000} do {
|
||||
_spawnpos = (getPos player) findEmptyPosition [10, 250, 'B_Heli_Transport_01_F'];
|
||||
if (_spawnpos isEqualTo []) then {_spawnpos = zeropos;};
|
||||
};
|
||||
|
||||
if (dorepackage == 1) then {
|
||||
private _fobbox = FOB_box_typename createVehicle _spawnpos;
|
||||
[_fobbox] call KPLIB_fnc_addObjectInit;
|
||||
};
|
||||
|
||||
if (dorepackage == 2) then {
|
||||
private _fobTruck = FOB_truck_typename createVehicle _spawnpos;
|
||||
[_fobTruck] call KPLIB_fnc_addObjectInit;
|
||||
};
|
||||
hint localize "STR_FOB_REPACKAGE_HINT";
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
params [ "_veh" ];
|
||||
|
||||
if ( !isNull _veh ) then {
|
||||
_veh setpos [(getpos _veh) select 0,(getpos _veh) select 1, 0.5];
|
||||
_veh setVectorUp surfaceNormal position _veh;
|
||||
};
|
||||
@@ -0,0 +1,53 @@
|
||||
// TODO Remove this loop by adding the actions to the units/intel objects on spawn
|
||||
waitUntil {!isNil "GRLIB_permissions"};
|
||||
waitUntil {!(GRLIB_permissions isEqualTo []) || !GRLIB_permissions_param};
|
||||
|
||||
private _near_people = [];
|
||||
private _near_intel = [];
|
||||
private _actionned_captive_units = [];
|
||||
private _actionned_intel_items = [];
|
||||
|
||||
while {true} do {
|
||||
if ([5] call KPLIB_fnc_hasPermission) then {
|
||||
_near_people = (getPosATL player) nearEntities [["Man"], 5];
|
||||
_near_intel = (getPosATL player) nearEntities [KPLIB_intelObjectClasses, 5];
|
||||
{
|
||||
if ((captive _x) && !(_x in _actionned_captive_units) && !((side group _x) == GRLIB_side_friendly) && !(_x getVariable ["ACE_isUnconscious", false])) then {
|
||||
_x addAction ["<t color='#FFFF00'>" + localize "STR_SECONDARY_CAPTURE" + "</t>",{[_this select 0] join (group player);},"",-850,true,true,"","(vehicle player == player) && (side group _target != GRLIB_side_friendly) && (captive _target)"];
|
||||
_actionned_captive_units pushback _x;
|
||||
};
|
||||
} forEach _near_people;
|
||||
|
||||
{
|
||||
if (!(alive _x) || ((player distance _x) > 5) || ((side group _x) == GRLIB_side_friendly)) then {
|
||||
removeAllActions _x;
|
||||
_actionned_captive_units = _actionned_captive_units - [_x];
|
||||
};
|
||||
} forEach _actionned_captive_units;
|
||||
|
||||
{
|
||||
if !(_x in _actionned_intel_items) then {
|
||||
_x addAction ["<t color='#FFFF00'>" + localize "STR_INTEL" + "</t>",{[_this select 0] remoteExecCall ["intel_remote_call", 2];},"",-849,true,true,"","(vehicle player == player)"];
|
||||
_actionned_intel_items pushback _x;
|
||||
};
|
||||
} forEach _near_intel;
|
||||
|
||||
{
|
||||
if ((player distance _x) > 5) then {
|
||||
removeAllActions _x;
|
||||
_actionned_intel_items = _actionned_intel_items - [_x];
|
||||
};
|
||||
} forEach _actionned_intel_items;
|
||||
} else {
|
||||
{
|
||||
removeAllActions _x;
|
||||
_actionned_captive_units = _actionned_captive_units - [_x];
|
||||
} forEach _actionned_captive_units;
|
||||
|
||||
{
|
||||
removeAllActions _x;
|
||||
_actionned_intel_items = _actionned_intel_items - [_x];
|
||||
} forEach _actionned_intel_items;
|
||||
};
|
||||
sleep 3;
|
||||
};
|
||||
138
kp_liberation.brf_sumava/scripts/client/actions/open_arsenal.sqf
Normal file
138
kp_liberation.brf_sumava/scripts/client/actions/open_arsenal.sqf
Normal file
@@ -0,0 +1,138 @@
|
||||
if (KPLIB_directArsenal) exitWith {
|
||||
if (KP_liberation_ace && KP_liberation_arsenal_type) then {
|
||||
[player, player, false] call ace_arsenal_fnc_openBox;
|
||||
} else {
|
||||
["Open", false] spawn BIS_fnc_arsenal;
|
||||
};
|
||||
};
|
||||
|
||||
load_loadout = 0;
|
||||
edit_loadout = 0;
|
||||
respawn_loadout = 0;
|
||||
load_from_player = -1;
|
||||
exit_on_load = 0;
|
||||
createDialog "liberation_arsenal";
|
||||
|
||||
private _backpack = backpack player;
|
||||
|
||||
private ["_loadouts_data"];
|
||||
// Get loadouts either from ACE or BI arsenals
|
||||
if (KP_liberation_ace && KP_liberation_arsenal_type) then {
|
||||
_loadouts_data = +(profileNamespace getVariable ["ace_arsenal_saved_loadouts", []]);
|
||||
} else {
|
||||
private _saved_loadouts = +(profileNamespace getVariable "bis_fnc_saveInventory_data");
|
||||
_loadouts_data = [];
|
||||
private _counter = 0;
|
||||
if (!isNil "_saved_loadouts") then {
|
||||
{
|
||||
if (_counter % 2 == 0) then {
|
||||
_loadouts_data pushback _x;
|
||||
};
|
||||
_counter = _counter + 1;
|
||||
} forEach _saved_loadouts;
|
||||
};
|
||||
};
|
||||
|
||||
waitUntil { dialog };
|
||||
|
||||
if ( count _loadouts_data > 0 ) then {
|
||||
|
||||
{ lbAdd [201, _x param [0]]} foreach _loadouts_data;
|
||||
|
||||
if ( lbSize 201 > 0 ) then {
|
||||
ctrlEnable [ 202, true ];
|
||||
lbSetCurSel [ 201, 0 ];
|
||||
} else {
|
||||
ctrlEnable [ 202, false ];
|
||||
};
|
||||
|
||||
} else {
|
||||
ctrlEnable [ 202, false ];
|
||||
};
|
||||
|
||||
private _loadplayers = [];
|
||||
{
|
||||
if ( !(name _x in [ "HC1", "HC2", "HC3" ]) ) then {
|
||||
_loadplayers pushback [ name _x, _x ];
|
||||
};
|
||||
} foreach ( allPlayers - [ player ] );
|
||||
|
||||
if ( count _loadplayers > 0 ) then {
|
||||
|
||||
{
|
||||
private _nextplayer = _x select 1;
|
||||
private _namestr = "";
|
||||
if(count (squadParams _nextplayer) != 0) then {
|
||||
_namestr = "[" + ((squadParams _nextplayer select 0) select 0) + "] ";
|
||||
};
|
||||
_namestr = _namestr + name _nextplayer;
|
||||
|
||||
lbAdd [ 203, _namestr ];
|
||||
lbSetCurSel [ 203, 0 ];
|
||||
} foreach _loadplayers;
|
||||
|
||||
} else {
|
||||
ctrlEnable [ 203, false ];
|
||||
ctrlEnable [ 204, false ];
|
||||
};
|
||||
|
||||
((findDisplay 5251) displayCtrl 201) ctrlAddEventHandler [ "mouseButtonDblClick" , { exit_on_load = 1; load_loadout = 1; } ];
|
||||
|
||||
while { dialog && (alive player) && edit_loadout == 0 } do {
|
||||
|
||||
if ( load_loadout > 0 ) then {
|
||||
private _loaded_loadout = _loadouts_data select (lbCurSel 201);
|
||||
if (KP_liberation_ace && KP_liberation_arsenal_type) then {
|
||||
player setUnitLoadout (_loaded_loadout select 1);
|
||||
} else {
|
||||
[player, [profileNamespace, _loaded_loadout]] call BIS_fnc_loadInventory;
|
||||
};
|
||||
|
||||
if (KP_liberation_arsenalUsePreset) then {
|
||||
if ([_backpack] call KPLIB_fnc_checkGear) then {
|
||||
hint format [ localize "STR_HINT_LOADOUT_LOADED", _loaded_loadout param [0]];
|
||||
};
|
||||
} else {
|
||||
hint format [ localize "STR_HINT_LOADOUT_LOADED", _loaded_loadout param [0]];
|
||||
};
|
||||
|
||||
if ( exit_on_load == 1 ) then {
|
||||
closeDialog 0;
|
||||
};
|
||||
load_loadout = 0;
|
||||
};
|
||||
|
||||
if ( respawn_loadout > 0 ) then {
|
||||
GRLIB_respawn_loadout = [ player, ["repetitive"] ] call KPLIB_fnc_getLoadout;
|
||||
hint localize "STR_MAKE_RESPAWN_LOADOUT_HINT";
|
||||
respawn_loadout = 0;
|
||||
};
|
||||
|
||||
if ( load_from_player >= 0 ) then {
|
||||
private _playerselected = ( _loadplayers select load_from_player ) select 1;
|
||||
if ( alive _playerselected ) then {
|
||||
[player, [_playerselected, ["repetitive"]] call KPLIB_fnc_getLoadout] call KPLIB_fnc_setLoadout;
|
||||
hint format [ localize "STR_LOAD_PLAYER_LOADOUT_HINT", name _playerselected ];
|
||||
};
|
||||
load_from_player = -1;
|
||||
};
|
||||
|
||||
sleep 0.1;
|
||||
};
|
||||
|
||||
if ( edit_loadout > 0 ) then {
|
||||
closeDialog 0;
|
||||
waitUntil { !dialog };
|
||||
if (KP_liberation_ace && KP_liberation_arsenal_type) then {
|
||||
[player, player, false] call ace_arsenal_fnc_openBox;
|
||||
} else {
|
||||
[ "Open", false ] spawn BIS_fnc_arsenal;
|
||||
};
|
||||
|
||||
if (KP_liberation_arsenalUsePreset) then {
|
||||
uiSleep 5;
|
||||
private _arsenalDisplay = ["RSCDisplayArsenal", "ace_arsenal_display"] select (KP_liberation_ace && KP_liberation_arsenal_type);
|
||||
waitUntil {sleep 1; isNull (uinamespace getvariable [_arsenalDisplay, displayNull])};
|
||||
[_backpack] call KPLIB_fnc_checkGear;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,72 @@
|
||||
private _recycleable_vehicles = [];
|
||||
private _recycleable_classnames = [];
|
||||
veh_action_detect_distance = 20;
|
||||
veh_action_distance = 10;
|
||||
|
||||
{
|
||||
_recycleable_classnames append _x;
|
||||
} forEach [
|
||||
KPLIB_b_light_classes,
|
||||
KPLIB_b_heavy_classes,
|
||||
KPLIB_b_air_classes,
|
||||
KPLIB_b_static_classes,
|
||||
KPLIB_b_support_classes,
|
||||
KPLIB_o_allVeh_classes
|
||||
];
|
||||
|
||||
while {true} do {
|
||||
waitUntil {sleep 2; player getVariable ['KPLIB_fobDist', 99999] < GRLIB_fob_range};
|
||||
|
||||
if ([4] call KPLIB_fnc_hasPermission) then {
|
||||
private _detected_vehicles = (getPos player) nearObjects veh_action_detect_distance select {
|
||||
(((toLower (typeof _x)) in _recycleable_classnames && (({alive _x} count (crew _x)) == 0 || unitIsUAV _x) && (locked _x == 0 || locked _x == 1)) ||
|
||||
(toLower (typeOf _x)) in KPLIB_b_buildings_classes ||
|
||||
(((toLower (typeOf _x)) in KPLIB_storageBuildings) && ((_x getVariable ["KP_liberation_storage_type",-1]) == 0)) ||
|
||||
(toLower (typeOf _x)) in KPLIB_upgradeBuildings ||
|
||||
(typeOf _x) in KP_liberation_ace_crates) &&
|
||||
alive _x &&
|
||||
(
|
||||
// ignore null objects left by Advanced Towing
|
||||
// see https://github.com/sethduda/AdvancedTowing/pull/46
|
||||
(((attachedObjects _x) select {!isNull _X}) isEqualTo [])
|
||||
|| ((typeOf _x) == "rhsusf_mkvsoc")
|
||||
) &&
|
||||
_x distance2d startbase > 1000 &&
|
||||
(_x distance2d ([] call KPLIB_fnc_getNearestFob)) < GRLIB_fob_range &&
|
||||
(getObjectType _x) >= 8
|
||||
};
|
||||
|
||||
{
|
||||
private _next_vehicle = _x;
|
||||
private _next_vehicle_already_in_list = false;
|
||||
{
|
||||
if ((_x select 0) == _next_vehicle) exitWith {_next_vehicle_already_in_list = true;};
|
||||
} forEach _recycleable_vehicles;
|
||||
|
||||
if (!_next_vehicle_already_in_list) then {
|
||||
private _idact_next = _next_vehicle addAction ["<t color='#FFFF00'>" + localize "STR_RECYCLE" + "</t> <img size='2' image='res\ui_recycle.paa'/>", "scripts\client\actions\do_recycle.sqf", "", -900, true, true, "", "build_confirmed == 0 && ((_this distance2D _target) < veh_action_distance) && (vehicle player == player)"];
|
||||
_recycleable_vehicles pushback [_next_vehicle, _idact_next] ;
|
||||
};
|
||||
} forEach _detected_vehicles;
|
||||
|
||||
{
|
||||
private _next_vehicle = _x;
|
||||
private _next_vehicle_already_in_list = false;
|
||||
{
|
||||
if (_x == (_next_vehicle select 0)) exitWith {_next_vehicle_already_in_list = true;};
|
||||
} forEach _detected_vehicles;
|
||||
|
||||
if (!_next_vehicle_already_in_list) then {
|
||||
(_next_vehicle select 0) removeAction (_next_vehicle select 1);
|
||||
_recycleable_vehicles = _recycleable_vehicles - [_next_vehicle];
|
||||
};
|
||||
} forEach _recycleable_vehicles;
|
||||
} else {
|
||||
{
|
||||
(_x select 0) removeAction (_x select 1);
|
||||
_recycleable_vehicles = _recycleable_vehicles - [_x];
|
||||
} forEach _recycleable_vehicles;
|
||||
};
|
||||
|
||||
sleep 3;
|
||||
};
|
||||
@@ -0,0 +1,58 @@
|
||||
waitUntil {!isNil "GRLIB_permissions"};
|
||||
waitUntil {!(GRLIB_permissions isEqualTo []) || !GRLIB_permissions_param};
|
||||
|
||||
private [ "_unflippable_vehicles", "_detected_vehicles", "_next_vehicle", "_next_vehicle_already_in_list", "_idact_next" ];
|
||||
|
||||
_unflippable_vehicles = [];
|
||||
veh_action_distance = 10;
|
||||
|
||||
while { true } do {
|
||||
|
||||
if ([5] call KPLIB_fnc_hasPermission) then {
|
||||
|
||||
_detected_vehicles = ((getpos player) nearEntities [["Tank","APC","IFV","Car"], veh_action_distance]) select {
|
||||
(count crew _x) == 0 &&
|
||||
((locked _x == 0 || locked _x == 1)) &&
|
||||
(_x distance startbase > 1000)
|
||||
};
|
||||
|
||||
{
|
||||
_next_vehicle = _x;
|
||||
_next_vehicle_already_in_list = false;
|
||||
{
|
||||
if ( (_x select 0) == _next_vehicle ) then {
|
||||
_next_vehicle_already_in_list = true;
|
||||
};
|
||||
} foreach _unflippable_vehicles;
|
||||
|
||||
if ( !_next_vehicle_already_in_list ) then {
|
||||
_idact_next = _next_vehicle addAction [ "<t color='#FFFF00'>" + localize "STR_UNFLIP" + "</t> <img size='2' image='res\ui_flipveh.paa'/>", "scripts\client\actions\do_unflip.sqf", "", -950, true, true, "", "build_confirmed == 0 && (_this distance _target < veh_action_distance) && (vehicle player == player)"];
|
||||
_unflippable_vehicles pushback [ _next_vehicle, _idact_next ] ;
|
||||
};
|
||||
} foreach _detected_vehicles;
|
||||
|
||||
{
|
||||
_next_vehicle = _x;
|
||||
_next_vehicle_already_in_list = false;
|
||||
{
|
||||
if ( _x == (_next_vehicle select 0) ) then {
|
||||
_next_vehicle_already_in_list = true;
|
||||
};
|
||||
} foreach _detected_vehicles;
|
||||
|
||||
if ( !_next_vehicle_already_in_list ) then {
|
||||
(_next_vehicle select 0) removeAction (_next_vehicle select 1);
|
||||
_unflippable_vehicles = _unflippable_vehicles - [ _next_vehicle ];
|
||||
};
|
||||
|
||||
} foreach _unflippable_vehicles;
|
||||
|
||||
} else {
|
||||
{
|
||||
(_x select 0) removeAction (_x select 1);
|
||||
_unflippable_vehicles = _unflippable_vehicles - [ _x ];
|
||||
} foreach _unflippable_vehicles;
|
||||
};
|
||||
|
||||
sleep 3;
|
||||
};
|
||||
@@ -0,0 +1,127 @@
|
||||
waitUntil {!isNil "build_confirmed"};
|
||||
waitUntil {!isNil "one_synchro_done"};
|
||||
waitUntil {!isNil "one_eco_done"};
|
||||
waitUntil {one_synchro_done};
|
||||
waitUntil {one_eco_done};
|
||||
|
||||
private ["_managed_trucks", "_managed_boxes", "_managed_areas", "_next_truck", "_next_box", "_truck_load", "_checked_trucks", "_checked_boxes", "_action_id","_action_id2","_action_id3","_action_id4","_b_action_id1","_b_action_id2","_b_action_id3","_b_action_id4"];
|
||||
|
||||
_managed_trucks = [];
|
||||
_managed_boxes = [];
|
||||
_managed_areas = [];
|
||||
|
||||
while {true} do {
|
||||
|
||||
if ([5] call KPLIB_fnc_hasPermission) then {
|
||||
|
||||
_nearammoboxes = ((getpos player) nearEntities [KPLIB_crates, 10]);
|
||||
_neartransporttrucks = ((getpos player) nearEntities [KPLIB_transport_classes, 10]);
|
||||
_nearstorageareas = nearestObjects [player, KPLIB_storageBuildings, 10];
|
||||
|
||||
_checked_trucks = [];
|
||||
|
||||
{
|
||||
_next_truck = _x;
|
||||
_truck_load = _next_truck getVariable ["GRLIB_ammo_truck_load", 0];
|
||||
|
||||
if (!(_next_truck in _managed_trucks) && (_truck_load > 0)) then {
|
||||
_action_id = _next_truck addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNLOAD_BOX" + "</t>","scripts\client\ammoboxes\do_unload_truck.sqf","",-500,true,true,"","build_confirmed == 0 && (_this distance _target < 8) && (vehicle player == player)"];
|
||||
_next_truck setVariable [ "GRLIB_ammo_truck_action", _action_id, false ];
|
||||
_managed_trucks pushback _next_truck;
|
||||
};
|
||||
|
||||
if ((_next_truck in _managed_trucks) && _truck_load == 0) then {
|
||||
_next_truck removeAction (_next_truck getVariable ["GRLIB_ammo_truck_action", -1]);
|
||||
_managed_trucks = _managed_trucks - [_next_truck];
|
||||
};
|
||||
|
||||
_checked_trucks pushback _next_truck;
|
||||
|
||||
} foreach _neartransporttrucks;
|
||||
|
||||
{
|
||||
_next_truck = _x;
|
||||
if (!(_next_truck in _checked_trucks)) then {
|
||||
_managed_trucks = _managed_trucks - [_next_truck];
|
||||
_next_truck removeAction ( _next_truck getVariable ["GRLIB_ammo_truck_action", -1]);
|
||||
}
|
||||
|
||||
} foreach _managed_trucks;
|
||||
|
||||
_checked_boxes = [];
|
||||
|
||||
{
|
||||
_next_box = _x;
|
||||
if (!(_next_box in _managed_boxes) && ( isNull attachedTo _next_box )) then {
|
||||
_b_action_id1 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_LOAD_BOX" + "</t>",{[_this select 0] call do_load_box;},"",-501,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
|
||||
_b_action_id2 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_STORE_CRATE" + "</t>",{[(_this select 0), (nearestObjects [player,KPLIB_storageBuildings,20]) select 0,true] call KPLIB_fnc_crateToStorage;},"",-502,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
|
||||
_b_action_id3 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_CRATE_VALUE" + "</t>",{[_this select 0] call KPLIB_fnc_checkCrateValue;uiSleep 3; hint "";},"",-503,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
|
||||
_b_action_id4 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_CRATE_PUSH" + "</t>",{(_this select 0) setPos ((_this select 0) getPos [1, (player getDir (_this select 0))]);},"",-504,true,false,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
|
||||
_next_box setVariable ["GRLIB_ammo_box_action", _b_action_id1, false];
|
||||
_next_box setVariable ["KP_crate_store_action", _b_action_id2, false];
|
||||
_next_box setVariable ["KP_crate_value_action", _b_action_id3, false];
|
||||
_next_box setVariable ["KP_crate_push_action", _b_action_id4, false];
|
||||
_managed_boxes pushback _next_box;
|
||||
};
|
||||
|
||||
_checked_boxes pushback _next_box;
|
||||
} foreach _nearammoboxes;
|
||||
|
||||
{
|
||||
_next_box = _x;
|
||||
if (!(_next_box in _managed_boxes) || !( isNull attachedTo _next_box )) then {
|
||||
_managed_boxes = _managed_boxes - [_next_box];
|
||||
_next_box removeAction (_next_box getVariable ["GRLIB_ammo_box_action", -1]);
|
||||
_next_box removeAction (_next_box getVariable ["KP_crate_store_action", -1]);
|
||||
_next_box removeAction (_next_box getVariable ["KP_crate_value_action", -1]);
|
||||
_next_box removeAction (_next_box getVariable ["KP_crate_push_action", -1]);
|
||||
}
|
||||
} foreach _managed_boxes;
|
||||
|
||||
_checked_areas = [];
|
||||
|
||||
{
|
||||
_next_area = _x;
|
||||
_area_load = count (attachedObjects _x);
|
||||
|
||||
if (!(_next_area in _managed_areas) && (_area_load > 0)) then {
|
||||
_action_id = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_SUPPLY" + "</t>",{[KP_liberation_supply_crate, (_this select 0), true] call KPLIB_fnc_crateFromStorage;},"",-504,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
|
||||
_next_area setVariable ["KP_supply_unstore_action", _action_id, false];
|
||||
_action_id2 = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_AMMO" + "</t>",{[KP_liberation_ammo_crate, (_this select 0), true] call KPLIB_fnc_crateFromStorage;},"",-505,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
|
||||
_next_area setVariable ["KP_ammo_unstore_action", _action_id2, false];
|
||||
_action_id3 = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_FUEL" + "</t>",{[KP_liberation_fuel_crate, (_this select 0), true] call KPLIB_fnc_crateFromStorage;},"",-506,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
|
||||
_next_area setVariable ["KP_fuel_unstore_action", _action_id3, false];
|
||||
_action_id4 = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_SORT_STORAGE" + "</t>",{[(_this select 0)] call KPLIB_fnc_sortStorage;},"",-507,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
|
||||
_next_area setVariable ["KP_storage_sort_action", _action_id4, false];
|
||||
_managed_areas pushback _next_area;
|
||||
};
|
||||
|
||||
if ((_next_area in _managed_areas) && _area_load == 0) then {
|
||||
_next_area removeAction (_next_area getVariable ["KP_supply_unstore_action", -1]);
|
||||
_next_area removeAction (_next_area getVariable ["KP_ammo_unstore_action", -1]);
|
||||
_next_area removeAction (_next_area getVariable ["KP_fuel_unstore_action", -1]);
|
||||
_next_area removeAction (_next_area getVariable ["KP_storage_sort_action", -1]);
|
||||
_managed_areas = _managed_areas - [_next_area];
|
||||
};
|
||||
|
||||
_checked_areas pushback _next_area;
|
||||
|
||||
} foreach _nearstorageareas;
|
||||
|
||||
{
|
||||
_next_area = _x;
|
||||
if (!(_next_area in _checked_areas)) then {
|
||||
_managed_areas = _managed_areas - [_next_area];
|
||||
_next_area removeAction (_next_area getVariable ["KP_supply_unstore_action", -1]);
|
||||
_next_area removeAction (_next_area getVariable ["KP_ammo_unstore_action", -1]);
|
||||
_next_area removeAction (_next_area getVariable ["KP_fuel_unstore_action", -1]);
|
||||
_next_area removeAction (_next_area getVariable ["KP_storage_sort_action", -1]);
|
||||
}
|
||||
|
||||
} foreach _managed_areas;
|
||||
|
||||
};
|
||||
|
||||
sleep 3;
|
||||
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
params [ "_ammobox", ["_max_transport_distance", 15] ];
|
||||
private [ "_neartransporttrucks", "_truck_to_load", "_truck_load", "_next_truck", "_maxload", "_i" ];
|
||||
|
||||
_maxload = 3;
|
||||
_neartransporttrucks = ((getpos _ammobox) nearEntities [KPLIB_transport_classes, _max_transport_distance]) select {alive _x && speed _x < 5 && ((getpos _x) select 2) < 5};
|
||||
_truck_to_load = objNull;
|
||||
|
||||
|
||||
{
|
||||
_next_truck = _x;
|
||||
_maxload = 0;
|
||||
_offsets = [];
|
||||
{
|
||||
if ( _x select 0 == typeof _next_truck ) then {
|
||||
_maxload = (count _x) - 2;
|
||||
for [ {_i=2}, {_i < (count _x) }, {_i=_i+1} ] do { _offsets pushback (_x select _i); };
|
||||
};
|
||||
} foreach KPLIB_transportConfigs;
|
||||
|
||||
if ( isNull _truck_to_load ) then {
|
||||
_truck_load = _next_truck getVariable ["GRLIB_ammo_truck_load", 0];
|
||||
if ( _truck_load < _maxload ) then {
|
||||
_truck_to_load = _next_truck;
|
||||
_ammobox attachTo [ _truck_to_load, _offsets select _truck_load ];
|
||||
[_ammobox, false] remoteExec ["enableRopeAttach"];
|
||||
_truck_to_load setVariable ["GRLIB_ammo_truck_load", _truck_load + 1, true];
|
||||
if ( !isDedicated ) then {
|
||||
hint localize "STR_BOX_LOADED";
|
||||
};
|
||||
}
|
||||
};
|
||||
} foreach _neartransporttrucks;
|
||||
|
||||
if ( isNull _truck_to_load && !isDedicated ) then {
|
||||
hint localize "STR_BOX_CANTLOAD";
|
||||
uiSleep 2;
|
||||
hint "";
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
params [ "_truck_to_unload"];
|
||||
private [ "_next_box", "_next_pos", "_offset" ];
|
||||
|
||||
_offset = 0;
|
||||
|
||||
{
|
||||
if ( _x select 0 == typeof _truck_to_unload ) then { _offset = _x select 1; };
|
||||
} foreach KPLIB_transportConfigs;
|
||||
|
||||
if ( _truck_to_unload getVariable ["GRLIB_ammo_truck_load", 0] > 0 ) then {
|
||||
_truck_to_unload setVariable ["GRLIB_ammo_truck_load", 0, true];
|
||||
[_truck_to_unload, false] remoteExec ["KPLIB_fnc_protectObject"];
|
||||
|
||||
{
|
||||
_next_box = _x;
|
||||
[_next_box, false] remoteExec ["KPLIB_fnc_protectObject"];
|
||||
sleep 0.5;
|
||||
detach _next_box;
|
||||
_next_box setpos (_truck_to_unload getpos [_offset, getdir _truck_to_unload]);
|
||||
_next_box setdir (getdir _truck_to_unload);
|
||||
_next_box setVelocity [0,0,0];
|
||||
_next_box setDamage 0;
|
||||
_offset = _offset - 2.2;
|
||||
sleep 0.5;
|
||||
[_next_box] remoteExec ["KPLIB_fnc_protectObject"];
|
||||
[_next_box, true] remoteExec ["enableRopeAttach"];
|
||||
} foreach ( attachedObjects _truck_to_unload);
|
||||
|
||||
sleep 0.5;
|
||||
|
||||
[_truck_to_unload] remoteExec ["KPLIB_fnc_protectObject"];
|
||||
|
||||
hint localize "STR_BOX_UNLOADED";
|
||||
uiSleep 2;
|
||||
hint "";
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
if (isDedicated) exitWith {};
|
||||
|
||||
params ["_notif_id", ["_pos", getpos player]];
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["asymm_notifications called on: %1 - Parameters: [%2, %3] ", debug_source, _notif_id, _pos], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
switch (_notif_id) do {
|
||||
case 0: {
|
||||
["lib_asymm_convoy_ambush", [markertext ([10000, _pos] call KPLIB_fnc_getNearestSector)]] call BIS_fnc_showNotification;
|
||||
private _ambush_marker = createMarkerLocal ["asymm_ambushmarker", _pos];
|
||||
_ambush_marker setMarkerDirLocal (random 360);
|
||||
_ambush_marker setMarkerColorLocal "ColorIndependent";
|
||||
_ambush_marker setMarkerTypeLocal "hd_ambush";
|
||||
};
|
||||
case 1: {
|
||||
["lib_asymm_convoy_ambush_success"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "asymm_ambushmarker";
|
||||
};
|
||||
case 2: {
|
||||
["lib_asymm_convoy_ambush_fail"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "asymm_ambushmarker";
|
||||
};
|
||||
default {[format ["asymm_notifications.sqf -> no valid value for _notif_id: %1", _notif_id], "ERROR"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
GRLIB_conflicting_objects = [];
|
||||
GRLIB_buildoverlay_icon = "\A3\ui_f\data\map\markers\handdrawn\objective_CA.paa";
|
||||
GRLIB_buildoverlay_color = [ 1, 0, 0, 1 ];
|
||||
GRLIB_buildoverlay_cfg = configFile >> "cfgVehicles";
|
||||
|
||||
["build_overlay", "onEachFrame", {
|
||||
|
||||
if ( build_confirmed == 1 ) then {
|
||||
if ( count GRLIB_conflicting_objects > 0 ) then {
|
||||
{
|
||||
if ( alive _x ) then {
|
||||
drawIcon3D [ GRLIB_buildoverlay_icon, GRLIB_buildoverlay_color, [ (getpos _x) select 0, (getpos _x) select 1, 1.5],
|
||||
1, 1, 0, format [ "%1", getText (GRLIB_buildoverlay_cfg >> typeof _x >> "displayName") ], 2, 0.04, "puristaMedium"];
|
||||
};
|
||||
} foreach GRLIB_conflicting_objects;
|
||||
};
|
||||
};
|
||||
}] call BIS_fnc_addStackedEventHandler;
|
||||
373
kp_liberation.brf_sumava/scripts/client/build/do_build.sqf
Normal file
373
kp_liberation.brf_sumava/scripts/client/build/do_build.sqf
Normal file
@@ -0,0 +1,373 @@
|
||||
// TODO This needs absolutely a code refactoring, flamethrower or nuke
|
||||
|
||||
private [ "_maxdist", "_truepos", "_built_object_remote", "_pos", "_grp", "_classname", "_idx", "_unitrank", "_posfob", "_ghost_spot", "_vehicle", "_dist", "_actualdir", "_near_objects", "_near_objects_25", "_debug_colisions" ];
|
||||
|
||||
build_confirmed = 0;
|
||||
_maxdist = GRLIB_fob_range;
|
||||
_truepos = [];
|
||||
_debug_colisions = false;
|
||||
KP_vector = true;
|
||||
|
||||
private _object_spheres = [];
|
||||
private _fob_spheres = [];
|
||||
for "_i" from 1 to 36 do {
|
||||
_object_spheres pushBack ("Sign_Sphere100cm_F" createVehicleLocal [0, 0, 0]);
|
||||
_fob_spheres pushBack ("Sign_Sphere100cm_F" createVehicleLocal [0, 0, 0]);
|
||||
};
|
||||
|
||||
{ _x setObjectTexture [0, "#(rgb,8,8,3)color(0,1,0,1)"]; } foreach _object_spheres;
|
||||
|
||||
if (isNil "manned") then { manned = false };
|
||||
if (isNil "gridmode" ) then { gridmode = 0 };
|
||||
if (isNil "repeatbuild" ) then { repeatbuild = false };
|
||||
if (isNil "build_rotation" ) then { build_rotation = 0 };
|
||||
if (isNil "build_elevation" ) then { build_elevation = 0 };
|
||||
|
||||
waitUntil { sleep 0.2; !isNil "dobuild" };
|
||||
|
||||
while { true } do {
|
||||
waitUntil { sleep 0.2; dobuild != 0 };
|
||||
|
||||
build_confirmed = 1;
|
||||
build_invalid = 0;
|
||||
_classname = "";
|
||||
if ( buildtype == 99 ) then {
|
||||
_classname = FOB_typename;
|
||||
} else {
|
||||
_classname = ((KPLIB_buildList select buildtype) select buildindex) select 0;
|
||||
_price_s = ((KPLIB_buildList select buildtype) select buildindex) select 1;
|
||||
_price_a = ((KPLIB_buildList select buildtype) select buildindex) select 2;
|
||||
_price_f = ((KPLIB_buildList select buildtype) select buildindex) select 3;
|
||||
|
||||
_nearfob = [] call KPLIB_fnc_getNearestFob;
|
||||
_storage_areas = (_nearfob nearobjects (GRLIB_fob_range * 2)) select {(_x getVariable ["KP_liberation_storage_type",-1]) == 0};
|
||||
|
||||
[_price_s, _price_a, _price_f, _classname, buildtype, _storage_areas] remoteExec ["build_remote_call",2];
|
||||
};
|
||||
|
||||
if(buildtype == 1) then {
|
||||
_pos = [(getpos player select 0) + 1,(getpos player select 1) + 1, 0];
|
||||
_grp = group player;
|
||||
if ( manned ) then {
|
||||
_grp = createGroup GRLIB_side_friendly;
|
||||
};
|
||||
_classname createUnit [_pos, _grp,"this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]", 0.5, "private"];
|
||||
build_confirmed = 0;
|
||||
} else {
|
||||
if ( buildtype == 8 ) then {
|
||||
_pos = [(getpos player select 0) + 1,(getpos player select 1) + 1, 0];
|
||||
_grp = createGroup GRLIB_side_friendly;
|
||||
_grp setGroupId [format ["%1 %2",squads_names select buildindex, groupId _grp]];
|
||||
_idx = 0;
|
||||
{
|
||||
_unitrank = "private";
|
||||
if(_idx == 0) then { _unitrank = "sergeant"; };
|
||||
if(_idx == 1) then { _unitrank = "corporal"; };
|
||||
if (_classname isEqualTo blufor_squad_para) then {
|
||||
_x createUnit [_pos, _grp,"this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]; removeBackpackGlobal this; this addBackpackGlobal ""B_parachute""", 0.5, _unitrank];
|
||||
} else {
|
||||
_x createUnit [_pos, _grp,"this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}];", 0.5, _unitrank];
|
||||
};
|
||||
_idx = _idx + 1;
|
||||
|
||||
} foreach _classname;
|
||||
_grp setBehaviour "SAFE";
|
||||
build_confirmed = 0;
|
||||
} else {
|
||||
_posfob = getpos player;
|
||||
if (buildtype != 99) then {
|
||||
_posfob = [] call KPLIB_fnc_getNearestFob;
|
||||
};
|
||||
|
||||
_idactcancel = -1;
|
||||
_idactsnap = -1;
|
||||
_idactplacebis = -1;
|
||||
_idactvector = -1;
|
||||
if (buildtype != 99 ) then {
|
||||
_idactcancel = player addAction ["<t color='#B0FF00'>" + localize "STR_CANCEL" + "</t> <img size='2' image='res\ui_cancel.paa'/>",{build_confirmed = 3; GRLIB_ui_notif = ""; hint localize "STR_CANCEL_HINT";},"",-725,false,true,"","build_confirmed == 1"];
|
||||
};
|
||||
if (buildtype == 6 ) then {
|
||||
_idactplacebis = player addAction ["<t color='#B0FF00'>" + localize "STR_PLACEMENT_BIS" + "</t> <img size='2' image='res\ui_confirm.paa'/>",{build_confirmed = 2; repeatbuild = true; hint localize "STR_CONFIRM_HINT";},"",-785,false,false,"","build_invalid == 0 && build_confirmed == 1"];
|
||||
};
|
||||
if (buildtype == 6 || buildtype == 99 || (toLower _classname) in KPLIB_storageBuildings || _classname isEqualTo KP_liberation_recycle_building || _classname isEqualTo KP_liberation_air_vehicle_building) then {
|
||||
_idactsnap = player addAction ["<t color='#B0FF00'>" + localize "STR_GRID" + "</t>",{gridmode = gridmode + 1;},"",-735,false,false,"","build_confirmed == 1"];
|
||||
_idactvector = player addAction ["<t color='#B0FF00'>" + localize "STR_VECACTION" + "</t>",{KP_vector = !KP_vector;},"",-800,false,false,"","build_confirmed == 1"];
|
||||
};
|
||||
|
||||
_idactrotate = player addAction ["<t color='#B0FF00'>" + localize "STR_ROTATION" + "</t> <img size='2' image='res\ui_rotation.paa'/>",{build_rotation = build_rotation + 90;},"",-750,false,false,"","build_confirmed == 1"];
|
||||
_idactraise = player addAction ["<t color='#B0FF00'>" + localize "STR_RAISE" + "</t>",{build_elevation = build_elevation + 0.2;},"",-765,false,false,"","build_confirmed == 1"];
|
||||
_idactlower = player addAction ["<t color='#B0FF00'>" + localize "STR_LOWER" + "</t>",{build_elevation = build_elevation - 0.2;},"",-766,false,false,"","build_confirmed == 1"];
|
||||
_idactplace = player addAction ["<t color='#B0FF00'>" + localize "STR_PLACEMENT" + "</t> <img size='2' image='res\ui_confirm.paa'/>",{build_confirmed = 2; hint localize "STR_CONFIRM_HINT";},"",-775,false,true,"","build_invalid == 0 && build_confirmed == 1"];
|
||||
|
||||
_ghost_spot = (markerPos "ghost_spot") findEmptyPosition [0,100];
|
||||
|
||||
_vehicle = _classname createVehicleLocal _ghost_spot;
|
||||
_vehicle allowdamage false;
|
||||
_vehicle setVehicleLock "LOCKED";
|
||||
_vehicle enableSimulationGlobal false;
|
||||
_vehicle setVariable ["KP_liberation_preplaced", true, true];
|
||||
|
||||
_dist = 0.6 * (sizeOf _classname);
|
||||
if (_dist < 3.5) then { _dist = 3.5 };
|
||||
_dist = _dist + 1;
|
||||
|
||||
for [{_i=0}, {_i<5}, {_i=_i+1}] do {
|
||||
_vehicle setObjectTextureGlobal [_i, '#(rgb,8,8,3)color(0,1,0,0.8)'];
|
||||
};
|
||||
|
||||
{_x setObjectTexture [0, "#(rgb,8,8,3)color(0,1,0,1)"];} foreach _object_spheres;
|
||||
|
||||
while { build_confirmed == 1 && alive player } do {
|
||||
_truedir = 90 - (getdir player);
|
||||
if ((toLower (typeOf _vehicle)) in KPLIB_b_static_classes) then {
|
||||
_truepos = [((getposATL player) select 0) + (_dist * (cos _truedir)), ((getposATL player) select 1) + (_dist * (sin _truedir)),((getposATL player) select 2)];
|
||||
} else {
|
||||
_truepos = [((getpos player) select 0) + (_dist * (cos _truedir)), ((getpos player) select 1) + (_dist * (sin _truedir)),0];
|
||||
};
|
||||
_actualdir = ((getdir player) + build_rotation);
|
||||
if ( _classname == "Land_Cargo_Patrol_V1_F" || _classname == "Land_PortableLight_single_F" ) then { _actualdir = _actualdir + 180 };
|
||||
if ( _classname == FOB_typename ) then { _actualdir = _actualdir + 270 };
|
||||
|
||||
while { _actualdir > 360 } do { _actualdir = _actualdir - 360 };
|
||||
while { _actualdir < 0 } do { _actualdir = _actualdir + 360 };
|
||||
if ( ((buildtype == 6) || (buildtype == 99)) && ((gridmode % 2) == 1) ) then {
|
||||
if ( _actualdir >= 22.5 && _actualdir <= 67.5 ) then { _actualdir = 45 };
|
||||
if ( _actualdir >= 67.5 && _actualdir <= 112.5 ) then { _actualdir = 90 };
|
||||
if ( _actualdir >= 112.5 && _actualdir <= 157.5 ) then { _actualdir = 135 };
|
||||
if ( _actualdir >= 157.5 && _actualdir <= 202.5 ) then { _actualdir = 180 };
|
||||
if ( _actualdir >= 202.5 && _actualdir <= 247.5 ) then { _actualdir = 225 };
|
||||
if ( _actualdir >= 247.5 && _actualdir <= 292.5 ) then { _actualdir = 270 };
|
||||
if ( _actualdir >= 292.5 && _actualdir <= 337.5 ) then { _actualdir = 315 };
|
||||
if ( _actualdir <= 22.5 || _actualdir >= 337.5 ) then { _actualdir = 0 };
|
||||
};
|
||||
|
||||
{
|
||||
_x setPos (_truepos getPos [_dist, 10 * _forEachIndex]);
|
||||
} foreach _object_spheres;
|
||||
|
||||
if !(buildtype isEqualTo 99) then {
|
||||
{
|
||||
_x setPos (_posfob getPos [GRLIB_fob_range, 10 * _forEachIndex])
|
||||
} forEach _fob_spheres;
|
||||
};
|
||||
|
||||
_vehicle setdir _actualdir;
|
||||
|
||||
_truepos = [_truepos select 0, _truepos select 1, (_truepos select 2) + build_elevation];
|
||||
|
||||
_near_objects = (_truepos nearobjects ["AllVehicles", _dist]) ;
|
||||
_near_objects = _near_objects + (_truepos nearobjects [FOB_box_typename, _dist]);
|
||||
_near_objects = _near_objects + (_truepos nearobjects [Arsenal_typename, _dist]);
|
||||
|
||||
_near_objects_25 = (_truepos nearobjects ["AllVehicles", 50]) ;
|
||||
_near_objects_25 = _near_objects_25 + (_truepos nearobjects [FOB_box_typename, 50]);
|
||||
_near_objects_25 = _near_objects_25 + (_truepos nearobjects [Arsenal_typename, 50]);
|
||||
|
||||
if( buildtype != 6 ) then {
|
||||
_near_objects = _near_objects + (_truepos nearobjects ["Static", _dist]);
|
||||
_near_objects_25 = _near_objects_25 + (_truepos nearobjects ["Static", 50]);
|
||||
};
|
||||
|
||||
private _remove_objects = [];
|
||||
{
|
||||
private _typeOfX = typeOf _x;
|
||||
if ((_x isKindOf "Animal") || (_typeOfX in GRLIB_ignore_colisions_when_building) || (_typeOfX isKindOf "CAManBase") || (isPlayer _x) || (_x == _vehicle) || ((toLower (typeOf _vehicle)) in KPLIB_b_static_classes)) then {
|
||||
_remove_objects pushback _x;
|
||||
};
|
||||
} foreach _near_objects;
|
||||
|
||||
private _remove_objects_25 = [];
|
||||
{
|
||||
private _typeOfX = typeOf _x;
|
||||
if ((_x isKindOf "Animal") || (_typeOfX in GRLIB_ignore_colisions_when_building) || (_typeOfX isKindOf "CAManBase") || (isPlayer _x) || (_x == _vehicle) || ((toLower (typeOf _vehicle)) in KPLIB_b_static_classes)) then {
|
||||
_remove_objects_25 pushback _x;
|
||||
};
|
||||
} foreach _near_objects_25;
|
||||
|
||||
_near_objects = _near_objects - _remove_objects;
|
||||
_near_objects_25 = _near_objects_25 - _remove_objects_25;
|
||||
|
||||
if ( count _near_objects == 0 ) then {
|
||||
{
|
||||
_dist22 = 0.6 * (sizeOf (typeof _x));
|
||||
if ( _dist22 < 1 ) then { _dist22 = 1 };
|
||||
if (_truepos distance _x < _dist22) then {
|
||||
_near_objects pushback _x;
|
||||
};
|
||||
} foreach _near_objects_25;
|
||||
};
|
||||
|
||||
if ( count _near_objects != 0 ) then {
|
||||
GRLIB_conflicting_objects = _near_objects;
|
||||
} else {
|
||||
GRLIB_conflicting_objects = [];
|
||||
};
|
||||
|
||||
if (count _near_objects == 0 && ((_truepos distance _posfob) < _maxdist) && ( ((!surfaceIsWater _truepos) && (!surfaceIsWater getpos player)) || (_classname in boats_names) ) ) then {
|
||||
|
||||
if ( ((buildtype == 6) || (buildtype == 99)) && ((gridmode % 2) == 1) ) then {
|
||||
_vehicle setpos [round (_truepos select 0),round (_truepos select 1), _truepos select 2];
|
||||
} else {
|
||||
if ((toLower (typeOf _vehicle)) in KPLIB_b_static_classes) then {
|
||||
_vehicle setPosATL _truepos;
|
||||
} else {
|
||||
_vehicle setpos _truepos;
|
||||
};
|
||||
};
|
||||
if (buildtype == 6 || buildtype == 99 || (toLower _classname) in KPLIB_storageBuildings || _classname isEqualTo KP_liberation_recycle_building || _classname isEqualTo KP_liberation_air_vehicle_building) then {
|
||||
if (KP_vector) then {
|
||||
_vehicle setVectorUp [0,0,1];
|
||||
} else {
|
||||
_vehicle setVectorUp surfaceNormal position _vehicle;
|
||||
};
|
||||
} else {
|
||||
_vehicle setVectorUp surfaceNormal position _vehicle;
|
||||
};
|
||||
if(build_invalid == 1) then {
|
||||
GRLIB_ui_notif = "";
|
||||
|
||||
{_x setObjectTexture [0, "#(rgb,8,8,3)color(0,1,0,1)"];} foreach _object_spheres;
|
||||
};
|
||||
build_invalid = 0;
|
||||
|
||||
} else {
|
||||
if ( build_invalid == 0 ) then {
|
||||
{_x setObjectTexture [0, "#(rgb,8,8,3)color(1,0,0,1)"];} foreach _object_spheres;
|
||||
};
|
||||
_vehicle setpos _ghost_spot;
|
||||
build_invalid = 1;
|
||||
if(count _near_objects > 0) then {
|
||||
GRLIB_ui_notif = format [localize "STR_PLACEMENT_IMPOSSIBLE",count _near_objects, round _dist];
|
||||
|
||||
if (_debug_colisions) then {
|
||||
private [ "_objs_classnames" ];
|
||||
_objs_classnames = [];
|
||||
{ _objs_classnames pushback (typeof _x) } foreach _near_objects;
|
||||
hint format [ "Colisions : %1", _objs_classnames ];
|
||||
};
|
||||
};
|
||||
if( ((surfaceIsWater _truepos) || (surfaceIsWater getpos player)) && !(_classname in boats_names)) then {
|
||||
GRLIB_ui_notif = localize "STR_BUILD_ERROR_WATER";
|
||||
};
|
||||
if((_truepos distance _posfob) > _maxdist) then {
|
||||
GRLIB_ui_notif = format [localize "STR_BUILD_ERROR_DISTANCE",_maxdist];
|
||||
};
|
||||
|
||||
};
|
||||
sleep 0.05;
|
||||
};
|
||||
|
||||
GRLIB_ui_notif = "";
|
||||
|
||||
{_x setPos [0, 0, 0];} forEach (_object_spheres + _fob_spheres);
|
||||
|
||||
if ( !alive player || build_confirmed == 3 ) then {
|
||||
private ["_price_s", "_price_a", "_price_f", "_nearfob", "_storage_areas"];
|
||||
_price_s = ((KPLIB_buildList select buildtype) select buildindex) select 1;
|
||||
_price_a = ((KPLIB_buildList select buildtype) select buildindex) select 2;
|
||||
_price_f = ((KPLIB_buildList select buildtype) select buildindex) select 3;
|
||||
|
||||
_nearfob = [] call KPLIB_fnc_getNearestFob;
|
||||
_storage_areas = (_nearfob nearobjects (GRLIB_fob_range * 2)) select {(_x getVariable ["KP_liberation_storage_type",-1]) == 0};
|
||||
|
||||
_supplyCrates = ceil (_price_s / 100);
|
||||
_ammoCrates = ceil (_price_a / 100);
|
||||
_fuelCrates = ceil (_price_f / 100);
|
||||
_crateSum = _supplyCrates + _ammoCrates + _fuelCrates;
|
||||
|
||||
_spaceSum = 0;
|
||||
|
||||
{
|
||||
if (typeOf _x == KP_liberation_large_storage_building) then {
|
||||
_spaceSum = _spaceSum + (count KP_liberation_large_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
if (typeOf _x == KP_liberation_small_storage_building) then {
|
||||
_spaceSum = _spaceSum + (count KP_liberation_small_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
} forEach _storage_areas;
|
||||
|
||||
deleteVehicle _vehicle;
|
||||
|
||||
if (_spaceSum < _crateSum) then {
|
||||
hint localize "STR_CANCEL_ERROR";
|
||||
} else {
|
||||
[_price_s, _price_a, _price_f, _storage_areas] remoteExec ["cancel_build_remote_call",2];
|
||||
};
|
||||
};
|
||||
|
||||
if ( build_confirmed == 2 ) then {
|
||||
_vehpos = getpos _vehicle;
|
||||
_vehdir = getdir _vehicle;
|
||||
deleteVehicle _vehicle;
|
||||
sleep 0.1;
|
||||
_vehicle = _classname createVehicle _truepos;
|
||||
_vehicle allowDamage false;
|
||||
_vehicle setdir _vehdir;
|
||||
if ((toLower (typeOf _vehicle)) in KPLIB_b_static_classes) then {
|
||||
_vehicle setPosATL _truepos;
|
||||
} else {
|
||||
_vehicle setpos _truepos;
|
||||
};
|
||||
|
||||
[_vehicle] call KPLIB_fnc_addObjectInit;
|
||||
|
||||
[_vehicle] call KPLIB_fnc_clearCargo;
|
||||
|
||||
if (buildtype == 6 || buildtype == 99 || (toLower _classname) in KPLIB_storageBuildings || _classname isEqualTo KP_liberation_recycle_building || _classname isEqualTo KP_liberation_air_vehicle_building) then {
|
||||
if (KP_vector) then {
|
||||
_vehicle setVectorUp [0,0,1];
|
||||
} else {
|
||||
_vehicle setVectorUp surfaceNormal position _vehicle;
|
||||
};
|
||||
} else {
|
||||
_vehicle setVectorUp surfaceNormal position _vehicle;
|
||||
};
|
||||
|
||||
if ( (unitIsUAV _vehicle) || manned ) then {
|
||||
[ _vehicle ] call KPLIB_fnc_forceBluforCrew;
|
||||
};
|
||||
|
||||
sleep 0.3;
|
||||
_vehicle allowDamage true;
|
||||
_vehicle setDamage 0;
|
||||
|
||||
if(buildtype != 6) then {
|
||||
_vehicle addMPEventHandler ["MPKilled", {_this spawn kill_manager}];
|
||||
{ _x addMPEventHandler ["MPKilled", {_this spawn kill_manager}]; } foreach (crew _vehicle);
|
||||
};
|
||||
};
|
||||
|
||||
if ( _idactcancel != -1 ) then {
|
||||
player removeAction _idactcancel;
|
||||
};
|
||||
if ( _idactsnap != -1 ) then {
|
||||
player removeAction _idactsnap;
|
||||
};
|
||||
if ( _idactplacebis != -1 ) then {
|
||||
player removeAction _idactplacebis;
|
||||
};
|
||||
if ( _idactvector != -1 ) then {
|
||||
player removeAction _idactvector;
|
||||
};
|
||||
player removeAction _idactrotate;
|
||||
player removeAction _idactplace;
|
||||
player removeAction _idactraise;
|
||||
player removeAction _idactlower;
|
||||
|
||||
if(buildtype == 99) then {
|
||||
_new_fob = getpos player;
|
||||
[_new_fob, false] remoteExec ["build_fob_remote_call",2];
|
||||
buildtype = 1;
|
||||
};
|
||||
build_confirmed = 0;
|
||||
};
|
||||
};
|
||||
|
||||
if ( repeatbuild ) then {
|
||||
dobuild = 1;
|
||||
repeatbuild = false;
|
||||
} else {
|
||||
dobuild = 0;
|
||||
};
|
||||
manned = false;
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
private [ "_minfobdist", "_minsectordist", "_distfob", "_clearedtobuildfob", "_distsector", "_clearedtobuildsector", "_idx" ];
|
||||
|
||||
if ( count GRLIB_all_fobs >= GRLIB_maximum_fobs ) exitWith {
|
||||
hint format [ localize "STR_HINT_FOBS_EXCEEDED", GRLIB_maximum_fobs ];
|
||||
};
|
||||
|
||||
_minfobdist = 1000;
|
||||
_minsectordist = GRLIB_capture_size + GRLIB_fob_range;
|
||||
_distfob = 1;
|
||||
_clearedtobuildfob = true;
|
||||
_distsector = 1;
|
||||
_clearedtobuildsector = true;
|
||||
|
||||
FOB_build_in_progress = true;
|
||||
publicVariable "FOB_build_in_progress";
|
||||
|
||||
_idx = 0;
|
||||
while { (_idx < (count GRLIB_all_fobs)) && _clearedtobuildfob } do {
|
||||
if ( player distance (GRLIB_all_fobs select _idx) < _minfobdist ) then {
|
||||
_clearedtobuildfob = false;
|
||||
_distfob = player distance (GRLIB_all_fobs select _idx);
|
||||
};
|
||||
_idx = _idx + 1;
|
||||
};
|
||||
|
||||
_idx = 0;
|
||||
if(_clearedtobuildfob) then {
|
||||
while { (_idx < (count sectors_allSectors)) && _clearedtobuildsector } do {
|
||||
if ( player distance (markerPos (sectors_allSectors select _idx)) < _minsectordist ) then {
|
||||
_clearedtobuildsector = false;
|
||||
_distsector = player distance (markerPos (sectors_allSectors select _idx));
|
||||
};
|
||||
_idx = _idx + 1;
|
||||
};
|
||||
};
|
||||
|
||||
if (!_clearedtobuildfob) then {
|
||||
hint format [localize "STR_FOB_BUILDING_IMPOSSIBLE",floor _minfobdist,floor _distfob];
|
||||
FOB_build_in_progress = false;
|
||||
publicVariable "FOB_build_in_progress";
|
||||
} else {
|
||||
if ( !_clearedtobuildsector ) then {
|
||||
hint format [localize "STR_FOB_BUILDING_IMPOSSIBLE_SECTOR",floor _minsectordist,floor _distsector];
|
||||
FOB_build_in_progress = false;
|
||||
publicVariable "FOB_build_in_progress";
|
||||
} else {
|
||||
buildtype = 99;
|
||||
dobuild = 1;
|
||||
deleteVehicle (_this select 0);
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,106 @@
|
||||
private ["_vector", "_idactcancel", "_idactplace", "_idactvector", "_ghost_spot", "_truedir", "_dist", "_truepos", "_sectorpos", "_building"];
|
||||
|
||||
if (((_this select 3) select 0) == KP_liberation_small_storage_building) then {
|
||||
|
||||
_truepos = [];
|
||||
|
||||
build_confirmed = 1;
|
||||
build_invalid = 0;
|
||||
KP_vector = true;
|
||||
|
||||
_sectorpos = markerPos ([100] call KPLIB_fnc_getNearestSector);
|
||||
|
||||
_idactcancel = player addAction ["<t color='#B0FF00'>" + localize "STR_CANCEL" + "</t> <img size='2' image='res\ui_cancel.paa'/>",{build_confirmed = 3;},"",-725,false,true,"","build_confirmed == 1"];
|
||||
_idactplace = player addAction ["<t color='#B0FF00'>" + localize "STR_PLACEMENT" + "</t> <img size='2' image='res\ui_confirm.paa'/>",{build_confirmed = 2;},"",-775,false,true,"","build_invalid == 0 && build_confirmed == 1"];
|
||||
_idactvector = player addAction ["<t color='#B0FF00'>" + localize "STR_VECACTION" + "</t>",{KP_vector = !KP_vector;},"",-800,false,false,"","build_confirmed == 1"];
|
||||
|
||||
_ghost_spot = (markerPos "ghost_spot") findEmptyPosition [0,100];
|
||||
|
||||
_building = ((_this select 3) select 0) createVehicleLocal _ghost_spot;
|
||||
_building allowdamage false;
|
||||
_building setVehicleLock "LOCKED";
|
||||
_building enableSimulationGlobal false;
|
||||
|
||||
_dist = 0.6 * (sizeOf ((_this select 3) select 0));
|
||||
if (_dist < 3.5) then { _dist = 3.5 };
|
||||
_dist = _dist + 0.5;
|
||||
|
||||
for [{_i=0}, {_i<5}, {_i=_i+1}] do {
|
||||
_building setObjectTextureGlobal [_i, '#(rgb,8,8,3)color(0,1,0,0.8)'];
|
||||
};
|
||||
|
||||
while {build_confirmed == 1 && alive player} do {
|
||||
_truedir = 90 - (getdir player);
|
||||
_truepos = [((getpos player) select 0) + (_dist * (cos _truedir)), ((getpos player) select 1) + (_dist * (sin _truedir)),0];
|
||||
|
||||
if ((surfaceIsWater _truepos) || (surfaceIsWater getpos player) || ((_truepos distance _sectorpos) > 100)) then {
|
||||
_building setpos _ghost_spot;
|
||||
build_invalid = 1;
|
||||
|
||||
if(((surfaceIsWater _truepos) || (surfaceIsWater getpos player))) then {
|
||||
GRLIB_ui_notif = localize "STR_BUILD_ERROR_WATER";
|
||||
};
|
||||
|
||||
if((_truepos distance _sectorpos) > 100) then {
|
||||
GRLIB_ui_notif = format [localize "STR_BUILD_ERROR_DISTANCE",100];
|
||||
};
|
||||
} else {
|
||||
_building setdir (getDir player);
|
||||
_building setpos _truepos;
|
||||
|
||||
if (KP_vector) then {
|
||||
_building setVectorUp [0,0,1];
|
||||
} else {
|
||||
_building setVectorUp surfaceNormal position _building;
|
||||
};
|
||||
|
||||
if (build_invalid == 1) then {
|
||||
GRLIB_ui_notif = "";
|
||||
};
|
||||
|
||||
build_invalid = 0;
|
||||
};
|
||||
|
||||
sleep 0.05;
|
||||
};
|
||||
|
||||
GRLIB_ui_notif = "";
|
||||
|
||||
if (!alive player || build_confirmed == 3) then {
|
||||
deleteVehicle _building;
|
||||
};
|
||||
|
||||
if (build_confirmed == 2) then {
|
||||
_vehpos = getpos _building;
|
||||
_vehdir = getdir _building;
|
||||
deleteVehicle _building;
|
||||
sleep 0.1;
|
||||
_building = ((_this select 3) select 0) createVehicle _truepos;
|
||||
_building allowDamage false;
|
||||
_building setdir _vehdir;
|
||||
_building setpos _truepos;
|
||||
|
||||
if (KP_vector) then {
|
||||
_building setVectorUp [0,0,1];
|
||||
} else {
|
||||
_building setVectorUp surfaceNormal position _building;
|
||||
};
|
||||
|
||||
_building setVariable ["KP_liberation_storage_type", 1, true];
|
||||
|
||||
sleep 0.3;
|
||||
_building allowDamage true;
|
||||
_building setDamage 0;
|
||||
};
|
||||
|
||||
player removeAction _idactcancel;
|
||||
player removeAction _idactplace;
|
||||
player removeAction _idactvector;
|
||||
|
||||
recalculate_sectors = true;
|
||||
publicVariable "recalculate_sectors";
|
||||
|
||||
build_confirmed = 0;
|
||||
} else {
|
||||
[player getVariable ["KPLIB_nearProd", []], ((_this select 3) select 0), clientOwner] remoteExec ["build_fac_remote_call",2];
|
||||
};
|
||||
@@ -0,0 +1,206 @@
|
||||
private [ "_oldbuildtype", "_cfg", "_initindex", "_dialog", "_iscommandant", "_squadname", "_buildpages", "_build_list", "_classnamevar", "_entrytext", "_icon", "_affordable", "_affordable_crew", "_selected_item", "_linked", "_linked_unlocked", "_base_link", "_link_color", "_link_str", "_nearfob", "_actual_fob"];
|
||||
|
||||
if (([ getpos player , 500 , GRLIB_side_enemy ] call KPLIB_fnc_getUnitsCount ) > 4 ) exitWith { hint localize "STR_BUILD_ENEMIES_NEARBY";};
|
||||
|
||||
if (isNil "buildtype") then {buildtype = 1};
|
||||
if (isNil "buildindex") then {buildindex = -1};
|
||||
dobuild = 0;
|
||||
_oldbuildtype = -1;
|
||||
_cfg = configFile >> "cfgVehicles";
|
||||
_initindex = buildindex;
|
||||
|
||||
_dialog = createDialog "liberation_build";
|
||||
waitUntil { dialog };
|
||||
|
||||
_iscommandant = false;
|
||||
if (player == [] call KPLIB_fnc_getCommander) then {
|
||||
_iscommandant = true;
|
||||
};
|
||||
|
||||
ctrlShow [108, _iscommandant];
|
||||
ctrlShow [1085, _iscommandant];
|
||||
ctrlShow [121, _iscommandant];
|
||||
|
||||
_squadname = "";
|
||||
_buildpages = [
|
||||
localize "STR_BUILD1",
|
||||
localize "STR_BUILD2",
|
||||
localize "STR_BUILD3",
|
||||
localize "STR_BUILD4",
|
||||
localize "STR_BUILD5",
|
||||
localize "STR_BUILD6",
|
||||
localize "STR_BUILD7",
|
||||
localize "STR_BUILD8"
|
||||
];
|
||||
|
||||
_nearfob = [] call KPLIB_fnc_getNearestFob;
|
||||
_actual_fob = KP_liberation_fob_resources select {((_x select 0) distance _nearfob) < GRLIB_fob_range};
|
||||
|
||||
while {dialog && alive player && (dobuild == 0 || buildtype == 1)} do {
|
||||
_build_list = KPLIB_buildList select buildtype;
|
||||
|
||||
if (_oldbuildtype != buildtype || synchro_done) then {
|
||||
synchro_done = false;
|
||||
_oldbuildtype = buildtype;
|
||||
_actual_fob = KP_liberation_fob_resources select {((_x select 0) distance _nearfob) < GRLIB_fob_range};
|
||||
|
||||
lbClear 110;
|
||||
{
|
||||
ctrlSetText [151, _buildpages select ( buildtype - 1)];
|
||||
if (buildtype != 8) then {
|
||||
_classnamevar = (_x select 0);
|
||||
_entrytext = getText (_cfg >> _classnamevar >> "displayName");
|
||||
|
||||
switch (_classnamevar) do {
|
||||
case FOB_box_typename: {_entrytext = localize "STR_FOBBOX";};
|
||||
case Arsenal_typename: {if (KP_liberation_mobilearsenal) then {_entrytext = localize "STR_ARSENAL_BOX";};};
|
||||
case Respawn_truck_typename: {if (KP_liberation_mobilerespawn) then {_entrytext = localize "STR_RESPAWN_TRUCK";};};
|
||||
case FOB_truck_typename: {_entrytext = localize "STR_FOBTRUCK";};
|
||||
case "Flag_White_F": {_entrytext = localize "STR_INDIV_FLAG";};
|
||||
case KP_liberation_small_storage_building: {_entrytext = localize "STR_SMALL_STORAGE";};
|
||||
case KP_liberation_large_storage_building: {_entrytext = localize "STR_LARGE_STORAGE";};
|
||||
case KP_liberation_recycle_building: {_entrytext = localize "STR_RECYCLE_BUILDING";};
|
||||
case KP_liberation_air_vehicle_building: {_entrytext = localize "STR_HELI_BUILDING";};
|
||||
case KP_liberation_heli_slot_building: {_entrytext = localize "STR_HELI_SLOT";};
|
||||
case KP_liberation_plane_slot_building: {_entrytext = localize "STR_PLANE_SLOT";};
|
||||
default {};
|
||||
};
|
||||
|
||||
((findDisplay 5501) displayCtrl (110)) lnbAddRow [ _entrytext, format [ "%1" ,_x select 1], format [ "%1" ,_x select 2], format [ "%1" ,_x select 3]];
|
||||
|
||||
_icon = getText ( _cfg >> (_x select 0) >> "icon");
|
||||
if(isText (configFile >> "CfgVehicleIcons" >> _icon)) then {
|
||||
_icon = (getText (configFile >> "CfgVehicleIcons" >> _icon));
|
||||
};
|
||||
lnbSetPicture [110, [((lnbSize 110) select 0) - 1, 0],_icon];
|
||||
} else {
|
||||
if ( ((lnbSize 110) select 0) <= count squads_names ) then {
|
||||
_squadname = squads_names select ((lnbSize 110) select 0);
|
||||
} else {
|
||||
_squadname = "";
|
||||
};
|
||||
((findDisplay 5501) displayCtrl (110)) lnbAddRow [_squadname, format [ "%1" ,_x select 1], format [ "%1" ,_x select 2], format [ "%1" ,_x select 3]];
|
||||
};
|
||||
|
||||
_affordable = true;
|
||||
if (
|
||||
((_x select 1 > 0) && ((_x select 1) > ((_actual_fob select 0) select 1))) ||
|
||||
((_x select 2 > 0) && ((_x select 2) > ((_actual_fob select 0) select 2))) ||
|
||||
((_x select 3 > 0) && ((_x select 3) > ((_actual_fob select 0) select 3)))
|
||||
) then {
|
||||
_affordable = false;
|
||||
};
|
||||
|
||||
if ( _affordable ) then {
|
||||
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 0], [1,1,1,1]];
|
||||
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 1], [1,1,1,1]];
|
||||
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 2], [1,1,1,1]];
|
||||
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 3], [1,1,1,1]];
|
||||
} else {
|
||||
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 0], [0.4,0.4,0.4,1]];
|
||||
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 1], [0.4,0.4,0.4,1]];
|
||||
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 2], [0.4,0.4,0.4,1]];
|
||||
((findDisplay 5501) displayCtrl (110)) lnbSetColor [[((lnbSize 110) select 0) - 1, 3], [0.4,0.4,0.4,1]];
|
||||
};
|
||||
|
||||
} foreach _build_list;
|
||||
};
|
||||
|
||||
if(_initindex != -1) then {
|
||||
lbSetCurSel [110, _initindex];
|
||||
_initindex = -1;
|
||||
};
|
||||
|
||||
_selected_item = lbCurSel 110;
|
||||
_affordable = false;
|
||||
_squad_full = false;
|
||||
if ((buildtype == 1) && (count (units group player) >= GRLIB_max_squad_size)) then {
|
||||
_squad_full = true;
|
||||
};
|
||||
_linked = false;
|
||||
_linked_unlocked = true;
|
||||
_base_link = "";
|
||||
if (dobuild == 0 && _selected_item != -1 && (_selected_item < (count _build_list))) then {
|
||||
_build_item = _build_list select _selected_item;
|
||||
if (
|
||||
((_build_item select 1 == 0 ) || ((_build_item select 1) <= ((_actual_fob select 0) select 1))) &&
|
||||
((_build_item select 2 == 0 ) || ((_build_item select 2) <= ((_actual_fob select 0) select 2))) &&
|
||||
((_build_item select 3 == 0 ) || ((_build_item select 3) <= ((_actual_fob select 0) select 3)))
|
||||
) then {
|
||||
if !((_build_item select 0) isEqualType []) then {
|
||||
if ((toLower (_build_item select 0)) in KPLIB_b_air_classes && !([_build_item select 0] call KPLIB_fnc_isClassUAV)) then {
|
||||
if (KP_liberation_air_vehicle_building_near &&
|
||||
((((_build_item select 0) isKindOf "Helicopter") && (KP_liberation_heli_count < KP_liberation_heli_slots)) ||
|
||||
(((_build_item select 0) isKindOf "Plane") && (KP_liberation_plane_count < KP_liberation_plane_slots)))
|
||||
) then {
|
||||
_affordable = true;
|
||||
};
|
||||
} else {
|
||||
if (!((toLower (_build_item select 0)) in KPLIB_airSlots) || (((toLower (_build_item select 0)) in KPLIB_airSlots) && KP_liberation_air_vehicle_building_near)) then {
|
||||
_affordable = true;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_affordable = true;
|
||||
};
|
||||
};
|
||||
|
||||
if ( buildtype != 8 ) then {
|
||||
{ if ( ( _build_item select 0 ) == ( _x select 0 ) ) exitWith { _base_link = _x select 1; _linked = true; } } foreach GRLIB_vehicle_to_military_base_links;
|
||||
|
||||
if ( _linked ) then {
|
||||
if ( !(_base_link in blufor_sectors) ) then { _linked_unlocked = false };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_affordable_crew = _affordable;
|
||||
if ( unitcap >= ([] call KPLIB_fnc_getLocalCap)) then {
|
||||
_affordable_crew = false;
|
||||
if (buildtype == 1 || buildtype == 8) then {
|
||||
_affordable = false;
|
||||
};
|
||||
};
|
||||
|
||||
ctrlEnable [ 120, _affordable && _linked_unlocked && !(_squad_full) ];
|
||||
ctrlEnable [ 121, _affordable_crew && _linked_unlocked ];
|
||||
|
||||
ctrlSetText [131, format [ "%1 : %2" , localize "STR_MANPOWER", (floor KP_liberation_supplies)]] ;
|
||||
ctrlSetText [132, format [ "%1 : %2" , localize "STR_AMMO", (floor KP_liberation_ammo)]];
|
||||
ctrlSetText [133, format [ "%1 : %2" , localize "STR_FUEL", (floor KP_liberation_fuel)]];
|
||||
|
||||
((findDisplay 5501) displayCtrl (134)) ctrlSetStructuredText formatText [
|
||||
"%1/%2 %3 - %4/%5 %6 - %7/%8 %9",
|
||||
unitcap,
|
||||
([] call KPLIB_fnc_getLocalCap),
|
||||
image "\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\modeGroups_ca.paa",
|
||||
KP_liberation_heli_count,
|
||||
KP_liberation_heli_slots,
|
||||
image "\A3\air_f_beta\Heli_Transport_01\Data\UI\Map_Heli_Transport_01_base_CA.paa",
|
||||
KP_liberation_plane_count,
|
||||
KP_liberation_plane_slots,
|
||||
image "\A3\Air_F_EPC\Plane_CAS_01\Data\UI\Map_Plane_CAS_01_CA.paa"
|
||||
];
|
||||
|
||||
_link_color = "#0040e0";
|
||||
_link_str = localize "STR_VEHICLE_UNLOCKED";
|
||||
if (!_linked_unlocked) then { _link_color = "#e00000"; _link_str = localize "STR_VEHICLE_LOCKED"; };
|
||||
if ( _linked ) then {
|
||||
((findDisplay 5501) displayCtrl (161)) ctrlSetStructuredText parseText ( "<t color='" + _link_color + "' align='center'>" + _link_str + "<br/>" + ( markerText _base_link ) + "</t>" );
|
||||
} else {
|
||||
((findDisplay 5501) displayCtrl (161)) ctrlSetStructuredText parseText "";
|
||||
};
|
||||
|
||||
buildindex = _selected_item;
|
||||
|
||||
if(buildtype == 1 && dobuild != 0) then {
|
||||
ctrlEnable [120, false];
|
||||
ctrlEnable [121, false];
|
||||
sleep 1;
|
||||
dobuild = 0;
|
||||
};
|
||||
|
||||
sleep 0.1;
|
||||
};
|
||||
|
||||
if (!alive player || dobuild != 0) then { closeDialog 0 };
|
||||
@@ -0,0 +1,47 @@
|
||||
params ["_informant"];
|
||||
|
||||
if (isDedicated) exitWith {};
|
||||
|
||||
if (KP_liberation_civinfo_debug > 0) then {[format ["civinfo_escort called on: %1 - Parameters: [%2]", debug_source, _informant], "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
waitUntil {sleep 0.5; local _informant || !alive _informant};
|
||||
|
||||
if !(alive _informant) exitWith {if (KP_liberation_civinfo_debug > 0) then {[format ["civinfo_escort exited by: %1 - Informant isn't alive", debug_source], "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};};
|
||||
|
||||
private _is_near_fob = false;
|
||||
|
||||
sleep 1;
|
||||
_informant playmove "AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
|
||||
sleep 2;
|
||||
_informant enableAI "ANIM";
|
||||
_informant enableAI "MOVE";
|
||||
sleep 2;
|
||||
[_informant, ""] remoteExecCall ["switchMove"];
|
||||
|
||||
waitUntil {sleep 5;
|
||||
_nearestfob = [getpos _informant] call KPLIB_fnc_getNearestFob;
|
||||
if (count _nearestfob == 3) then {
|
||||
if ((_informant distance _nearestfob) < 30) then {
|
||||
_is_near_fob = true;
|
||||
};
|
||||
};
|
||||
!alive _informant || (_is_near_fob && (vehicle _informant == _informant))
|
||||
};
|
||||
|
||||
if (alive _informant) then {
|
||||
if (_is_near_fob) then {
|
||||
sleep 5;
|
||||
private _grp = createGroup [GRLIB_side_friendly, true];
|
||||
[_informant] joinSilent _grp;
|
||||
_informant playmove "AmovPercMstpSnonWnonDnon_AmovPsitMstpSnonWnonDnon_ground";
|
||||
_informant disableAI "ANIM";
|
||||
_informant disableAI "MOVE";
|
||||
sleep 5;
|
||||
[_informant, "AidlPsitMstpSnonWnonDnon_ground00"] remoteExecCall ["switchMove"];
|
||||
[_informant] remoteExec ["civinfo_delivered",2];
|
||||
if (KP_liberation_civinfo_debug > 0) then {["civinfo_escort -> Informant at FOB", "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
sleep 600;
|
||||
deleteVehicle _informant;
|
||||
if (KP_liberation_civinfo_debug > 0) then {[format ["civinfo_escort finished by: %1", debug_source], "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
if (isDedicated) exitWith {};
|
||||
|
||||
params ["_notif_id", ["_pos", getpos player]];
|
||||
|
||||
if (KP_liberation_civinfo_debug > 0) then {[format ["civinfo_notifications called on: %1 - Parameters: [%2, %3]", debug_source, _notif_id, _pos], "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
switch (_notif_id) do {
|
||||
case 0: {
|
||||
["lib_civ_informant_start", [markertext ([10000, _pos] call KPLIB_fnc_getNearestSector)]] call BIS_fnc_showNotification;
|
||||
private _informant_marker = createMarkerLocal ["informantmarker", _pos];
|
||||
_informant_marker setMarkerColorLocal "ColorCIV";
|
||||
_informant_marker setMarkerShape "ELLIPSE";
|
||||
_informant_marker setMarkerBrush "FDiagonal";
|
||||
_informant_marker setMarkerSize [500,500];
|
||||
};
|
||||
case 1: {
|
||||
["lib_civ_informant_success"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "informantmarker";
|
||||
};
|
||||
case 2: {
|
||||
["lib_civ_informant_fail"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "informantmarker";
|
||||
};
|
||||
case 3: {
|
||||
["lib_civ_informant_death"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "informantmarker";
|
||||
};
|
||||
case 4: {
|
||||
["lib_civ_hvt_start", [markertext ([10000, _pos] call KPLIB_fnc_getNearestSector)]] call BIS_fnc_showNotification;
|
||||
private _marker = createMarker ["HVT_marker", _pos];
|
||||
_marker setMarkerColor GRLIB_color_enemy_bright;
|
||||
_marker setMarkerType "hd_unknown";
|
||||
|
||||
private _marker_zone = createMarker ["HVT_zone", _pos];
|
||||
_marker_zone setMarkerColor GRLIB_color_enemy_bright;
|
||||
_marker_zone setMarkerShape "ELLIPSE";
|
||||
_marker_zone setMarkerBrush "FDiagonal";
|
||||
_marker_zone setMarkerSize [500,500];
|
||||
};
|
||||
case 5: {
|
||||
["lib_civ_hvt_success"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "HVT_marker";
|
||||
deleteMarkerLocal "HVT_zone";
|
||||
};
|
||||
case 6: {
|
||||
["lib_civ_hvt_fail"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "HVT_marker";
|
||||
deleteMarkerLocal "HVT_zone";
|
||||
};
|
||||
default {[format ["civinfo_notifications.sqf -> no valid value for _notif_id: %1", _notif_id], "ERROR"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
scriptName "[KPLIB] Enforce Whitelist";
|
||||
|
||||
[] call compileFinal preprocessFileLineNumbers "whitelist.sqf";
|
||||
|
||||
if (!GRLIB_use_whitelist) exitWith {};
|
||||
|
||||
waitUntil {alive player};
|
||||
sleep 1;
|
||||
|
||||
if (player isEqualTo ([] call KPLIB_fnc_getCommander) && !(serverCommandAvailable "#kick")) then {
|
||||
|
||||
private _match = false;
|
||||
|
||||
[] call {
|
||||
if ((getPlayerUID player) in GRLIB_whitelisted_steamids) exitWith {_match = true;};
|
||||
if ((name player) in GRLIB_whitelisted_names) exitWith {_match = true;};
|
||||
if (!((squadParams player) isEqualTo []) && {(((squadParams player) select 0) select 0) in GRLIB_whitelisted_tags}) exitWith {_match = true;};
|
||||
};
|
||||
|
||||
if (!_match) then {
|
||||
sleep 1;
|
||||
endMission "END1";
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,230 @@
|
||||
private ["_dialog", "_logi_count", "_listselect", "_selectedGroup", "_detailControls", "_nearfob", "_logi_destinations", "_mapdisplay", "_tempvariable"];
|
||||
|
||||
_dialog = createDialog "liberation_logistic";
|
||||
_logi_count = 0;
|
||||
_listselect = -1;
|
||||
_selectedGroup = [];
|
||||
_detailControls = [
|
||||
75805,75806,75807,75808,75809,758010,758011,758012,758013,758014,758015,758016,758017,758018,
|
||||
758019,758020,758021,758022,758023,758024,758025,758026,758027,758028,758029,758030,758031,
|
||||
758032,758080,758081
|
||||
];
|
||||
_nearfob = [] call KPLIB_fnc_getNearestFob;
|
||||
_logi_destinations = [];
|
||||
|
||||
{
|
||||
_logi_destinations pushBack [(format ["FOB %1", military_alphabet select _forEachIndex]), (_x select 0), (_x select 1), (_x select 2), (_x select 3)];
|
||||
} forEach KP_liberation_fob_resources;
|
||||
|
||||
{
|
||||
_logi_destinations pushBack [(_x select 0), (markerPos (_x select 1)), (_x select 9), (_x select 10), (_x select 11)];
|
||||
} forEach KP_liberation_production;
|
||||
|
||||
_logi_destinations sort true;
|
||||
|
||||
addLogiGroup = 0;
|
||||
deleteLogiGroup = 0;
|
||||
buyLogiTruck = 0;
|
||||
sellLogiTruck = 0;
|
||||
saveConvoySettings = 0;
|
||||
convoyStandby = 0;
|
||||
logiError = 0;
|
||||
_tempvariable = nil;
|
||||
|
||||
disableSerialization;
|
||||
|
||||
waitUntil {dialog};
|
||||
|
||||
_mapdisplay = ((findDisplay 75802) displayCtrl 758098);
|
||||
|
||||
ctrlMapAnimClear _mapdisplay;
|
||||
|
||||
while {dialog && (alive player)} do {
|
||||
|
||||
"spawn_marker" setMarkerPosLocal markers_reset;
|
||||
|
||||
ctrlEnable [75803, false];
|
||||
ctrlEnable [75804, false];
|
||||
ctrlEnable [758021, false];
|
||||
ctrlEnable [758022, false];
|
||||
ctrlEnable [758024, false];
|
||||
ctrlEnable [758025, false];
|
||||
ctrlEnable [758026, false];
|
||||
ctrlEnable [758027, false];
|
||||
ctrlEnable [758029, false];
|
||||
ctrlEnable [758030, false];
|
||||
ctrlEnable [758031, false];
|
||||
ctrlEnable [758032, false];
|
||||
ctrlEnable [758080, false];
|
||||
ctrlEnable [758081, false];
|
||||
|
||||
if (addLogiGroup == 1) then {
|
||||
addLogiGroup = 0;
|
||||
[_selectedGroup] remoteExec ["add_logiGroup_remote_call",2];
|
||||
waitUntil {sleep 0.5; _logi_count != (count KP_liberation_logistics)};
|
||||
};
|
||||
|
||||
if (deleteLogiGroup == 1) then {
|
||||
deleteLogiGroup = 0;
|
||||
[_selectedGroup] remoteExec ["del_logiGroup_remote_call",2];
|
||||
lbSetCurSel [75802,-1];
|
||||
waitUntil {sleep 0.5; _logi_count != (count KP_liberation_logistics)};
|
||||
};
|
||||
|
||||
if (buyLogiTruck == 1) then {
|
||||
buyLogiTruck = 0;
|
||||
_tempvariable = _selectedGroup select 1;
|
||||
[_listselect, _nearfob, clientOwner, KP_liberation_supplies, KP_liberation_ammo, KP_liberation_fuel] remoteExec ["add_logiTruck_remote_call",2];
|
||||
waitUntil {sleep 0.5; (_tempvariable != ((KP_liberation_logistics select _listselect) select 1)) || (logiError == 1)};
|
||||
};
|
||||
|
||||
if (sellLogiTruck == 1) then {
|
||||
sellLogiTruck = 0;
|
||||
_tempvariable = _selectedGroup select 1;
|
||||
[_listselect, _nearfob, clientOwner] remoteExec ["del_logiTruck_remote_call",2];
|
||||
waitUntil {sleep 0.5; (_tempvariable != ((KP_liberation_logistics select _listselect) select 1)) || (logiError == 1)};
|
||||
};
|
||||
|
||||
if (saveConvoySettings == 1) then {
|
||||
saveConvoySettings = 0;
|
||||
if (((lbCurSel 758024) != -1) && ((lbCurSel 758029) != -1)) then {
|
||||
[_listselect, ((_logi_destinations select lbCurSel 758024) select 1), [parseNumber ctrlText 758025,parseNumber ctrlText 758026,parseNumber ctrlText 758027], ((_logi_destinations select lbCurSel 758029) select 1), [parseNumber ctrlText 758030,parseNumber ctrlText 758031,parseNumber ctrlText 758032], clientOwner] remoteExec ["save_logi_remote_call",2];
|
||||
waitUntil {sleep 0.5; (!(_selectedGroup isEqualTo (KP_liberation_logistics select _listselect))) || (logiError == 1)};
|
||||
} else {
|
||||
hint localize "STR_LOGISTIC_SAVE_ERROR";
|
||||
};
|
||||
};
|
||||
|
||||
if (convoyStandby == 1) then {
|
||||
convoyStandby = 0;
|
||||
[_listselect, clientOwner] remoteExec ["abort_logi_remote_call",2];
|
||||
waitUntil {sleep 0.5; (!(_selectedGroup isEqualTo (KP_liberation_logistics select _listselect))) || (logiError == 1)};
|
||||
};
|
||||
|
||||
logiError = 0;
|
||||
_tempvariable = nil;
|
||||
ctrlEnable [75803, true];
|
||||
|
||||
if (_logi_count != (count KP_liberation_logistics)) then {
|
||||
_logi_count = (count KP_liberation_logistics);
|
||||
lbClear 75802;
|
||||
{
|
||||
lbAdd [75802, (_x select 0)];
|
||||
} forEach KP_liberation_logistics;
|
||||
};
|
||||
|
||||
if ((_logi_count > 0) && (lbCurSel 75802 == -1)) then {
|
||||
lbSetCurSel [75802,0];
|
||||
};
|
||||
|
||||
_listselect = (lbCurSel 75802);
|
||||
|
||||
if ((_listselect != -1) && (_logi_count > 0)) then {
|
||||
{ctrlShow [_x, true]} forEach _detailControls;
|
||||
|
||||
_selectedGroup = +(KP_liberation_logistics select _listselect);
|
||||
|
||||
if ((_selectedGroup select 7) == 0) then {
|
||||
ctrlEnable [758021, true];
|
||||
|
||||
if ((_selectedGroup select 1) <= 0) then {
|
||||
ctrlEnable [75804, true];
|
||||
} else {
|
||||
ctrlEnable [758022, true];
|
||||
ctrlEnable [758024, true];
|
||||
ctrlEnable [758025, true];
|
||||
ctrlEnable [758026, true];
|
||||
ctrlEnable [758027, true];
|
||||
ctrlEnable [758029, true];
|
||||
ctrlEnable [758030, true];
|
||||
ctrlEnable [758031, true];
|
||||
ctrlEnable [758032, true];
|
||||
ctrlEnable [758080, true];
|
||||
};
|
||||
};
|
||||
|
||||
ctrlSetText [75805, (_selectedGroup select 0)];
|
||||
|
||||
switch ((_selectedGroup select 7)) do {
|
||||
case 0: {ctrlSetText[758011, "-"]; ctrlSetText[75807, localize "STR_LOGISTIC_STANDBY"];};
|
||||
case 1: {ctrlSetText[758011, "B"]; ctrlSetText[75807, localize "STR_LOGISTIC_LOADING"]; ctrlEnable [758081, true]; "spawn_marker" setMarkerPosLocal (_selectedGroup select 2); _mapdisplay ctrlMapAnimAdd [0.5, 0.2,(_selectedGroup select 2)]; ctrlMapAnimCommit _mapdisplay;};
|
||||
case 2: {ctrlSetText[758011, "B"]; ctrlSetText[75807, localize "STR_LOGISTIC_TRAVEL"]; ctrlEnable [758081, true];};
|
||||
case 3: {ctrlSetText[758011, "A"]; ctrlSetText[75807, localize "STR_LOGISTIC_LOADING"]; ctrlEnable [758081, true]; "spawn_marker" setMarkerPosLocal (_selectedGroup select 3); _mapdisplay ctrlMapAnimAdd [0.5, 0.2,(_selectedGroup select 3)]; ctrlMapAnimCommit _mapdisplay;};
|
||||
case 4: {ctrlSetText[758011, "A"]; ctrlSetText[75807, localize "STR_LOGISTIC_TRAVEL"]; ctrlEnable [758081, true];};
|
||||
case 5: {ctrlSetText[758011, "A"]; ctrlSetText[75807, localize "STR_LOGISTIC_ABORT"];};
|
||||
case 6: {ctrlSetText[758011, "B"]; ctrlSetText[75807, localize "STR_LOGISTIC_ABORT"];};
|
||||
};
|
||||
|
||||
((findDisplay 75802) displayCtrl 75809) ctrlSetTextColor [1,1,1,1];
|
||||
if ((_selectedGroup select 8) != -1) then {
|
||||
switch (_selectedGroup select 9) do {
|
||||
case 2: {((findDisplay 75802) displayCtrl 75809) ctrlSetTextColor [0.9,0,0,1]; ctrlSetText[75809, localize "STR_LOGISTIC_NOSPACE"];};
|
||||
case 3: {((findDisplay 75802) displayCtrl 75809) ctrlSetTextColor [0.9,0,0,1]; ctrlSetText[75809, localize "STR_LOGISTIC_NORESSOURCES"];};
|
||||
default {ctrlSetText[75809,(format [localize "STR_PRODUCTION_MINUTES",(_selectedGroup select 8)])];};
|
||||
};
|
||||
} else {
|
||||
ctrlSetText[75809, "-"];
|
||||
};
|
||||
|
||||
ctrlSetText [758014, (str (_selectedGroup select 1))];
|
||||
ctrlSetText [758016, (str ((_selectedGroup select 6) select 0))];
|
||||
ctrlSetText [758018, (str ((_selectedGroup select 6) select 1))];
|
||||
ctrlSetText [758020, (str ((_selectedGroup select 6) select 2))];
|
||||
|
||||
lbClear 758024;
|
||||
lbClear 758029;
|
||||
{
|
||||
lbAdd [758024, format ["%1 (%2/%3/%4)",(_x select 0), (_x select 2), (_x select 3), (_x select 4)]];
|
||||
lbAdd [758029, format ["%1 (%2/%3/%4)",(_x select 0), (_x select 2), (_x select 3), (_x select 4)]];
|
||||
} forEach _logi_destinations;
|
||||
|
||||
if (!((_selectedGroup select 2) isEqualTo [0,0,0])) then {
|
||||
ctrlShow [758024,false];
|
||||
ctrlShow [758033,true];
|
||||
{
|
||||
// Why the hell does "if ((_selectedGroup select 2) isEqualTo (_x select 1)) ..." return false? -.-
|
||||
if (((_selectedGroup select 2) distance2D (_x select 1) < 10)) exitWith {ctrlSetText [758033, _x select 0];};
|
||||
} forEach _logi_destinations;
|
||||
} else {
|
||||
ctrlShow [758024,true];
|
||||
ctrlShow [758033,false];
|
||||
};
|
||||
|
||||
if (!((_selectedGroup select 3) isEqualTo [0,0,0])) then {
|
||||
ctrlShow [758029,false];
|
||||
ctrlShow [758034,true];
|
||||
{
|
||||
if (((_selectedGroup select 3) distance2D (_x select 1) < 10)) exitWith {ctrlSetText [758034, _x select 0];};
|
||||
} forEach _logi_destinations;
|
||||
} else {
|
||||
ctrlShow [758029,true];
|
||||
ctrlShow [758034,false];
|
||||
};
|
||||
|
||||
ctrlSetText [758025, (str ((_selectedGroup select 4) select 0))];
|
||||
ctrlSetText [758026, (str ((_selectedGroup select 4) select 1))];
|
||||
ctrlSetText [758027, (str ((_selectedGroup select 4) select 2))];
|
||||
|
||||
ctrlSetText [758030, (str ((_selectedGroup select 5) select 0))];
|
||||
ctrlSetText [758031, (str ((_selectedGroup select 5) select 1))];
|
||||
ctrlSetText [758032, (str ((_selectedGroup select 5) select 2))];
|
||||
|
||||
} else {
|
||||
{ctrlShow [_x, false]} forEach _detailControls;
|
||||
_selectedGroup = [];
|
||||
};
|
||||
|
||||
waitUntil {
|
||||
!dialog
|
||||
|| !(alive player)
|
||||
|| (lbCurSel 75802) != _listselect
|
||||
|| addLogiGroup != 0
|
||||
|| deleteLogiGroup != 0
|
||||
|| buyLogiTruck != 0
|
||||
|| sellLogiTruck != 0
|
||||
|| saveConvoySettings != 0
|
||||
|| convoyStandby != 0
|
||||
};
|
||||
};
|
||||
|
||||
"spawn_marker" setMarkerPosLocal markers_reset;
|
||||
@@ -0,0 +1,202 @@
|
||||
waitUntil {!isNil "GRLIB_permissions"};
|
||||
|
||||
private _players_array = [];
|
||||
private _uids_array = ["Default"];
|
||||
private _dialog = createDialog "liberation_permissions";
|
||||
permission_playerid = -1;
|
||||
permission_toset = -1;
|
||||
save_changes = 0;
|
||||
|
||||
color_authorized = [0,0.9,0,1];
|
||||
color_denied = [0.9,0,0,1];
|
||||
fontsize = 0.017 * safezoneH;
|
||||
|
||||
private _modify_permissions = +GRLIB_permissions;
|
||||
|
||||
disableSerialization;
|
||||
|
||||
waitUntil { dialog };
|
||||
|
||||
|
||||
permission_create_activetext = compileFinal '
|
||||
|
||||
params ["_idx", "_column", "_permission", "_text", "_tooltip"];
|
||||
|
||||
private _control = (findDisplay 5118) ctrlCreate ["RscActiveText", ((10 * _idx) + 111) + _column, (findDisplay 5118) displayCtrl 9969];
|
||||
_control ctrlSetPosition [0.072 * _column * safeZoneW, (_idx * 0.025) * safezoneH, 0.072 * safeZoneW, 0.025 * safezoneH];
|
||||
_control ctrlSetText _text;
|
||||
_control ctrlSetFontHeight fontsize;
|
||||
_control ctrlSetTooltip _tooltip;
|
||||
buttonSetAction [((10 * _idx) + 111) + _column, format ["permission_playerid = %1; permission_toset = %2;", _idx, _permission]];
|
||||
_control ctrlSetTextColor color_denied;
|
||||
_control ctrlSetActiveColor color_denied;
|
||||
_control ctrlCommit 0;
|
||||
|
||||
';
|
||||
|
||||
|
||||
|
||||
_players_array pushback ["Default", localize "STR_DEFAULT", 0];
|
||||
private _idx = 2;
|
||||
|
||||
{
|
||||
if (!((name _x) in ["HC1", "HC2", "HC3"])) then {
|
||||
private _nextplayer = _x;
|
||||
|
||||
private _displayname = "";
|
||||
if(count (squadParams _nextplayer) != 0) then {
|
||||
_displayname = "[" + ((squadParams _nextplayer select 0) select 0) + "] ";
|
||||
};
|
||||
_displayname = _displayname + name _nextplayer;
|
||||
|
||||
_players_array pushback [getPlayerUID _nextplayer, _displayname, _idx];
|
||||
_uids_array pushBack getPlayerUID _nextplayer;
|
||||
|
||||
_idx = _idx + 1;
|
||||
};
|
||||
} foreach allPlayers;
|
||||
|
||||
_idx = _idx + 1;
|
||||
|
||||
{
|
||||
if !((_x select 0) in _uids_array) then {
|
||||
_players_array pushBack [_x select 0, _x select 1, _idx];
|
||||
_idx = _idx + 1;
|
||||
}
|
||||
} forEach _modify_permissions;
|
||||
|
||||
{
|
||||
private _nextplayer = _x;
|
||||
private _idx = _nextplayer select 2;
|
||||
|
||||
if (_idx % 2 == 0) then {
|
||||
|
||||
private _control = (findDisplay 5118) ctrlCreate ["RscBackground", -1, (findDisplay 5118) displayCtrl 9969];
|
||||
_control ctrlSetPosition [0, (_idx * 0.025) * safezoneH, 0.595 * safeZoneW, 0.025 * safezoneH];
|
||||
_control ctrlSetBackgroundColor [0.75,1,0.75,0.12];
|
||||
_control ctrlCommit 0;
|
||||
};
|
||||
|
||||
private _control = (findDisplay 5118) ctrlCreate ["RscText", (10 * _idx), (findDisplay 5118) displayCtrl 9969];
|
||||
_control ctrlSetPosition [0, (_idx * 0.025) * safezoneH, 0.072 * safeZoneW, 0.025 * safezoneH];
|
||||
_control ctrlSetText (_nextplayer select 1);
|
||||
_control ctrlSetFontHeight fontsize;
|
||||
_control ctrlCommit 0;
|
||||
|
||||
[_idx, 1, 0, localize "STR_PERMISSIONS_LIGHT", localize "STR_PERMISSIONS_TOOLTIP_LIGHT"] call permission_create_activetext;
|
||||
[_idx, 2, 1, localize "STR_PERMISSIONS_ARMORED", localize "STR_PERMISSIONS_TOOLTIP_ARMORED"] call permission_create_activetext;
|
||||
[_idx, 3, 2, localize "STR_PERMISSIONS_AIR", localize "STR_PERMISSIONS_TOOLTIP_AIR"] call permission_create_activetext;
|
||||
[_idx, 4, 3, localize "STR_PERMISSIONS_CONSTRUCTION", localize "STR_PERMISSIONS_TOOLTIP_CONSTRUCTION"] call permission_create_activetext;
|
||||
[_idx, 5, 4, localize "STR_PERMISSIONS_RECYCLING", localize "STR_PERMISSIONS_TOOLTIP_RECYCLING"] call permission_create_activetext;
|
||||
[_idx, 6, 5, localize "STR_PERMISSIONS_MISC", localize "STR_PERMISSIONS_TOOLTIP_MISC"] call permission_create_activetext;
|
||||
|
||||
_control = (findDisplay 5118) ctrlCreate ["RscButton", ((10 * _idx) + 111) + 7, (findDisplay 5118) displayCtrl 9969];
|
||||
_control ctrlSetPosition [((0.075 * 7) - 0.02) * safeZoneW, ((_idx * 0.025) * safezoneH) + 0.0025, (0.035 * safeZoneW), 0.022 * safezoneH];
|
||||
_control ctrlSetText (localize "STR_PERMISSIONS_ALL");
|
||||
_control ctrlSetFontHeight fontsize;
|
||||
_control ctrlSetTooltip (localize "STR_PERMISSIONS_TOOLTIP_ALL");
|
||||
buttonSetAction [ ((10 * _idx) + 111) + 7, format ["permission_playerid = %1; permission_toset = 666;", _idx]];
|
||||
_control ctrlCommit 0;
|
||||
|
||||
_control = (findDisplay 5118) ctrlCreate ["RscButton", ((10 * _idx) + 111) + 8, (findDisplay 5118) displayCtrl 9969];
|
||||
_control ctrlSetPosition [((0.075 * 7) + 0.02) * safeZoneW, (_idx * 0.025) * safezoneH + 0.0025, 0.035 * safeZoneW, 0.022 * safezoneH];
|
||||
_control ctrlSetText (localize "STR_PERMISSIONS_NONE");
|
||||
_control ctrlSetFontHeight fontsize;
|
||||
_control ctrlSetTooltip (localize "STR_PERMISSIONS_TOOLTIP_NONE");
|
||||
buttonSetAction [((10 * _idx) + 111) + 8, format ["permission_playerid = %1; permission_toset = 999;", _idx]];
|
||||
_control ctrlCommit 0;
|
||||
|
||||
} foreach _players_array;
|
||||
|
||||
while {dialog && alive player} do {
|
||||
|
||||
if (permission_playerid != -1 || permission_toset != -1) then {
|
||||
|
||||
private _player_uid = "";
|
||||
private _player_name = "";
|
||||
{
|
||||
if (_x select 2 == permission_playerid) exitWith {_player_uid = _x select 0; _player_name = _x select 1;};
|
||||
} foreach _players_array;
|
||||
|
||||
if (_player_uid != "") then {
|
||||
|
||||
private _player_idx = -1;
|
||||
private _player_uids = [];
|
||||
private _player_permissions = [];
|
||||
{
|
||||
_player_uids pushback (_x select 0);
|
||||
} foreach _modify_permissions;
|
||||
|
||||
_player_idx = _player_uids find _player_uid;
|
||||
|
||||
if (permission_toset == 666) then {
|
||||
_player_permissions = [true, true, true, true, true, true];
|
||||
};
|
||||
if (permission_toset == 999) then {
|
||||
_player_permissions = [false, false, false, false, false, false];
|
||||
};
|
||||
|
||||
if (_player_idx == -1) then {
|
||||
|
||||
if (permission_toset != 666 && permission_toset != 999) then {
|
||||
_player_permissions = [false, false, false, false, false, false];
|
||||
_player_permissions set [permission_toset, true];
|
||||
};
|
||||
|
||||
_modify_permissions pushback [_player_uid, _player_name, _player_permissions];
|
||||
} else {
|
||||
|
||||
if (permission_toset != 666 && permission_toset != 999) then {
|
||||
|
||||
_player_permissions = (_modify_permissions select _player_idx) select 2;
|
||||
|
||||
private _idx = 0;
|
||||
{
|
||||
if (permission_toset == _idx) exitWith {
|
||||
if (_player_permissions select _idx) then {
|
||||
_player_permissions set [_idx, false];
|
||||
} else {
|
||||
_player_permissions set [_idx, true];
|
||||
};
|
||||
};
|
||||
_idx = _idx + 1;
|
||||
} foreach _player_permissions;
|
||||
};
|
||||
_modify_permissions set [_player_idx, [_player_uid, _player_name, _player_permissions]];
|
||||
};
|
||||
};
|
||||
|
||||
permission_playerid = -1;
|
||||
permission_toset = -1;
|
||||
};
|
||||
|
||||
{
|
||||
private _nextplayer = _x;
|
||||
{
|
||||
if (_nextplayer select 0 == _x select 0) exitWith {
|
||||
private _idx = _nextplayer select 2;
|
||||
private _player_permissions = _x select 2;
|
||||
|
||||
{
|
||||
private _control = ((findDisplay 5118) displayCtrl ((10 * _idx) + _x + 111));
|
||||
if (_player_permissions select (_x - 1)) then {
|
||||
_control ctrlSetTextColor color_authorized;
|
||||
_control ctrlSetActiveColor color_authorized;
|
||||
} else {
|
||||
_control ctrlSetTextColor color_denied;
|
||||
_control ctrlSetActiveColor color_denied;
|
||||
};
|
||||
} foreach [1, 2, 3, 4, 5, 6];
|
||||
};
|
||||
} foreach _modify_permissions;
|
||||
|
||||
} foreach _players_array;
|
||||
|
||||
if (save_changes == 1) then {
|
||||
GRLIB_permissions = +_modify_permissions;
|
||||
publicVariable "GRLIB_permissions";
|
||||
closeDialog 0;
|
||||
};
|
||||
|
||||
waitUntil {!dialog || !(alive player) || permission_playerid != -1 || permission_toset != -1 || save_changes != 0};
|
||||
};
|
||||
@@ -0,0 +1,136 @@
|
||||
private ["_dialog", "_color_positive", "_color_neutral", "_color_negative", "_color_actual", "_sectorType", "_storage", "_crateCount", "_crateMax", "_producing", "_storagespace", "_productiontime", "_saveChanges", "_listselect", "_listcolor", "_selectedSector", "_mapdisplay", "_supplyValue", "_ammoValue", "_fuelValue"];
|
||||
|
||||
_dialog = createDialog "liberation_production";
|
||||
saveSectorSetting = 0;
|
||||
new_production = 0;
|
||||
_color_positive = [0,0.9,0,1];
|
||||
_color_neutral = [1,1,1,1];
|
||||
_color_negative = [0.9,0,0,1];
|
||||
_color_actual = _color_neutral;
|
||||
_listselect = -1;
|
||||
_listcolor = [1,1,1,1];
|
||||
_selectedSector = [];
|
||||
|
||||
disableSerialization;
|
||||
|
||||
waitUntil {dialog};
|
||||
|
||||
_mapdisplay = ((findDisplay 75801) displayCtrl 758016);
|
||||
|
||||
lbClear 75802;
|
||||
{
|
||||
lbAdd [75802, (markerText (_x select 1))];
|
||||
} forEach KP_liberation_production;
|
||||
|
||||
ctrlMapAnimClear _mapdisplay;
|
||||
|
||||
while {dialog && (alive player)} do {
|
||||
if (lbCurSel 75802 == -1) then {
|
||||
lbSetCurSel [75802,0];
|
||||
};
|
||||
|
||||
if (saveSectorSetting == 1) then {
|
||||
saveSectorSetting = 0;
|
||||
[(_selectedSector select 1), new_production] remoteExec ["change_prod_remote_call",2];
|
||||
waitUntil {sleep 0.5; (!(_selectedSector isEqualTo (KP_liberation_production select _listselect)))};
|
||||
};
|
||||
|
||||
_listselect = -1;
|
||||
|
||||
{
|
||||
_listselect = _listselect + 1;
|
||||
|
||||
if ((count (_x select 3)) > 0) then {
|
||||
switch (_x select 7) do {
|
||||
case 1: {_listcolor = [0.75,0,0,1];};
|
||||
case 2: {_listcolor = [0.75,0.75,0,1];};
|
||||
case 3: {_listcolor = [1,1,1,1];};
|
||||
default {_listcolor = [0,0.75,0,1];};
|
||||
};
|
||||
} else {
|
||||
_listcolor = [0.6,0.6,0.6,0.8];
|
||||
};
|
||||
|
||||
lbSetColor [75802, _listselect, _listcolor];
|
||||
} forEach KP_liberation_production;
|
||||
|
||||
_listselect = (lbCurSel 75802);
|
||||
waitUntil {_listselect == (lbCurSel 75802)};
|
||||
_selectedSector = +(KP_liberation_production select _listselect);
|
||||
|
||||
ctrlSetText [75803,(_selectedSector select 0)];
|
||||
|
||||
if ((_selectedSector select 2) == 1) then {_sectorType = localize "STR_PRODUCTION_FACTORY";} else {_sectorType = localize "STR_PRODUCTION_CITY";};
|
||||
ctrlSetText [75804, _sectorType];
|
||||
|
||||
if ((count (_selectedSector select 3)) > 0) then {
|
||||
_storage = ((nearestObjects [((_selectedSector select 3) select 0), [KP_liberation_small_storage_building], 25]) select 0);
|
||||
_crateCount = count (attachedObjects _storage);
|
||||
_crateMax = count (KP_liberation_small_storage_positions);
|
||||
|
||||
if (_crateCount >= _crateMax) then {
|
||||
_color_actual = _color_negative;
|
||||
};
|
||||
|
||||
_storagespace = format ["%1 / %2",_crateCount,_crateMax];
|
||||
_productiontime = format [localize "STR_PRODUCTION_MINUTES",(_selectedSector select 8)];
|
||||
|
||||
switch (_selectedSector select 7) do {
|
||||
case 1: {_producing = localize "STR_AMMO";};
|
||||
case 2: {_producing = localize "STR_FUEL";};
|
||||
case 3: {_producing = localize "STR_PRODUCTION_NOTHING"; _productiontime = localize "STR_PRODUCTION_NOTIMER";};
|
||||
default {_producing = localize "STR_MANPOWER";};
|
||||
};
|
||||
|
||||
ctrlSetText [75805, _producing];
|
||||
if ((_selectedSector select 7) == 3) then {
|
||||
((findDisplay 75801) displayCtrl 75805) ctrlSetTextColor _color_negative;
|
||||
((findDisplay 75801) displayCtrl 75807) ctrlSetTextColor _color_negative;
|
||||
} else {
|
||||
((findDisplay 75801) displayCtrl 75805) ctrlSetTextColor _color_neutral;
|
||||
((findDisplay 75801) displayCtrl 75807) ctrlSetTextColor _color_neutral;
|
||||
};
|
||||
ctrlSetText [75806, _storagespace];
|
||||
((findDisplay 75801) displayCtrl 75806) ctrlSetTextColor _color_actual;
|
||||
ctrlSetText [75807, _productiontime];
|
||||
_color_actual = _color_neutral;
|
||||
} else {
|
||||
_producing = localize "STR_PRODUCTION_NOTHING";
|
||||
_storagespace = localize "STR_PRODUCTION_NOSTORAGE";
|
||||
_productiontime = localize "STR_PRODUCTION_NOTIMER";
|
||||
ctrlSetText [75805, _producing];
|
||||
((findDisplay 75801) displayCtrl 75805) ctrlSetTextColor _color_negative;
|
||||
ctrlSetText [75806, _storagespace];
|
||||
((findDisplay 75801) displayCtrl 75806) ctrlSetTextColor _color_negative;
|
||||
ctrlSetText [75807, _productiontime];
|
||||
((findDisplay 75801) displayCtrl 75807) ctrlSetTextColor _color_negative;
|
||||
};
|
||||
|
||||
if (_selectedSector select 4) then {_color_actual = _color_positive;} else {_color_actual = _color_negative;};
|
||||
((findDisplay 75801) displayCtrl 75808) ctrlSetTextColor _color_actual;
|
||||
if (_selectedSector select 5) then {_color_actual = _color_positive;} else {_color_actual = _color_negative;};
|
||||
((findDisplay 75801) displayCtrl 75809) ctrlSetTextColor _color_actual;
|
||||
if (_selectedSector select 6) then {_color_actual = _color_positive;} else {_color_actual = _color_negative;};
|
||||
((findDisplay 75801) displayCtrl 758010) ctrlSetTextColor _color_actual;
|
||||
_color_actual = _color_neutral;
|
||||
|
||||
_supplyValue = ceil ((_selectedSector select 9) / 100);
|
||||
_ammoValue = ceil ((_selectedSector select 10) / 100);
|
||||
_fuelValue = ceil ((_selectedSector select 11) / 100);
|
||||
|
||||
if (_supplyValue == 1) then {_supplyValue = format [localize "STR_PRODUCTION_CRATE", _supplyValue];} else {_supplyValue = format [localize "STR_PRODUCTION_CRATES", _supplyValue];};
|
||||
if (_ammoValue == 1) then {_ammoValue = format [localize "STR_PRODUCTION_CRATE", _ammoValue];} else {_ammoValue = format [localize "STR_PRODUCTION_CRATES", _ammoValue];};
|
||||
if (_fuelValue == 1) then {_fuelValue = format [localize "STR_PRODUCTION_CRATE", _fuelValue];} else {_fuelValue = format [localize "STR_PRODUCTION_CRATES", _fuelValue];};
|
||||
|
||||
ctrlSetText [758011, (str (_selectedSector select 9)) + " (" + _supplyValue + ")"];
|
||||
ctrlSetText [758012, (str (_selectedSector select 10)) + " (" + _ammoValue + ")"];
|
||||
ctrlSetText [758013, (str (_selectedSector select 11)) + " (" + _fuelValue + ")"];
|
||||
|
||||
"spawn_marker" setMarkerPosLocal (markerPos (_selectedSector select 1));
|
||||
_mapdisplay ctrlMapAnimAdd [0.5, 0.2,(markerPos (_selectedSector select 1))];
|
||||
ctrlMapAnimCommit _mapdisplay;
|
||||
|
||||
waitUntil {!dialog || !(alive player) || (lbCurSel 75802) != _listselect || saveSectorSetting != 0};
|
||||
};
|
||||
|
||||
"spawn_marker" setMarkerPosLocal markers_reset;
|
||||
106
kp_liberation.brf_sumava/scripts/client/init_client.sqf
Normal file
106
kp_liberation.brf_sumava/scripts/client/init_client.sqf
Normal file
@@ -0,0 +1,106 @@
|
||||
[] call compileFinal preprocessFileLineNumbers "scripts\client\misc\init_markers.sqf";
|
||||
switch (KP_liberation_arsenal) do {
|
||||
case 1: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\custom.sqf";};
|
||||
case 2: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\rhsusaf.sqf";};
|
||||
case 3: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\3cbBAF.sqf";};
|
||||
case 4: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\gm_west.sqf";};
|
||||
case 5: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\gm_east.sqf";};
|
||||
case 6: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\csat.sqf";};
|
||||
case 7: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\unsung.sqf";};
|
||||
case 8: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\sfp.sqf";};
|
||||
case 9: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\bwmod.sqf";};
|
||||
case 10: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\vanilla_nato_mtp.sqf";};
|
||||
case 11: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\vanilla_nato_tropic.sqf";};
|
||||
case 12: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\vanilla_nato_wdl.sqf";};
|
||||
case 13: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\vanilla_csat_hex.sqf";};
|
||||
case 14: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\vanilla_csat_ghex.sqf";};
|
||||
case 15: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\vanilla_aaf.sqf";};
|
||||
case 16: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\vanilla_ldf.sqf";};
|
||||
default {GRLIB_arsenal_weapons = [];GRLIB_arsenal_magazines = [];GRLIB_arsenal_items = [];GRLIB_arsenal_backpacks = [];};
|
||||
};
|
||||
|
||||
if (typeOf player == "VirtualSpectator_F") exitWith {
|
||||
execVM "scripts\client\markers\empty_vehicles_marker.sqf";
|
||||
execVM "scripts\client\markers\fob_markers.sqf";
|
||||
execVM "scripts\client\markers\group_icons.sqf";
|
||||
execVM "scripts\client\markers\hostile_groups.sqf";
|
||||
execVM "scripts\client\markers\sector_manager.sqf";
|
||||
execVM "scripts\client\markers\spot_timer.sqf";
|
||||
execVM "scripts\client\misc\synchronise_vars.sqf";
|
||||
execVM "scripts\client\ui\ui_manager.sqf";
|
||||
};
|
||||
|
||||
// This causes the script error with not defined variable _display in File A3\functions_f_bootcamp\Inventory\fn_arsenal.sqf [BIS_fnc_arsenal], line 2122
|
||||
// ["Preload"] call BIS_fnc_arsenal;
|
||||
spawn_camera = compileFinal preprocessFileLineNumbers "scripts\client\spawn\spawn_camera.sqf";
|
||||
cinematic_camera = compileFinal preprocessFileLineNumbers "scripts\client\ui\cinematic_camera.sqf";
|
||||
write_credit_line = compileFinal preprocessFileLineNumbers "scripts\client\ui\write_credit_line.sqf";
|
||||
do_load_box = compileFinal preprocessFileLineNumbers "scripts\client\ammoboxes\do_load_box.sqf";
|
||||
kp_fuel_consumption = compileFinal preprocessFileLineNumbers "scripts\client\misc\kp_fuel_consumption.sqf";
|
||||
kp_vehicle_permissions = compileFinal preprocessFileLineNumbers "scripts\client\misc\vehicle_permissions.sqf";
|
||||
|
||||
execVM "scripts\client\actions\intel_manager.sqf";
|
||||
execVM "scripts\client\actions\recycle_manager.sqf";
|
||||
execVM "scripts\client\actions\unflip_manager.sqf";
|
||||
execVM "scripts\client\ammoboxes\ammobox_action_manager.sqf";
|
||||
execVM "scripts\client\build\build_overlay.sqf";
|
||||
execVM "scripts\client\build\do_build.sqf";
|
||||
execVM "scripts\client\commander\enforce_whitelist.sqf";
|
||||
if (KP_liberation_mapmarkers) then {execVM "scripts\client\markers\empty_vehicles_marker.sqf";};
|
||||
execVM "scripts\client\markers\fob_markers.sqf";
|
||||
if (!KP_liberation_high_command && KP_liberation_mapmarkers) then {execVM "scripts\client\markers\group_icons.sqf";};
|
||||
execVM "scripts\client\markers\hostile_groups.sqf";
|
||||
if (KP_liberation_mapmarkers) then {execVM "scripts\client\markers\huron_marker.sqf";} else {deleteMarkerLocal "huronmarker"};
|
||||
execVM "scripts\client\markers\sector_manager.sqf";
|
||||
execVM "scripts\client\markers\spot_timer.sqf";
|
||||
execVM "scripts\client\misc\broadcast_squad_colors.sqf";
|
||||
execVM "scripts\client\misc\init_arsenal.sqf";
|
||||
execVM "scripts\client\misc\permissions_warning.sqf";
|
||||
if (!KP_liberation_ace) then {execVM "scripts\client\misc\resupply_manager.sqf";};
|
||||
execVM "scripts\client\misc\secondary_jip.sqf";
|
||||
execVM "scripts\client\misc\synchronise_vars.sqf";
|
||||
execVM "scripts\client\misc\synchronise_eco.sqf";
|
||||
execVM "scripts\client\misc\playerNamespace.sqf";
|
||||
execVM "scripts\client\spawn\redeploy_manager.sqf";
|
||||
execVM "scripts\client\ui\ui_manager.sqf";
|
||||
execVM "scripts\client\ui\tutorial_manager.sqf";
|
||||
execVM "scripts\client\markers\update_production_sites.sqf";
|
||||
|
||||
player addMPEventHandler ["MPKilled", {_this spawn kill_manager;}];
|
||||
player addEventHandler ["GetInMan", {[_this select 2] spawn kp_fuel_consumption;}];
|
||||
player addEventHandler ["GetInMan", {[_this select 2] call KPLIB_fnc_setVehiclesSeized;}];
|
||||
player addEventHandler ["GetInMan", {[_this select 2] call KPLIB_fnc_setVehicleCaptured;}];
|
||||
player addEventHandler ["GetInMan", {[_this select 2] call kp_vehicle_permissions;}];
|
||||
player addEventHandler ["SeatSwitchedMan", {[_this select 2] call kp_vehicle_permissions;}];
|
||||
player addEventHandler ["HandleRating", {if ((_this select 1) < 0) then {0};}];
|
||||
|
||||
// Disable stamina, if selected in parameter
|
||||
if (!GRLIB_fatigue) then {
|
||||
player enableStamina false;
|
||||
player addEventHandler ["Respawn", {player enableStamina false;}];
|
||||
};
|
||||
|
||||
// Reduce aim precision coefficient, if selected in parameter
|
||||
if (!KPLIB_sway) then {
|
||||
player setCustomAimCoef 0.1;
|
||||
player addEventHandler ["Respawn", {player setCustomAimCoef 0.1;}];
|
||||
};
|
||||
|
||||
execVM "scripts\client\ui\intro.sqf";
|
||||
|
||||
[player] joinSilent (createGroup [GRLIB_side_friendly, true]);
|
||||
|
||||
// Commander init
|
||||
if (player isEqualTo ([] call KPLIB_fnc_getCommander)) then {
|
||||
// Start tutorial
|
||||
if (KP_liberation_tutorial) then {
|
||||
[] call KPLIB_fnc_tutorial;
|
||||
};
|
||||
// Request Zeus if enabled
|
||||
if (KP_liberation_commander_zeus) then {
|
||||
[] spawn {
|
||||
sleep 5;
|
||||
[] call KPLIB_fnc_requestZeus;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,52 @@
|
||||
private [ "_vehmarkers", "_markedveh", "_cfg", "_vehtomark", "_supporttomark", "_marker" ];
|
||||
|
||||
_vehmarkers = [];
|
||||
_markedveh = [];
|
||||
_cfg = configFile >> "cfgVehicles";
|
||||
_vehtomark = [];
|
||||
|
||||
_support_to_skip = [
|
||||
KP_liberation_recycle_building,
|
||||
KP_liberation_air_vehicle_building,
|
||||
"B_Slingload_01_Repair_F",
|
||||
"B_Slingload_01_Fuel_F",
|
||||
"B_Slingload_01_Ammo_F"
|
||||
];
|
||||
|
||||
{
|
||||
_vehtomark append _x;
|
||||
} forEach [KPLIB_b_light_classes, KPLIB_b_heavy_classes, KPLIB_b_air_classes, KPLIB_b_support_classes];
|
||||
|
||||
_vehtomark = _vehtomark - _support_to_skip;
|
||||
|
||||
while { true } do {
|
||||
|
||||
_markedveh = [];
|
||||
{
|
||||
if (alive _x && (toLower (typeof _x)) in _vehtomark && (count (crew _x)) == 0 && (_x distance2d startbase) > 500) then {
|
||||
_markedveh pushback _x;
|
||||
};
|
||||
} foreach vehicles;
|
||||
|
||||
if ( count _markedveh != count _vehmarkers ) then {
|
||||
{ deleteMarkerLocal _x; } foreach _vehmarkers;
|
||||
_vehmarkers = [];
|
||||
|
||||
{
|
||||
_marker = createMarkerLocal [ format [ "markedveh%1" ,_x], markers_reset ];
|
||||
_marker setMarkerColorLocal "ColorKhaki";
|
||||
_marker setMarkerTypeLocal "mil_dot";
|
||||
_marker setMarkerSizeLocal [ 0.75, 0.75 ];
|
||||
_vehmarkers pushback _marker;
|
||||
} foreach _markedveh;
|
||||
};
|
||||
|
||||
{
|
||||
_marker = _vehmarkers select (_markedveh find _x);
|
||||
_marker setMarkerPosLocal getpos _x;
|
||||
_marker setMarkerTextLocal (getText (_cfg >> typeOf _x >> "displayName"));
|
||||
|
||||
} foreach _markedveh;
|
||||
|
||||
sleep 5;
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "GRLIB_all_fobs"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
uiSleep 3;
|
||||
|
||||
private _markers = [];
|
||||
private _markers_mobilespawns = [];
|
||||
|
||||
while {true} do {
|
||||
if (count _markers != count GRLIB_all_fobs) then {
|
||||
{deleteMarkerLocal _x;} forEach _markers;
|
||||
_markers = [];
|
||||
|
||||
for "_idx" from 0 to ((count GRLIB_all_fobs) - 1) do {
|
||||
private _marker = createMarkerLocal [format ["fobmarker%1", _idx], markers_reset];
|
||||
_marker setMarkerTypeLocal "b_hq";
|
||||
_marker setMarkerSizeLocal [1.5, 1.5];
|
||||
_marker setMarkerPosLocal (GRLIB_all_fobs select _idx);
|
||||
_marker setMarkerTextLocal format ["FOB %1",military_alphabet select _idx];
|
||||
_marker setMarkerColorLocal "ColorYellow";
|
||||
_markers pushback _marker;
|
||||
};
|
||||
};
|
||||
|
||||
if (KP_liberation_mobilerespawn) then {
|
||||
private _respawn_trucks = [] call KPLIB_fnc_getMobileRespawns;
|
||||
|
||||
if (count _markers_mobilespawns != count _respawn_trucks) then {
|
||||
{deleteMarkerLocal _x;} forEach _markers_mobilespawns;
|
||||
_markers_mobilespawns = [];
|
||||
|
||||
for "_idx" from 0 to ((count _respawn_trucks) - 1) do {
|
||||
_marker = createMarkerLocal [format ["mobilespawn%1", _idx], markers_reset];
|
||||
_marker setMarkerTypeLocal "mil_end";
|
||||
_marker setMarkerColorLocal "ColorYellow";
|
||||
_markers_mobilespawns pushback _marker;
|
||||
};
|
||||
};
|
||||
|
||||
if (count _respawn_trucks == count _markers_mobilespawns) then {
|
||||
for "_idx" from 0 to ((count _markers_mobilespawns) - 1) do {
|
||||
(_markers_mobilespawns select _idx) setMarkerPosLocal getPos (_respawn_trucks select _idx);
|
||||
(_markers_mobilespawns select _idx) setMarkerTextLocal format ["%1 %2", localize "STR_RESPAWN_TRUCK", mapGridPosition (_respawn_trucks select _idx)];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sleep 5;
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
private [ "_iconed_groups", "_ticks", "_localgroup", "_grouptype", "_groupicon" ];
|
||||
|
||||
_iconed_groups = [];
|
||||
_ticks = 0;
|
||||
|
||||
setGroupIconsVisible [true,false];
|
||||
|
||||
while { true } do {
|
||||
{
|
||||
if ((_x != group player) && ((side _x == GRLIB_side_friendly))) then {
|
||||
if ( (_x in _iconed_groups) && (
|
||||
(count units _x == 0) || (side _x == GRLIB_side_friendly && (((leader _x) distance (markerPos GRLIB_respawn_marker) < 100) || ((leader _x) distance startbase < 500))))) then {
|
||||
clearGroupIcons _x;
|
||||
_iconed_groups = _iconed_groups - [_x];
|
||||
};
|
||||
|
||||
if ( !(_x in _iconed_groups) && (
|
||||
(count units _x > 0) && (side _x == GRLIB_side_friendly && (((leader _x) distance (markerPos GRLIB_respawn_marker) > 100) && ((leader _x) distance startbase > 500))))) then {
|
||||
clearGroupIcons _x;
|
||||
_localgroup = _x;
|
||||
_grouptype = [_localgroup] call KPLIB_fnc_getGroupType;
|
||||
_groupicon = "";
|
||||
switch (_grouptype) do {
|
||||
case "infantry": { _groupicon = "b_inf" };
|
||||
case "light": { _groupicon = "b_motor_inf" };
|
||||
case "heavy": { _groupicon = "b_armor" };
|
||||
case "air": { _groupicon = "b_air" };
|
||||
case "support": { _groupicon = "b_maint" };
|
||||
case "static": { _groupicon = "b_mortar" };
|
||||
case "uav": { _groupicon = "b_uav" };
|
||||
default { };
|
||||
};
|
||||
|
||||
_localgroup addGroupIcon [ _groupicon, [ 0,0 ] ];
|
||||
|
||||
if ( side _localgroup == GRLIB_side_friendly ) then {
|
||||
_groupiconsize = "group_0";
|
||||
_groupsize = (count (units _localgroup));
|
||||
if ( _groupsize >= 2 ) then { _groupiconsize = "group_1" };
|
||||
if ( _groupsize >= 6 ) then { _groupiconsize = "group_2" };
|
||||
if ( _groupsize >= 10 ) then { _groupiconsize = "group_3" };
|
||||
|
||||
_localgroup addGroupIcon [ _groupiconsize, [ 0,0 ] ];
|
||||
};
|
||||
|
||||
_iconed_groups pushback _x;
|
||||
};
|
||||
};
|
||||
} foreach allGroups;
|
||||
|
||||
{
|
||||
_color = [];
|
||||
if ( isplayer leader _x ) then {
|
||||
_color = [0.8,0.8,0,1];
|
||||
} else {
|
||||
_color = [0,0.3,0.8,1];
|
||||
};
|
||||
_x setGroupIconParams [_color,"",1,true];
|
||||
} foreach _iconed_groups;
|
||||
|
||||
_ticks = _ticks + 1;
|
||||
if ( _ticks >= 15 ) then {
|
||||
_ticks = 0;
|
||||
_iconed_groups = [];
|
||||
};
|
||||
|
||||
sleep 4.7;
|
||||
};
|
||||
@@ -0,0 +1,52 @@
|
||||
private ["_kp_markers_array","_kp_markers_start","_kp_markers_change","_kp_markers_pos","_kp_markers_posx","_kp_markers_posy","_kp_markers_name","_kp_markers_color"];
|
||||
|
||||
waitUntil {sleep 0.1; !isNil "save_is_loaded" && {save_is_loaded}};
|
||||
|
||||
_kp_markers_array = [];
|
||||
_kp_markers_start = 0.2;
|
||||
_kp_markers_change = 0.05;
|
||||
|
||||
while {true} do {
|
||||
{deleteMarkerLocal _x;} forEach _kp_markers_array;
|
||||
_kp_markers_array = [];
|
||||
{
|
||||
if ((side _x == GRLIB_side_enemy) && (({!captive _x} count (units _x) ) > 0) && ([(getpos leader _x), GRLIB_side_friendly, GRLIB_radiotower_size] call KPLIB_fnc_getNearestTower != "")) then {
|
||||
_kp_markers_pos = getPosATL leader _x;
|
||||
_kp_markers_posx = floor (_kp_markers_pos select 0);
|
||||
_kp_markers_posx = _kp_markers_posx - (_kp_markers_posx mod 500);
|
||||
_kp_markers_posy = floor (_kp_markers_pos select 1);
|
||||
_kp_markers_posy = _kp_markers_posy - (_kp_markers_posy mod 500);
|
||||
|
||||
// Chernarus Grid Fix
|
||||
if (worldName == "Chernarus") then {
|
||||
_kp_markers_posy = _kp_markers_posy - 140;
|
||||
if ((_kp_markers_posy + 500) < (_kp_markers_pos select 1)) then {
|
||||
_kp_markers_posy = _kp_markers_posy + 500;
|
||||
};
|
||||
};
|
||||
|
||||
// Sahrani Grid Fix
|
||||
if (worldName == "Sara") then {
|
||||
_kp_markers_posy = _kp_markers_posy - 20;
|
||||
if ((_kp_markers_posy + 500) < (_kp_markers_pos select 1)) then {
|
||||
_kp_markers_posy = _kp_markers_posy + 500;
|
||||
};
|
||||
};
|
||||
|
||||
_kp_markers_name = format["kp_marker_grid_%1_%2", _kp_markers_posx, _kp_markers_posy];
|
||||
_kp_markers_color = format["Color%1", side _x];
|
||||
|
||||
if ((markerShape _kp_markers_name) isEqualTo "RECTANGLE") then {
|
||||
_kp_markers_name setMarkerAlphaLocal ((markerAlpha _kp_markers_name) + _kp_markers_change);
|
||||
} else {
|
||||
createMarkerLocal[_kp_markers_name, [_kp_markers_posx + 250, _kp_markers_posy + 250, 0]];
|
||||
_kp_markers_name setMarkerShapeLocal "RECTANGLE";
|
||||
_kp_markers_name setMarkerSizeLocal [250,250];
|
||||
_kp_markers_name setMarkerColorLocal _kp_markers_color;
|
||||
_kp_markers_name setMarkerAlphaLocal (_kp_markers_start + _kp_markers_change);
|
||||
_kp_markers_array pushBack _kp_markers_name;
|
||||
};
|
||||
};
|
||||
} forEach allGroups;
|
||||
uiSleep (60 + (random 60));
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
private [ "_huronlocal" ];
|
||||
|
||||
"huronmarker" setMarkerTextLocal "Potato 01";
|
||||
|
||||
while { true } do {
|
||||
_huronlocal = [] call KPLIB_fnc_potatoScan;
|
||||
if ( !( isNull _huronlocal) ) then {
|
||||
"huronmarker" setmarkerposlocal (getpos _huronlocal);
|
||||
} else {
|
||||
"huronmarker" setmarkerposlocal markers_reset;
|
||||
};
|
||||
sleep 4.9;
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "GRLIB_vehicle_to_military_base_links"};
|
||||
waitUntil {!isNil "blufor_sectors"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
private _vehicle_unlock_markers = [];
|
||||
private _cfg = configFile >> "cfgVehicles";
|
||||
|
||||
{
|
||||
_x params ["_vehicle", "_base"];
|
||||
private _marker = createMarkerLocal [format ["vehicleunlockmarker%1", _base], [(markerpos _base) select 0, ((markerpos _base) select 1) + 125]];
|
||||
_marker setMarkerTextLocal (getText (_cfg >> _vehicle >> "displayName"));
|
||||
_marker setMarkerColorLocal GRLIB_color_enemy;
|
||||
_marker setMarkerTypeLocal "mil_pickup";
|
||||
_vehicle_unlock_markers pushback [_marker, _base];
|
||||
} forEach GRLIB_vehicle_to_military_base_links;
|
||||
|
||||
private _sector_count = -1;
|
||||
|
||||
uiSleep 1;
|
||||
|
||||
while {true} do {
|
||||
waitUntil {
|
||||
uiSleep 1;
|
||||
count blufor_sectors != _sector_count
|
||||
};
|
||||
|
||||
{_x setMarkerColorLocal GRLIB_color_enemy;} forEach (sectors_allSectors - blufor_sectors);
|
||||
{_x setMarkerColorLocal GRLIB_color_friendly;} forEach blufor_sectors;
|
||||
|
||||
{
|
||||
_x params ["_marker", "_base"];
|
||||
_marker setMarkerColorLocal ([GRLIB_color_enemy, GRLIB_color_friendly] select (_base in blufor_sectors));
|
||||
} forEach _vehicle_unlock_markers;
|
||||
_sector_count = count blufor_sectors;
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
createMarkerLocal ["opfor_bg_marker", markers_reset];
|
||||
"opfor_bg_marker" setMarkerTypeLocal "mil_unknown";
|
||||
"opfor_bg_marker" setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
|
||||
createMarkerLocal ["opfor_capture_marker", markers_reset];
|
||||
"opfor_capture_marker" setMarkerTypeLocal "mil_objective";
|
||||
"opfor_capture_marker" setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
|
||||
if ( isNil "sector_timer" ) then { sector_timer = 0 };
|
||||
|
||||
while { true } do {
|
||||
sleep 1;
|
||||
if ( sector_timer > 0 ) then {
|
||||
"opfor_capture_marker" setMarkerTextLocal format ["%1",([sector_timer] call KPLIB_fnc_secondsToTimer)];
|
||||
sector_timer = sector_timer - 1;
|
||||
} else {
|
||||
"opfor_capture_marker" setMarkerTextLocal "VULNERABLE";
|
||||
waitUntil{
|
||||
sleep 1;
|
||||
sector_timer > 0
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "KP_liberation_production_markers"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
private _KP_liberation_production_markers_old = [0];
|
||||
|
||||
while {GRLIB_endgame == 0} do {
|
||||
waitUntil {sleep 5;
|
||||
!(_KP_liberation_production_markers_old isEqualTo KP_liberation_production_markers)
|
||||
};
|
||||
|
||||
{
|
||||
private _marker_text = (_x select 4) + " [";
|
||||
if (_x select 1) then {_marker_text = _marker_text + "S";};
|
||||
if (_x select 2) then {_marker_text = _marker_text + "A";};
|
||||
if (_x select 3) then {_marker_text = _marker_text + "F";};
|
||||
_marker_text = _marker_text + "]";
|
||||
(_x select 0) setMarkerTextLocal _marker_text;
|
||||
} forEach KP_liberation_production_markers;
|
||||
|
||||
_KP_liberation_production_markers_old = +KP_liberation_production_markers;
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
while { true } do {
|
||||
|
||||
if ( local group player ) then {
|
||||
{
|
||||
if ( _x getVariable ["GRLIB_squad_color", "MAIN"] != assignedTeam _x ) then {
|
||||
_x setVariable ["GRLIB_squad_color", assignedTeam _x, true ];
|
||||
};
|
||||
} foreach (units group player);
|
||||
};
|
||||
|
||||
sleep 5;
|
||||
};
|
||||
113
kp_liberation.brf_sumava/scripts/client/misc/init_arsenal.sqf
Normal file
113
kp_liberation.brf_sumava/scripts/client/misc/init_arsenal.sqf
Normal file
@@ -0,0 +1,113 @@
|
||||
if (KP_liberation_arsenalUsePreset) then {
|
||||
private _crawled = [] call KPLIB_fnc_crawlAllItems;
|
||||
private _weapons = [];
|
||||
private _magazines = [];
|
||||
private _items = [];
|
||||
private _backpacks = [];
|
||||
KP_liberation_allowed_items = [];
|
||||
|
||||
if (isNil "GRLIB_arsenal_weapons") then {GRLIB_arsenal_weapons = []};
|
||||
if (isNil "GRLIB_arsenal_magazines") then {GRLIB_arsenal_magazines = []};
|
||||
if (isNil "GRLIB_arsenal_items") then {GRLIB_arsenal_items = []};
|
||||
if (isNil "GRLIB_arsenal_backpacks") then {GRLIB_arsenal_backpacks = []};
|
||||
if (isNil "blacklisted_from_arsenal") then {blacklisted_from_arsenal = []};
|
||||
|
||||
if ((count GRLIB_arsenal_weapons) == 0) then {
|
||||
if ((count blacklisted_from_arsenal) == 0) then {
|
||||
_weapons = _crawled select 0;
|
||||
} else {
|
||||
{if (!(_x in blacklisted_from_arsenal)) then {_weapons pushBack _x};} forEach (_crawled select 0);
|
||||
};
|
||||
[missionNamespace, _weapons] call BIS_fnc_addVirtualWeaponCargo;
|
||||
KP_liberation_allowed_items append _weapons;
|
||||
} else {
|
||||
[missionNamespace, GRLIB_arsenal_weapons] call BIS_fnc_addVirtualWeaponCargo;
|
||||
KP_liberation_allowed_items append GRLIB_arsenal_weapons;
|
||||
};
|
||||
|
||||
// Support for CBA disposable launchers, https://github.com/CBATeam/CBA_A3/wiki/Disposable-Launchers
|
||||
if !(configProperties [configFile >> "CBA_DisposableLaunchers"] isEqualTo []) then {
|
||||
private _disposableLaunchers = ["CBA_FakeLauncherMagazine"];
|
||||
{
|
||||
private _loadedLauncher = cba_disposable_LoadedLaunchers get _x;
|
||||
if (!isNil "_loadedLauncher") then {
|
||||
_disposableLaunchers pushBack _loadedLauncher;
|
||||
};
|
||||
|
||||
private _normalLauncher = cba_disposable_NormalLaunchers get _x;
|
||||
if (!isNil "_normalLauncher") then {
|
||||
_normalLauncher params ["_loadedLauncher"];
|
||||
_disposableLaunchers pushBack _loadedLauncher;
|
||||
};
|
||||
} forEach KP_liberation_allowed_items;
|
||||
KP_liberation_allowed_items append _disposableLaunchers;
|
||||
};
|
||||
|
||||
if ((count GRLIB_arsenal_magazines) == 0) then {
|
||||
if ((count blacklisted_from_arsenal) == 0) then {
|
||||
_magazines = _crawled select 1;
|
||||
} else {
|
||||
{if (!(_x in blacklisted_from_arsenal)) then {_magazines pushBack _x};} forEach (_crawled select 1);
|
||||
};
|
||||
[missionNamespace, _magazines] call BIS_fnc_addVirtualMagazineCargo;
|
||||
KP_liberation_allowed_items append _magazines;
|
||||
} else {
|
||||
[missionNamespace, GRLIB_arsenal_magazines] call BIS_fnc_addVirtualMagazineCargo;
|
||||
KP_liberation_allowed_items append GRLIB_arsenal_magazines;
|
||||
};
|
||||
|
||||
if ((count GRLIB_arsenal_items) == 0) then {
|
||||
if ((count blacklisted_from_arsenal) == 0) then {
|
||||
_items = _crawled select 2;
|
||||
} else {
|
||||
{if (!(_x in blacklisted_from_arsenal)) then {_items pushBack _x};} forEach (_crawled select 2);
|
||||
};
|
||||
[missionNamespace, _items] call BIS_fnc_addVirtualItemCargo;
|
||||
KP_liberation_allowed_items append _items;
|
||||
} else {
|
||||
[missionNamespace, GRLIB_arsenal_items] call BIS_fnc_addVirtualItemCargo;
|
||||
KP_liberation_allowed_items append GRLIB_arsenal_items;
|
||||
};
|
||||
|
||||
if ((count GRLIB_arsenal_backpacks) == 0) then {
|
||||
if ((count blacklisted_from_arsenal) == 0) then {
|
||||
_backpacks = _crawled select 3;
|
||||
} else {
|
||||
{if (!(_x in blacklisted_from_arsenal)) then {_backpacks pushBack _x};} forEach (_crawled select 3);
|
||||
};
|
||||
[missionNamespace, _backpacks] call BIS_fnc_addVirtualBackpackCargo;
|
||||
KP_liberation_allowed_items append _backpacks;
|
||||
} else {
|
||||
[missionNamespace, GRLIB_arsenal_backpacks] call BIS_fnc_addVirtualBackpackCargo;
|
||||
KP_liberation_allowed_items append GRLIB_arsenal_backpacks;
|
||||
};
|
||||
|
||||
{
|
||||
if ((_x find "rhs_acc") == 0) then {
|
||||
KP_liberation_allowed_items_extension append [_x + "_3d", _x + "_pip"];
|
||||
};
|
||||
if ((_x find "rhsusf_acc") == 0) then {
|
||||
KP_liberation_allowed_items_extension append [_x + "_3d", _x + "_pip"];
|
||||
};
|
||||
} forEach KP_liberation_allowed_items;
|
||||
|
||||
if ((count KP_liberation_allowed_items_extension) > 0) then {
|
||||
KP_liberation_allowed_items append KP_liberation_allowed_items_extension;
|
||||
};
|
||||
|
||||
if (KP_liberation_ace && KP_liberation_arsenal_type) then {
|
||||
[player, KP_liberation_allowed_items, false] call ace_arsenal_fnc_addVirtualItems;
|
||||
};
|
||||
|
||||
// Lowercase all classnames
|
||||
KP_liberation_allowed_items = KP_liberation_allowed_items apply {toLower _x};
|
||||
} else {
|
||||
[missionNamespace, true] call BIS_fnc_addVirtualWeaponCargo;
|
||||
[missionNamespace, true] call BIS_fnc_addVirtualMagazineCargo;
|
||||
[missionNamespace, true] call BIS_fnc_addVirtualItemCargo;
|
||||
[missionNamespace, true] call BIS_fnc_addVirtualBackpackCargo;
|
||||
|
||||
if (KP_liberation_ace && KP_liberation_arsenal_type) then {
|
||||
[player, true, false] call ace_arsenal_fnc_addVirtualItems;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
_marker = createMarkerLocal ["zone_capture", markers_reset];
|
||||
_marker setMarkerColorLocal "ColorUNKNOWN";
|
||||
_marker setMarkerShapeLocal "Ellipse";
|
||||
_marker setMarkerBrushLocal "SolidBorder";
|
||||
_marker setMarkerSizeLocal [ GRLIB_capture_size, GRLIB_capture_size ];
|
||||
|
||||
_marker = createMarkerLocal ["spawn_marker", markers_reset];
|
||||
_marker setMarkerColorLocal "ColorGreen";
|
||||
_marker setMarkerTypeLocal "Select";
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
kp_fuel_consumption.sqf
|
||||
Author: Wyqer
|
||||
Website: www.killahpotatoes.de
|
||||
Date: 2017-02-02
|
||||
|
||||
Description:
|
||||
This script handles the fuel consumption of vehicles, so that refueling will be necessary more often.
|
||||
|
||||
Parameters:
|
||||
_this select 0 - OBJECT - Vehicle
|
||||
|
||||
Method:
|
||||
execVM
|
||||
|
||||
Example for initPlayerLocal.sqf:
|
||||
player addEventHandler ["GetInMan", {[ _this select 2] execVM "scripts\kp_fuel_consumption.sqf";}];
|
||||
*/
|
||||
|
||||
//CONFIG
|
||||
// Time in Minutes till a full tank depletes when the vehicle is standing with running engine
|
||||
private _kp_neutral_consumption = KP_liberation_fuel_neutral;
|
||||
// Time in Minutes till a full tank depletes when the vehicle is driving
|
||||
private _kp_normal_consumption = KP_liberation_fuel_normal;
|
||||
// Time in Minutes till a full tank depletes when the vehicle is driving at max speed
|
||||
private _kp_max_consumption = KP_liberation_fuel_max;
|
||||
|
||||
/*
|
||||
DO NOT EDIT BELOW
|
||||
*/
|
||||
|
||||
if (isNil "kp_fuel_consumption_vehicles") then {
|
||||
kp_fuel_consumption_vehicles = [];
|
||||
};
|
||||
|
||||
if (!((_this select 0) in kp_fuel_consumption_vehicles)) then {
|
||||
kp_fuel_consumption_vehicles pushBack (_this select 0);
|
||||
while {local (_this select 0)} do {
|
||||
if (isEngineOn (_this select 0)) then {
|
||||
if (speed (_this select 0) > 5) then {
|
||||
if (speed (_this select 0) > (getNumber (configFile >> "CfgVehicles" >> typeOf (_this select 0) >> "maxSpeed") * 0.9)) then {
|
||||
(_this select 0) setFuel (fuel (_this select 0) - (1 / (_kp_max_consumption * 60)));
|
||||
} else {
|
||||
(_this select 0) setFuel (fuel (_this select 0) - (1 / (_kp_normal_consumption * 60)));
|
||||
};
|
||||
} else {
|
||||
(_this select 0) setFuel (fuel (_this select 0) - (1 / (_kp_neutral_consumption * 60)));
|
||||
};
|
||||
};
|
||||
uiSleep 1;
|
||||
};
|
||||
kp_fuel_consumption_vehicles deleteAt (kp_fuel_consumption_vehicles find (_this select 0));
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
if ( GRLIB_permissions_param ) then {
|
||||
|
||||
waitUntil { !(isNil "GRLIB_permissions") };
|
||||
|
||||
sleep 5;
|
||||
|
||||
while { count GRLIB_permissions == 0 } do {
|
||||
hint localize "STR_PERMISSION_WARNING";
|
||||
sleep 5;
|
||||
};
|
||||
|
||||
hintSilent "";
|
||||
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
File: playerNamespace.sqf
|
||||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
|
||||
Date: 2020-04-12
|
||||
Last Update: 2020-05-08
|
||||
License: MIT License - http://www.opensource.org/licenses/MIT
|
||||
|
||||
Description:
|
||||
Tracks player state values to provide this information for other scripts.
|
||||
*/
|
||||
|
||||
scriptName "KPLIB_playerNamespace";
|
||||
|
||||
waitUntil {!isNil "one_synchro_done"};
|
||||
waitUntil {!isNil "one_eco_done"};
|
||||
waitUntil {one_synchro_done};
|
||||
waitUntil {one_eco_done};
|
||||
|
||||
private _fobPos = [0, 0, 0];
|
||||
private _fobDist = 99999;
|
||||
private _fobName = "";
|
||||
|
||||
while {true} do {
|
||||
// FOB distance, name and position
|
||||
if !(GRLIB_all_fobs isEqualTo []) then {
|
||||
_fobPos = [] call KPLIB_fnc_getNearestFob;
|
||||
_fobDist = player distance2d _fobPos;
|
||||
_fobName = ["", ["FOB", [_fobPos] call KPLIB_fnc_getFobName] joinString " "] select (_fobDist < GRLIB_fob_range);
|
||||
} else {
|
||||
_fobPos = [0, 0, 0];
|
||||
_fobDist = 99999;
|
||||
_fobName = "";
|
||||
};
|
||||
// TODO more self explanatory names, KPLIB_nearestFobDist, KPLIB_currentFobName, KPLIB_nearestFobPos
|
||||
player setVariable ["KPLIB_fobDist", _fobDist];
|
||||
player setVariable ["KPLIB_fobName", _fobName];
|
||||
player setVariable ["KPLIB_fobPos", _fobPos];
|
||||
|
||||
// Direct acces due to config, commander or admin
|
||||
player setVariable ["KPLIB_hasDirectAccess", (getPlayerUID player) in KP_liberation_commander_actions || {player == ([] call KPLIB_fnc_getCommander)} || {serverCommandAvailable "#kick"}];
|
||||
|
||||
// Outside of startbase "safezone"
|
||||
player setVariable ["KPLIB_isAwayFromStart", (player distance2d startbase) > 1000];
|
||||
|
||||
// Is near an arsenal object
|
||||
if (KP_liberation_mobilearsenal) then {
|
||||
player setVariable ["KPLIB_isNearArsenal", !(((player nearObjects [Arsenal_typename, 5]) select {getObjectType _x >= 8}) isEqualTo [])];
|
||||
};
|
||||
|
||||
// Is near a mobile respawn
|
||||
if (KP_liberation_mobilerespawn) then {
|
||||
player setVariable ["KPLIB_isNearMobRespawn", !((player nearEntities [[Respawn_truck_typename, huron_typename], 10]) isEqualTo [])];
|
||||
};
|
||||
|
||||
// Is near startbase
|
||||
player setVariable ["KPLIB_isNearStart", (player distance2d startbase) < 200];
|
||||
|
||||
// Nearest activated sector and possible production data
|
||||
player setVariable ["KPLIB_nearProd", KP_liberation_production param [KP_liberation_production findIf {(_x select 1) isEqualTo ([100] call KPLIB_fnc_getNearestSector)}, []]];
|
||||
player setVariable ["KPLIB_nearSector", [GRLIB_sector_size] call KPLIB_fnc_getNearestSector];
|
||||
|
||||
// Zeus module synced to player
|
||||
player setVariable ["KPLIB_ownedZeusModule", getAssignedCuratorLogic player];
|
||||
|
||||
// Update state in Discord rich presence
|
||||
[] call KPLIB_fnc_setDiscordState;
|
||||
|
||||
sleep 1;
|
||||
};
|
||||
@@ -0,0 +1,80 @@
|
||||
private [ "_resupply_dist", "_repair_increment", "_repair_speed", "_repair_altitude", "_veh", "_repaired", "_rearmed", "_refueled", "_average_damage", "_average_fuel", "_screenmsg", "_rearm_time", "_refuel_amount", "_rearm_ticker" ];
|
||||
|
||||
_repair_amount = 0.01;
|
||||
_repair_speed = 2;
|
||||
_repair_altitude = 2;
|
||||
_resupply_dist = 30;
|
||||
_rearm_time = 60;
|
||||
_refuel_amount = 0.02;
|
||||
_rearm_ticker = 0;
|
||||
|
||||
while { true } do {
|
||||
|
||||
_repaired = false;
|
||||
_rearmed = false;
|
||||
_refueled = false;
|
||||
_average_damage = 0;
|
||||
_average_fuel = 0;
|
||||
_screenmsg = "";
|
||||
|
||||
_veh = vehicle player;
|
||||
|
||||
if ( _veh != player ) then {
|
||||
if ( effectiveCommander _veh == player ) then {
|
||||
if ( (speed _veh < _repair_speed) && (((getPosATL _veh) select 2) < _repair_altitude) ) then {
|
||||
|
||||
if ( count ( (getpos _veh) nearEntities [ vehicle_repair_sources , _resupply_dist] ) > 0 ) then {
|
||||
if ( damage _veh > 0 ) then {
|
||||
_repaired = true;
|
||||
_average_damage = (damage _veh) - _repair_amount;
|
||||
if ( _average_damage < 0 ) then { _average_damage = 0 };
|
||||
_veh setDamage _average_damage;
|
||||
};
|
||||
};
|
||||
|
||||
if ( ( count ( (getpos _veh) nearEntities [ vehicle_rearm_sources , _resupply_dist] ) > 0 ) && ( _rearm_ticker < _rearm_time ) ) then {
|
||||
_rearmed = true;
|
||||
_rearm_ticker = _rearm_ticker + 1;
|
||||
if ( _rearm_ticker >= _rearm_time ) then {
|
||||
[_veh, 1] remoteExecCall ["setVehicleAmmo", _veh];
|
||||
};
|
||||
};
|
||||
|
||||
if ( count ( (getpos _veh) nearEntities [ vehicle_refuel_sources , _resupply_dist] ) > 0 ) then {
|
||||
if ( fuel _veh < ( 1 - _refuel_amount ) ) then {
|
||||
_refueled = true;
|
||||
[_veh, (fuel _veh + _refuel_amount)] remoteExecCall ["setFuel", _veh];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_rearm_ticker = 0;
|
||||
};
|
||||
} else {
|
||||
_rearm_ticker = 0;
|
||||
};
|
||||
} else {
|
||||
_rearm_ticker = 0;
|
||||
};
|
||||
|
||||
if ( _repaired ) then {
|
||||
_screenmsg = format [ "%1 : %2%3", localize "STR_REPAIRING", round ( 100 - (_average_damage * 100) ), "%" ];
|
||||
};
|
||||
|
||||
if ( _rearmed ) then {
|
||||
if ( _repaired ) then {
|
||||
_screenmsg = format [ "%1 - ", _screenmsg ];
|
||||
};
|
||||
_screenmsg = format [ "%1%2", _screenmsg, format [ localize "STR_REARMING", _rearm_time - _rearm_ticker ] ];
|
||||
};
|
||||
|
||||
if ( _refueled ) then {
|
||||
if ( _repaired || _rearmed ) then {
|
||||
_screenmsg = format [ "%1 - ", _screenmsg ];
|
||||
};
|
||||
_screenmsg = format [ "%1%2", _screenmsg, format [ "%1 : %2%3", localize "STR_REFUELING", round ( (fuel _veh) * 100 ), "%" ] ];
|
||||
};
|
||||
|
||||
titleText [ _screenmsg, "PLAIN DOWN" ];
|
||||
|
||||
sleep 1;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
waitUntil {
|
||||
time > 20;
|
||||
};
|
||||
|
||||
if ( isNil "GRLIB_secondary_in_progress" ) exitWith {};
|
||||
if ( GRLIB_secondary_in_progress < 0 ) exitWith {};
|
||||
|
||||
if ( GRLIB_secondary_in_progress == 0 ) then {
|
||||
[ 2 ] call remote_call_intel;
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
one_eco_done = false;
|
||||
waitUntil {!isNil "sync_eco"};
|
||||
|
||||
while {true} do {
|
||||
waitUntil {
|
||||
sleep 0.2;
|
||||
count sync_eco > 0;
|
||||
};
|
||||
KP_liberation_production = sync_eco select 0;
|
||||
KP_liberation_logistics = sync_eco select 1;
|
||||
KP_liberation_production_markers = sync_eco select 2;
|
||||
sync_eco = [];
|
||||
one_eco_done = true;
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
one_synchro_done = false;
|
||||
synchro_done = false;
|
||||
|
||||
waitUntil {!isNil "sync_vars"};
|
||||
|
||||
while {true} do {
|
||||
waitUntil {sleep 0.2; (count sync_vars) > 0};
|
||||
|
||||
KP_liberation_fob_resources = sync_vars select 0;
|
||||
KP_liberation_supplies_global = sync_vars select 1;
|
||||
KP_liberation_ammo_global = sync_vars select 2;
|
||||
KP_liberation_fuel_global = sync_vars select 3;
|
||||
unitcap = sync_vars select 4;
|
||||
KP_liberation_heli_count = sync_vars select 5;
|
||||
KP_liberation_plane_count = sync_vars select 6;
|
||||
KP_liberation_heli_slots = sync_vars select 7;
|
||||
KP_liberation_plane_slots = sync_vars select 8;
|
||||
combat_readiness = sync_vars select 9;
|
||||
resources_intel = sync_vars select 10;
|
||||
infantry_cap = sync_vars select 11;
|
||||
KP_liberation_civ_rep = sync_vars select 12;
|
||||
KP_liberation_guerilla_strength = sync_vars select 13;
|
||||
infantry_weight = sync_vars select 14;
|
||||
armor_weight = sync_vars select 15;
|
||||
air_weight = sync_vars select 16;
|
||||
|
||||
sync_vars = [];
|
||||
one_synchro_done = true;
|
||||
synchro_done = true;
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
params ["_vehicle"];
|
||||
private _vehicleClass = toLower (typeOf _vehicle);
|
||||
|
||||
// Cargo is always allowed
|
||||
private _isCargo = (_vehicle getCargoIndex player) != -1;
|
||||
if (_isCargo || _vehicle isKindOf "ParachuteBase") exitWith {};
|
||||
|
||||
private _permissibleVehicles = [
|
||||
[KPLIB_typeLightClasses, "STR_PERMISSION_NO_LIGHT"],
|
||||
[KPLIB_typeHeavyClasses, "STR_PERMISSION_NO_ARMOR"],
|
||||
[KPLIB_typeAirClasses, "STR_PERMISSION_NO_AIR"]
|
||||
];
|
||||
|
||||
private _permissionIdx = _permissibleVehicles findIf {_vehicleClass in (_x select 0)};
|
||||
if (_permissionIdx isEqualTo -1) exitWith {};
|
||||
|
||||
if !([_permissionIdx] call KPLIB_fnc_hasPermission) exitWith {
|
||||
moveOut player;
|
||||
hint localize (_permissibleVehicles select _permissionIdx select 1);
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
if ( isDedicated ) exitWith {};
|
||||
|
||||
params [ "_battlegroup_position" ];
|
||||
|
||||
"opfor_bg_marker" setMarkerPosLocal ( markerPos _battlegroup_position );
|
||||
[ "lib_battlegroup", [ markerText ( [ 10000, markerPos _battlegroup_position ] call KPLIB_fnc_getNearestSector ) ] ] call BIS_fnc_showNotification;
|
||||
|
||||
sleep 600;
|
||||
|
||||
"opfor_bg_marker" setMarkerPosLocal markers_reset;
|
||||
@@ -0,0 +1,6 @@
|
||||
player allowDamage false;
|
||||
(vehicle player) allowDamage false;
|
||||
GRLIB_endgame = 1;
|
||||
sleep 20;
|
||||
|
||||
_this call compileFinal preprocessFileLineNumbers "scripts\client\ui\end_screen.sqf";
|
||||
@@ -0,0 +1,30 @@
|
||||
if ( isDedicated ) exitWith {};
|
||||
|
||||
if ( isNil "sector_timer" ) then { sector_timer = 0 };
|
||||
|
||||
params [ "_fob", "_status" ];
|
||||
private [ "_fobname" ];
|
||||
|
||||
_fobname = [_fob] call KPLIB_fnc_getFobName;
|
||||
|
||||
if ( _status == 0 ) then {
|
||||
[ "lib_fob_built", [ _fobname ] ] call BIS_fnc_showNotification;
|
||||
};
|
||||
|
||||
if ( _status == 1 ) then {
|
||||
[ "lib_fob_attacked", [ _fobname ] ] call BIS_fnc_showNotification;
|
||||
"opfor_capture_marker" setMarkerPosLocal _fob;
|
||||
sector_timer = GRLIB_vulnerability_timer;
|
||||
};
|
||||
|
||||
if ( _status == 2 ) then {
|
||||
[ "lib_fob_lost", [ _fobname ] ] call BIS_fnc_showNotification;
|
||||
"opfor_capture_marker" setMarkerPosLocal markers_reset;
|
||||
sector_timer = 0;
|
||||
};
|
||||
|
||||
if ( _status == 3 ) then {
|
||||
[ "lib_fob_safe", [ _fobname ] ] call BIS_fnc_showNotification;
|
||||
"opfor_capture_marker" setMarkerPosLocal markers_reset;
|
||||
sector_timer = 0;
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
if ( isDedicated ) exitWith {};
|
||||
|
||||
params [ "_attack_destination" ];
|
||||
|
||||
if ( isNil "GRLIB_last_incoming_notif_time" ) then { GRLIB_last_incoming_notif_time = -9999 };
|
||||
|
||||
if ( time > GRLIB_last_incoming_notif_time + 60 ) then {
|
||||
|
||||
GRLIB_last_incoming_notif_time = time;
|
||||
|
||||
private [ "_attack_location_name" ];
|
||||
_attack_location_name = [_attack_destination] call KPLIB_fnc_getLocationName;
|
||||
|
||||
[ "lib_incoming", [ _attack_location_name ] ] call BIS_fnc_showNotification;
|
||||
|
||||
private [ "_mrk" ];
|
||||
_mrk = createMarkerLocal [ "opfor_incoming_marker", _attack_destination];
|
||||
"opfor_incoming_marker" setMarkerTypeLocal "selector_selectedMission";
|
||||
"opfor_incoming_marker" setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
|
||||
sleep 250;
|
||||
deleteMarkerLocal _mrk;
|
||||
};
|
||||
@@ -0,0 +1,59 @@
|
||||
if (isDedicated) exitWith {};
|
||||
|
||||
params ["_notiftype", ["_obj_position", getpos player]];
|
||||
|
||||
switch (_notiftype) do {
|
||||
case 0: {["lib_intel_prisoner"] call BIS_fnc_showNotification;};
|
||||
case 1: {["lib_intel_document"] call BIS_fnc_showNotification;};
|
||||
case 2: {
|
||||
waitUntil {!isNil "secondary_objective_position_marker"};
|
||||
waitUntil {count secondary_objective_position_marker > 0};
|
||||
waitUntil {secondary_objective_position_marker distance zeropos > 1000};
|
||||
["lib_intel_fob", [markertext ([10000, secondary_objective_position_marker] call KPLIB_fnc_getNearestSector)]] call BIS_fnc_showNotification;
|
||||
_secondary_marker = createMarkerLocal ["secondarymarker", secondary_objective_position_marker];
|
||||
_secondary_marker setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
_secondary_marker setMarkerTypeLocal "hd_unknown";
|
||||
|
||||
_secondary_marker_zone = createMarkerLocal ["secondarymarkerzone", secondary_objective_position_marker];
|
||||
_secondary_marker_zone setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
_secondary_marker_zone setMarkerShapeLocal "ELLIPSE";
|
||||
_secondary_marker_zone setMarkerBrushLocal "FDiagonal";
|
||||
_secondary_marker_zone setMarkerSizeLocal [1500,1500];
|
||||
};
|
||||
case 3: {
|
||||
["lib_secondary_fob_destroyed"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "secondarymarker";
|
||||
deleteMarkerLocal "secondarymarkerzone";
|
||||
secondary_objective_position_marker = [];
|
||||
};
|
||||
case 4: {["lib_intel_convoy", [markertext ([10000, _obj_position] call KPLIB_fnc_getNearestSector)]] call BIS_fnc_showNotification;};
|
||||
case 5: {["lib_secondary_convoy_destroyed"] call BIS_fnc_showNotification;};
|
||||
case 6: {
|
||||
waitUntil {!isNil "secondary_objective_position_marker"};
|
||||
waitUntil {count secondary_objective_position_marker > 0};
|
||||
waitUntil {secondary_objective_position_marker distance zeropos > 1000};
|
||||
["lib_intel_sar", [markertext ([10000, secondary_objective_position_marker] call KPLIB_fnc_getNearestSector)]] call BIS_fnc_showNotification;
|
||||
_secondary_marker = createMarkerLocal ["secondarymarker", secondary_objective_position_marker];
|
||||
_secondary_marker setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
_secondary_marker setMarkerTypeLocal "hd_unknown";
|
||||
|
||||
_secondary_marker_zone = createMarkerLocal ["secondarymarkerzone", secondary_objective_position_marker];
|
||||
_secondary_marker_zone setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
_secondary_marker_zone setMarkerShapeLocal "ELLIPSE";
|
||||
_secondary_marker_zone setMarkerBrushLocal "FDiagonal";
|
||||
_secondary_marker_zone setMarkerSizeLocal [1500,1500];
|
||||
};
|
||||
case 7: {
|
||||
["lib_intel_sar_failed"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "secondarymarker";
|
||||
deleteMarkerLocal "secondarymarkerzone";
|
||||
secondary_objective_position_marker = [];
|
||||
};
|
||||
case 8: {
|
||||
["lib_intel_sar_succeeded"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "secondarymarker";
|
||||
deleteMarkerLocal "secondarymarkerzone";
|
||||
secondary_objective_position_marker = [];
|
||||
};
|
||||
default {[format ["remote_call_intel.sqf -> no valid value for _notiftype: %1", _notiftype], "ERROR"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
};
|
||||
@@ -0,0 +1,86 @@
|
||||
params [ "_unit" ];
|
||||
private [ "_nearestfob", "_is_near_fob", "_is_near_blufor", "_grp", "_waypoint", "_nearblufor" ];
|
||||
|
||||
waitUntil {
|
||||
sleep 0.5;
|
||||
local _unit
|
||||
};
|
||||
|
||||
_is_near_fob = false;
|
||||
_is_near_blufor = true;
|
||||
|
||||
sleep 1;
|
||||
_unit playmove "AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
|
||||
sleep 2;
|
||||
_unit enableAI "ANIM";
|
||||
_unit enableAI "MOVE";
|
||||
sleep 2;
|
||||
[_unit, ""] remoteExecCall ["switchMove"];
|
||||
|
||||
if ( typeof _unit == pilot_classname ) exitWith {};
|
||||
|
||||
waitUntil { sleep 5;
|
||||
|
||||
_nearestfob = [ getpos _unit ] call KPLIB_fnc_getNearestFob;
|
||||
if ( count _nearestfob == 3) then {
|
||||
if ( ( _unit distance _nearestfob ) < 30 ) then {
|
||||
_is_near_fob = true;
|
||||
};
|
||||
};
|
||||
|
||||
_is_near_blufor = false;
|
||||
if ( !_is_near_blufor ) then {
|
||||
{
|
||||
if ((_x distance _unit) < 100) exitWith { _is_near_blufor = true };
|
||||
} forEach (allUnits select {!((toLower (typeof _x)) in KPLIB_o_inf_classes || (typeof _x) in militia_squad)});
|
||||
};
|
||||
|
||||
!alive _unit || !(_is_near_blufor) || (_is_near_fob && (vehicle _unit == _unit))
|
||||
};
|
||||
|
||||
if (alive _unit) then {
|
||||
|
||||
if (_is_near_fob) then {
|
||||
|
||||
sleep 5;
|
||||
_grp = createGroup [GRLIB_side_civilian, true];
|
||||
[_unit] joinSilent _grp;
|
||||
_unit playmove "AmovPercMstpSnonWnonDnon_AmovPsitMstpSnonWnonDnon_ground";
|
||||
_unit disableAI "ANIM";
|
||||
_unit disableAI "MOVE";
|
||||
sleep 5;
|
||||
[_unit, "AidlPsitMstpSnonWnonDnon_ground00"] remoteExecCall ["switchMove"];
|
||||
[_unit] remoteExec ["prisonner_remote_call",2];
|
||||
sleep 600;
|
||||
deleteVehicle _unit;
|
||||
|
||||
} else {
|
||||
|
||||
_grp = createGroup [GRLIB_side_enemy, true];
|
||||
[_unit] joinSilent _grp;
|
||||
_unit setUnitPos "AUTO";
|
||||
_unit setCaptive false;
|
||||
|
||||
if ((vehicle _unit != _unit) && !(_unit isEqualTo (driver vehicle _unit))) then {
|
||||
unAssignVehicle _unit;
|
||||
_unit action ["eject", vehicle _unit];
|
||||
_unit action ["getout", vehicle _unit];
|
||||
unAssignVehicle _unit;
|
||||
};
|
||||
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow leader _grp} foreach units _grp;
|
||||
|
||||
_possible_sectors = (sectors_allSectors - blufor_sectors);
|
||||
if ( count _possible_sectors > 0 ) then {
|
||||
|
||||
_possible_sectors = [ _possible_sectors , [getpos _unit, 5000] , { (markerPos _x) distance _input0 } , 'ASCEND' ] call BIS_fnc_sortBy;
|
||||
if ( count _possible_sectors > 0 ) then {
|
||||
_target_sector = _possible_sectors select 0;
|
||||
_waypoint = _grp addWaypoint [markerpos _target_sector, 300];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "FULL";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
if ( isDedicated ) exitWith {};
|
||||
|
||||
if ( isNil "sector_timer" ) then { sector_timer = 0 };
|
||||
|
||||
params [ "_sector", "_status" ];
|
||||
|
||||
if ( _status == 0 ) then {
|
||||
[ "lib_sector_captured", [ markerText _sector ] ] call BIS_fnc_showNotification;
|
||||
};
|
||||
|
||||
if ( _status == 1 ) then {
|
||||
[ "lib_sector_attacked", [ markerText _sector ] ] call BIS_fnc_showNotification;
|
||||
"opfor_capture_marker" setMarkerPosLocal ( markerpos _sector );
|
||||
sector_timer = GRLIB_vulnerability_timer;
|
||||
};
|
||||
|
||||
if ( _status == 2 ) then {
|
||||
[ "lib_sector_lost", [ markerText _sector ] ] call BIS_fnc_showNotification;
|
||||
"opfor_capture_marker" setMarkerPosLocal markers_reset;
|
||||
sector_timer = 0;
|
||||
};
|
||||
|
||||
if ( _status == 3 ) then {
|
||||
[ "lib_sector_safe", [ markerText _sector ] ] call BIS_fnc_showNotification;
|
||||
"opfor_capture_marker" setMarkerPosLocal markers_reset;
|
||||
sector_timer = 0;
|
||||
};
|
||||
|
||||
{ _x setMarkerColorLocal GRLIB_color_enemy; } foreach (sectors_allSectors - blufor_sectors);
|
||||
{ _x setMarkerColorLocal GRLIB_color_friendly; } foreach blufor_sectors;
|
||||
64
kp_liberation.brf_sumava/scripts/client/spawn/do_halo.sqf
Normal file
64
kp_liberation.brf_sumava/scripts/client/spawn/do_halo.sqf
Normal file
@@ -0,0 +1,64 @@
|
||||
private [ "_dialog", "_backpack", "_backpackcontents" ];
|
||||
|
||||
if ( isNil "GRLIB_last_halo_jump" ) then { GRLIB_last_halo_jump = -6000; };
|
||||
|
||||
if ( GRLIB_halo_param > 1 && ( GRLIB_last_halo_jump + ( GRLIB_halo_param * 60 ) ) >= time ) exitWith {
|
||||
hint format [ localize "STR_HALO_DENIED_COOLDOWN", ceil ( ( ( GRLIB_last_halo_jump + ( GRLIB_halo_param * 60 ) ) - time ) / 60 ) ];
|
||||
};
|
||||
|
||||
_dialog = createDialog "liberation_halo";
|
||||
dojump = 0;
|
||||
halo_position = getpos player;
|
||||
|
||||
_backpackcontents = [];
|
||||
|
||||
[ "halo_map_event", "onMapSingleClick", { halo_position = _pos } ] call BIS_fnc_addStackedEventHandler;
|
||||
|
||||
"spawn_marker" setMarkerTextLocal (localize "STR_HALO_PARAM");
|
||||
|
||||
waitUntil { dialog };
|
||||
while { dialog && alive player && dojump == 0 } do {
|
||||
"spawn_marker" setMarkerPosLocal halo_position;
|
||||
|
||||
sleep 0.1;
|
||||
};
|
||||
|
||||
if ( dialog ) then {
|
||||
closeDialog 0;
|
||||
sleep 0.1;
|
||||
};
|
||||
|
||||
"spawn_marker" setMarkerPosLocal markers_reset;
|
||||
"spawn_marker" setMarkerTextLocal "";
|
||||
|
||||
[ "halo_map_event", "onMapSingleClick" ] call BIS_fnc_removeStackedEventHandler;
|
||||
|
||||
if ( dojump > 0 ) then {
|
||||
GRLIB_last_halo_jump = time;
|
||||
halo_position = halo_position getPos [random 250, random 360];
|
||||
halo_position = [ halo_position select 0, halo_position select 1, GRLIB_halo_altitude + (random 200) ];
|
||||
halojumping = true;
|
||||
sleep 0.1;
|
||||
cutRsc ["fasttravel", "PLAIN", 1];
|
||||
playSound "parasound";
|
||||
sleep 2;
|
||||
_backpack = backpack player;
|
||||
if ( _backpack != "" && _backpack != "B_Parachute" ) then {
|
||||
_backpackcontents = backpackItems player;
|
||||
removeBackpack player;
|
||||
sleep 0.1;
|
||||
};
|
||||
player addBackpack "B_Parachute";
|
||||
|
||||
player setpos halo_position;
|
||||
|
||||
sleep 4;
|
||||
halojumping = false;
|
||||
waitUntil { !alive player || isTouchingGround player };
|
||||
if ( _backpack != "" && _backpack != "B_Parachute" ) then {
|
||||
sleep 2;
|
||||
player addBackpack _backpack;
|
||||
clearAllItemsFromBackpack player;
|
||||
{ player addItemToBackpack _x } foreach _backpackcontents;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,229 @@
|
||||
#define DEPLOY_DISPLAY (findDisplay 5201)
|
||||
#define DEPLOY_LIST_IDC 201
|
||||
#define DEPLOY_BUTTON_IDC 202
|
||||
|
||||
KPLIB_respawnPositionsList = [];
|
||||
fullmap = 0;
|
||||
private _old_fullmap = 0;
|
||||
private _oldsel = -999;
|
||||
private _standard_map_pos = [];
|
||||
private _frame_pos = [];
|
||||
|
||||
GRLIB_force_redeploy = false;
|
||||
|
||||
waitUntil {!isNil "GRLIB_all_fobs"};
|
||||
waitUntil {!isNil "blufor_sectors"};
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
private _spawn_str = "";
|
||||
|
||||
waitUntil {!isNil "introDone"};
|
||||
waitUntil {introDone};
|
||||
waitUntil {!isNil "cinematic_camera_stop"};
|
||||
waitUntil {cinematic_camera_stop};
|
||||
|
||||
private _basenamestr = "Operation Base";
|
||||
|
||||
KP_liberation_respawn_time = time;
|
||||
KP_liberation_respawn_mobile_done = false;
|
||||
|
||||
while {true} do {
|
||||
waitUntil {
|
||||
sleep 0.2;
|
||||
(GRLIB_force_redeploy || (player distance (markerPos GRLIB_respawn_marker) < 50)) && vehicle player == player && alive player && !dialog && howtoplay == 0
|
||||
};
|
||||
|
||||
private _backpack = backpack player;
|
||||
|
||||
fullmap = 0;
|
||||
_old_fullmap = 0;
|
||||
|
||||
GRLIB_force_redeploy = false;
|
||||
|
||||
createDialog "liberation_deploy";
|
||||
deploy = 0;
|
||||
_oldsel = -999;
|
||||
|
||||
showCinemaBorder false;
|
||||
camUseNVG false;
|
||||
respawn_camera = "camera" camCreate (getposATL startbase);
|
||||
respawn_object = "Sign_Arrow_Blue_F" createVehicleLocal (getposATL startbase);
|
||||
respawn_object hideObject true;
|
||||
respawn_camera camSetTarget respawn_object;
|
||||
respawn_camera cameraEffect ["internal","back"];
|
||||
respawn_camera camcommit 0;
|
||||
|
||||
waitUntil {dialog};
|
||||
|
||||
(DEPLOY_DISPLAY displayCtrl DEPLOY_LIST_IDC) ctrlAddEventHandler ["mouseButtonDblClick", {
|
||||
if (ctrlEnabled (DEPLOY_DISPLAY displayCtrl DEPLOY_BUTTON_IDC)) then {
|
||||
deploy = 1;
|
||||
};
|
||||
}];
|
||||
|
||||
_standard_map_pos = ctrlPosition (DEPLOY_DISPLAY displayCtrl 251);
|
||||
_frame_pos = ctrlPosition (DEPLOY_DISPLAY displayCtrl 198);
|
||||
|
||||
// Get loadouts either from ACE or BI arsenals
|
||||
private ["_loadouts_data"];
|
||||
if (KP_liberation_ace && KP_liberation_arsenal_type) then {
|
||||
_loadouts_data = +(profileNamespace getVariable ["ace_arsenal_saved_loadouts", []]);
|
||||
} else {
|
||||
private _saved_loadouts = +(profileNamespace getVariable "bis_fnc_saveInventory_data");
|
||||
_loadouts_data = [];
|
||||
private _counter = 0;
|
||||
if (!isNil "_saved_loadouts") then {
|
||||
{
|
||||
if (_counter % 2 == 0) then {
|
||||
_loadouts_data pushback _x;
|
||||
};
|
||||
_counter = _counter + 1;
|
||||
} forEach _saved_loadouts;
|
||||
};
|
||||
};
|
||||
|
||||
lbAdd [203, "--"];
|
||||
{lbAdd [203, _x param [0]]} forEach _loadouts_data;
|
||||
lbSetCurSel [203, 0];
|
||||
|
||||
while {dialog && alive player && deploy == 0} do {
|
||||
// ARRAY - [[NAME, POSITION(, OBJECT)], ...]
|
||||
KPLIB_respawnPositionsList = [[_basenamestr, getposATL startbase]];
|
||||
|
||||
{
|
||||
KPLIB_respawnPositionsList pushBack [
|
||||
format ["FOB %1 - %2", (military_alphabet select _forEachIndex), mapGridPosition _x],
|
||||
_x
|
||||
];
|
||||
} forEach GRLIB_all_fobs;
|
||||
|
||||
if (KP_liberation_mobilerespawn) then {
|
||||
if (KP_liberation_respawn_time <= time) then {
|
||||
private _mobileRespawns = [] call KPLIB_fnc_getMobileRespawns;
|
||||
|
||||
{
|
||||
KPLIB_respawnPositionsList pushBack [
|
||||
format ["%1 - %2", localize "STR_RESPAWN_TRUCK", mapGridPosition getPosATL _x],
|
||||
getPosATL _x,
|
||||
_x
|
||||
];
|
||||
} forEach _mobileRespawns
|
||||
};
|
||||
};
|
||||
|
||||
lbClear DEPLOY_LIST_IDC;
|
||||
{
|
||||
lbAdd [DEPLOY_LIST_IDC, (_x select 0)];
|
||||
} foreach KPLIB_respawnPositionsList;
|
||||
|
||||
if (lbCurSel DEPLOY_LIST_IDC == -1) then {
|
||||
lbSetCurSel [201, 0];
|
||||
};
|
||||
|
||||
if (lbCurSel DEPLOY_LIST_IDC != _oldsel) then {
|
||||
_oldsel = lbCurSel DEPLOY_LIST_IDC;
|
||||
private _objectpos = [0,0,0];
|
||||
if (dialog) then {
|
||||
_objectpos = ((KPLIB_respawnPositionsList select _oldsel) select 1);
|
||||
};
|
||||
respawn_object setPosATL ((KPLIB_respawnPositionsList select _oldsel) select 1);
|
||||
private _startdist = 120;
|
||||
private _enddist = 120;
|
||||
private _alti = 35;
|
||||
if (dialog) then {
|
||||
if (((KPLIB_respawnPositionsList select (lbCurSel DEPLOY_LIST_IDC)) select 0) == _basenamestr) then {
|
||||
_startdist = 200;
|
||||
_enddist = 300;
|
||||
_alti = 30;
|
||||
};
|
||||
// Disable if sector is under attack
|
||||
if (!KPLIB_respawnOnAttackedSectors && {_objectpos in KPLIB_sectorsUnderAttack}) then {
|
||||
(DEPLOY_DISPLAY displayCtrl DEPLOY_BUTTON_IDC) ctrlSetText localize "STR_DEPLOY_UNDERATTACK";
|
||||
(DEPLOY_DISPLAY displayCtrl DEPLOY_BUTTON_IDC) ctrlEnable false;
|
||||
} else {
|
||||
(DEPLOY_DISPLAY displayCtrl DEPLOY_BUTTON_IDC) ctrlSetText localize "STR_DEPLOY_BUTTON";
|
||||
(DEPLOY_DISPLAY displayCtrl DEPLOY_BUTTON_IDC) ctrlEnable true;
|
||||
};
|
||||
};
|
||||
|
||||
"spawn_marker" setMarkerPosLocal (getpos respawn_object);
|
||||
ctrlMapAnimClear (DEPLOY_DISPLAY displayCtrl 251);
|
||||
private _transition_map_pos = getpos respawn_object;
|
||||
private _fullscreen_map_offset = 4000;
|
||||
if(fullmap % 2 == 1) then {
|
||||
_transition_map_pos = [(_transition_map_pos select 0) - _fullscreen_map_offset, (_transition_map_pos select 1) + (_fullscreen_map_offset * 0.75), 0];
|
||||
};
|
||||
(DEPLOY_DISPLAY displayCtrl 251) ctrlMapAnimAdd [0, 0.3,_transition_map_pos];
|
||||
ctrlMapAnimCommit (DEPLOY_DISPLAY displayCtrl 251);
|
||||
|
||||
respawn_camera camSetPos [(getpos respawn_object select 0) - 70, (getpos respawn_object select 1) + _startdist, (getpos respawn_object select 2) + _alti];
|
||||
respawn_camera camcommit 0;
|
||||
respawn_camera camSetPos [(getpos respawn_object select 0) - 70, (getpos respawn_object select 1) - _enddist, (getpos respawn_object select 2) + _alti];
|
||||
respawn_camera camcommit 90;
|
||||
};
|
||||
|
||||
if (_old_fullmap != fullmap) then {
|
||||
_old_fullmap = fullmap;
|
||||
if (fullmap % 2 == 1) then {
|
||||
(DEPLOY_DISPLAY displayCtrl 251) ctrlSetPosition [ (_frame_pos select 0) + (_frame_pos select 2), (_frame_pos select 1), (0.6 * safezoneW), (_frame_pos select 3)];
|
||||
} else {
|
||||
(DEPLOY_DISPLAY displayCtrl 251) ctrlSetPosition _standard_map_pos;
|
||||
};
|
||||
(DEPLOY_DISPLAY displayCtrl 251) ctrlCommit 0.2;
|
||||
_oldsel = -1;
|
||||
};
|
||||
uiSleep 0.1;
|
||||
};
|
||||
|
||||
if (dialog && deploy == 1) then {
|
||||
private _idxchoice = lbCurSel DEPLOY_LIST_IDC;
|
||||
_spawn_str = (KPLIB_respawnPositionsList select _idxchoice) select 0;
|
||||
|
||||
if (count (KPLIB_respawnPositionsList select _idxchoice) == 3) then {
|
||||
private _truck = (KPLIB_respawnPositionsList select _idxchoice) select 2;
|
||||
player setposATL (_truck getPos [5 + (random 3), random 360]);
|
||||
KP_liberation_respawn_mobile_done = true;
|
||||
} else {
|
||||
private _destpos = ((KPLIB_respawnPositionsList select _idxchoice) select 1);
|
||||
player setposATL [((_destpos select 0) + 5) - (random 10),((_destpos select 1) + 5) - (random 10),(_destpos select 2)];
|
||||
};
|
||||
|
||||
if ((lbCurSel 203) > 0) then {
|
||||
private _selectedLoadout = _loadouts_data select ((lbCurSel 203) - 1);
|
||||
if (KP_liberation_ace && KP_liberation_arsenal_type) then {
|
||||
player setUnitLoadout (_selectedLoadout select 1);
|
||||
} else {
|
||||
[player, [profileNamespace, _selectedLoadout]] call BIS_fnc_loadInventory;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
respawn_camera cameraEffect ["Terminate","back"];
|
||||
camDestroy respawn_camera;
|
||||
deleteVehicle respawn_object;
|
||||
camUseNVG false;
|
||||
"spawn_marker" setMarkerPosLocal markers_reset;
|
||||
|
||||
if (dialog) then {
|
||||
closeDialog 0;
|
||||
};
|
||||
|
||||
if (alive player && deploy == 1) then {
|
||||
[_spawn_str] spawn spawn_camera;
|
||||
if (KP_liberation_respawn_mobile_done) then {
|
||||
KP_liberation_respawn_time = time + KP_liberation_respawn_cooldown;
|
||||
KP_liberation_respawn_mobile_done = false;
|
||||
};
|
||||
};
|
||||
|
||||
if (KP_liberation_arsenalUsePreset) then {
|
||||
[_backpack] call KPLIB_fnc_checkGear;
|
||||
};
|
||||
|
||||
if (KP_liberation_mobilerespawn && (KP_liberation_respawn_time > time)) then {
|
||||
hint format [localize "STR_RESPAWN_COOLDOWN_HINT", ceil ((KP_liberation_respawn_time - time) / 60)];
|
||||
uiSleep 12;
|
||||
hint "";
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,77 @@
|
||||
private [ "_nearest_sector", "_leadingzero_hour", "_leadingzero_minute", "_startpos0", "_startpos1", "_endpos1", "_startpos2", "_endpos2", "_startpos3", "_endpos3", "_spawn_camera", "_datestring" ];
|
||||
params [ "_spawn_str" ];
|
||||
|
||||
_nearest_sector = [2000] call KPLIB_fnc_getNearestSector;
|
||||
if ( _nearest_sector != "" ) then { _nearest_sector = format ["%1 %2",localize "STR_SPAWN_NEAR", markertext _nearest_sector]; };
|
||||
_leadingzero_hour = "";
|
||||
_leadingzero_minute = "";
|
||||
if ( (date select 3) < 10 ) then { _leadingzero_hour = "0" };
|
||||
if ( (date select 4) < 10 ) then { _leadingzero_minute = "0" };
|
||||
_datestring = format [ "%3/%2/%1 %4%5:%6%7", date select 0, date select 1, date select 2, _leadingzero_hour, date select 3, _leadingzero_minute, date select 4];
|
||||
|
||||
private [ "_spawn_camera", "_startpos0", "_startpos1", "_endpos1","_startpos2","_endpos2","_startpos3","_endpos3"];
|
||||
|
||||
if ( GRLIB_deployment_cinematic ) then {
|
||||
|
||||
camUseNVG false;
|
||||
showCinemaBorder false;
|
||||
_startpos0 = [ 0, 500, 3000];
|
||||
_startpos1 = [ 0, 500, 250];
|
||||
_endpos1 = [ 0, 450, 225];
|
||||
_startpos2 = [ 0, 100, 40];
|
||||
_endpos2 = [ 0, 80, 30];
|
||||
_startpos3 = [ 0, 8, 2.8];
|
||||
_endpos3 = [ 0, 6, 2.25];
|
||||
|
||||
_spawn_camera = "camera" camCreate _startpos0;
|
||||
_spawn_camera cameraEffect ["internal","front"];
|
||||
|
||||
_spawn_camera camSetTarget player;
|
||||
_spawn_camera camSetRelPos _startpos0;
|
||||
_spawn_camera camcommit 0;
|
||||
|
||||
_spawn_camera camSetRelPos _startpos1;
|
||||
_spawn_camera camcommit 0.5;
|
||||
|
||||
waitUntil { camCommitted _spawn_camera };
|
||||
|
||||
};
|
||||
|
||||
[ format [ "<t size='0.7' align='left'>%1<br/>%2<br/>%3<br/>%4</t>", name player, _spawn_str, _datestring, _nearest_sector ],1,0.8,8,1 ] spawn BIS_fnc_dynamictext;
|
||||
|
||||
if ( GRLIB_deployment_cinematic ) then {
|
||||
|
||||
_spawn_camera camSetRelPos _endpos1;
|
||||
_spawn_camera camcommit 1.75;
|
||||
|
||||
waitUntil { camCommitted _spawn_camera };
|
||||
|
||||
_spawn_camera camSetRelPos _startpos2;
|
||||
_spawn_camera camcommit 0.25;
|
||||
|
||||
waitUntil { camCommitted _spawn_camera };
|
||||
|
||||
_spawn_camera camSetRelPos _endpos2;
|
||||
_spawn_camera camcommit 1.75;
|
||||
|
||||
waitUntil { camCommitted _spawn_camera };
|
||||
|
||||
_spawn_camera camSetRelPos _startpos3;
|
||||
_spawn_camera camcommit 0.25;
|
||||
|
||||
waitUntil { camCommitted _spawn_camera };
|
||||
|
||||
_spawn_camera camSetRelPos _endpos3;
|
||||
_spawn_camera camcommit 1.75;
|
||||
|
||||
waitUntil { camCommitted _spawn_camera };
|
||||
|
||||
_spawn_camera camSetRelPos [0,0.4,1.75];
|
||||
_spawn_camera camcommit 1;
|
||||
|
||||
waitUntil { camCommitted _spawn_camera };
|
||||
|
||||
_spawn_camera cameraEffect ["Terminate","back"];
|
||||
camDestroy _spawn_camera;
|
||||
camUseNVG false;
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
class KPLIB_Tasks_Tutorial_Main {
|
||||
title = $STR_TUTORIAL_TASK_MAIN_TITLE;
|
||||
description = $STR_TUTORIAL_TASK_MAIN_DESC;
|
||||
};
|
||||
class KPLIB_Tasks_Tutorial_Fob {
|
||||
title = $STR_TUTORIAL_TASK_FOB_TITLE;
|
||||
description = $STR_TUTORIAL_TASK_FOB_DESC;
|
||||
};
|
||||
class KPLIB_Tasks_Tutorial_Fob_01a {
|
||||
title = $STR_TUTORIAL_TASK_FOB_01A_TITLE;
|
||||
description = $STR_TUTORIAL_TASK_FOB_01A_DESC;
|
||||
};
|
||||
class KPLIB_Tasks_Tutorial_Fob_01b {
|
||||
title = $STR_TUTORIAL_TASK_FOB_01B_TITLE;
|
||||
description = $STR_TUTORIAL_TASK_FOB_01B_DESC;
|
||||
};
|
||||
class KPLIB_Tasks_Tutorial_Fob_02 {
|
||||
title = $STR_TUTORIAL_TASK_FOB_02_TITLE;
|
||||
description = $STR_TUTORIAL_TASK_FOB_02_DESC;
|
||||
};
|
||||
class KPLIB_Tasks_Tutorial_Fob_03 {
|
||||
title = $STR_TUTORIAL_TASK_FOB_03_TITLE;
|
||||
description = $STR_TUTORIAL_TASK_FOB_03_DESC;
|
||||
};
|
||||
class KPLIB_Tasks_Tutorial_Sector {
|
||||
title = $STR_TUTORIAL_TASK_SECTOR_TITLE;
|
||||
description = $STR_TUTORIAL_TASK_SECTOR_DESC;
|
||||
};
|
||||
class KPLIB_Tasks_Tutorial_Sector_01 {
|
||||
title = $STR_TUTORIAL_TASK_SECTOR_01_TITLE;
|
||||
description = $STR_TUTORIAL_TASK_SECTOR_01_DESC;
|
||||
};
|
||||
class KPLIB_Tasks_Tutorial_Sector_02 {
|
||||
title = $STR_TUTORIAL_TASK_SECTOR_02_TITLE;
|
||||
description = $STR_TUTORIAL_TASK_SECTOR_02_DESC;
|
||||
};
|
||||
class KPLIB_Tasks_Tutorial_Sector_03 {
|
||||
title = $STR_TUTORIAL_TASK_SECTOR_03_TITLE;
|
||||
description = $STR_TUTORIAL_TASK_SECTOR_03_DESC;
|
||||
};
|
||||
class KPLIB_Tasks_Tutorial_Sector_04 {
|
||||
title = $STR_TUTORIAL_TASK_SECTOR_04_TITLE;
|
||||
description = $STR_TUTORIAL_TASK_SECTOR_04_DESC;
|
||||
};
|
||||
class KPLIB_Tasks_Tutorial_Sector_05 {
|
||||
title = $STR_TUTORIAL_TASK_SECTOR_05_TITLE;
|
||||
description = $STR_TUTORIAL_TASK_SECTOR_05_DESC;
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
File: fn_handleCrateStorageTask.sqf
|
||||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
|
||||
Date: 2020-05-09
|
||||
Last Update: 2020-05-09
|
||||
License: MIT License - http://www.opensource.org/licenses/MIT
|
||||
|
||||
Description:
|
||||
Handles the monitoring for the store crate tutorial task.
|
||||
|
||||
Parameter(s):
|
||||
_taskId - Task ID of the task to handle [STRING, defaults to ""]
|
||||
_obj - Object connected to the task [OBJECT, defaults to objNull]
|
||||
|
||||
Returns:
|
||||
Function reached the end [BOOL]
|
||||
*/
|
||||
|
||||
params [
|
||||
["_taskId", "", [""]],
|
||||
["_obj", objNull, [objNull]]
|
||||
];
|
||||
|
||||
if (_taskId isEqualTo "" || isNull _obj) exitWith {["Invalid parameters given"] call BIS_fnc_error; false};
|
||||
if (!canSuspend) exitWith {_this spawn KPLIB_fnc_handleCrateStorageTask};
|
||||
|
||||
[
|
||||
allPlayers,
|
||||
[_taskId, "KPLIB_Tasks_Tutorial_Fob_03"],
|
||||
["", localize "STR_TUTORIAL_CRATE"],
|
||||
[_obj, true],
|
||||
"CREATED",
|
||||
-1,
|
||||
false,
|
||||
"default",
|
||||
true
|
||||
] call BIS_fnc_taskCreate;
|
||||
|
||||
waitUntil {sleep 0.1; (toLower (typeOf (attachedTo _obj))) in KPLIB_storageBuildings};
|
||||
|
||||
[_taskId, "SUCCEEDED", false] call BIS_fnc_taskSetState;
|
||||
|
||||
true
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
File: fn_handleHealCivTask.sqf
|
||||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
|
||||
Date: 2020-05-09
|
||||
Last Update: 2020-05-09
|
||||
License: MIT License - http://www.opensource.org/licenses/MIT
|
||||
|
||||
Description:
|
||||
Handles the monitoring for the heal civilian tutorial task.
|
||||
|
||||
Parameter(s):
|
||||
_taskId - Task ID of the task to handle [STRING, defaults to ""]
|
||||
_obj - Object connected to the task [OBJECT, defaults to objNull]
|
||||
|
||||
Returns:
|
||||
Function reached the end [BOOL]
|
||||
*/
|
||||
|
||||
params [
|
||||
["_taskId", "", [""]],
|
||||
["_obj", objNull, [objNull]]
|
||||
];
|
||||
|
||||
if (_taskId isEqualTo "" || isNull _obj) exitWith {["Invalid parameters given"] call BIS_fnc_error; false};
|
||||
if (!canSuspend) exitWith {_this spawn KPLIB_fnc_handleHealCivTask};
|
||||
|
||||
[
|
||||
allPlayers,
|
||||
[_taskId, "KPLIB_Tasks_Tutorial_Sector_03"],
|
||||
["", localize "STR_TUTORIAL_CIVILIAN"],
|
||||
[_obj, true],
|
||||
"CREATED",
|
||||
-1,
|
||||
false,
|
||||
"heal",
|
||||
true
|
||||
] call BIS_fnc_taskCreate;
|
||||
|
||||
waitUntil {sleep 0.1; !(alive _obj && (damage _obj) > 0.4)};
|
||||
|
||||
[_taskId, "SUCCEEDED"] call BIS_fnc_taskSetState;
|
||||
|
||||
true
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
File: fn_handleTakePowTask.sqf
|
||||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
|
||||
Date: 2020-05-09
|
||||
Last Update: 2020-05-09
|
||||
License: MIT License - http://www.opensource.org/licenses/MIT
|
||||
|
||||
Description:
|
||||
Handles the monitoring for the capture POW tutorial task.
|
||||
|
||||
Parameter(s):
|
||||
_taskId - Task ID of the task to handle [STRING, defaults to ""]
|
||||
_obj - Object connected to the task [OBJECT, defaults to objNull]
|
||||
|
||||
Returns:
|
||||
Function reached the end [BOOL]
|
||||
*/
|
||||
|
||||
params [
|
||||
["_taskId", "", [""]],
|
||||
["_obj", objNull, [objNull]]
|
||||
];
|
||||
|
||||
if (_taskId isEqualTo "" || isNull _obj) exitWith {["Invalid parameters given"] call BIS_fnc_error; false};
|
||||
if (!canSuspend) exitWith {_this spawn KPLIB_fnc_handleTakePowTask};
|
||||
|
||||
[
|
||||
allPlayers,
|
||||
[_taskId, "KPLIB_Tasks_Tutorial_Sector_03"],
|
||||
["", localize "STR_TUTORIAL_SOLDIER"],
|
||||
[_obj, true],
|
||||
"CREATED",
|
||||
-1,
|
||||
false,
|
||||
"danger",
|
||||
true
|
||||
] call BIS_fnc_taskCreate;
|
||||
|
||||
waitUntil {sleep 0.1; !(alive _obj && captive _obj)};
|
||||
|
||||
[_taskId, "SUCCEEDED"] call BIS_fnc_taskSetState;
|
||||
|
||||
true
|
||||
1023
kp_liberation.brf_sumava/scripts/client/tutorial/fn_tutorial.fsm
Normal file
1023
kp_liberation.brf_sumava/scripts/client/tutorial/fn_tutorial.fsm
Normal file
File diff suppressed because it is too large
Load Diff
275
kp_liberation.brf_sumava/scripts/client/ui/cinematic_camera.sqf
Normal file
275
kp_liberation.brf_sumava/scripts/client/ui/cinematic_camera.sqf
Normal file
@@ -0,0 +1,275 @@
|
||||
if ( isNil "active_sectors" ) then { active_sectors = [] };
|
||||
if ( isNil "GRLIB_all_fobs" ) then { GRLIB_all_fobs = [] };
|
||||
|
||||
cinematic_camera_started = true;
|
||||
private _last_transition = -1;
|
||||
private _last_position = [ -1, -1, -1 ];
|
||||
|
||||
showCinemaBorder true;
|
||||
private _cinematic_camera = "camera" camCreate [0,0,0];
|
||||
private _cinematic_pointer = "Sign_Arrow_Blue_F" createVehicleLocal [0,0,0];
|
||||
_cinematic_pointer hideObject true;
|
||||
_cinematic_camera camSetTarget _cinematic_pointer;
|
||||
_cinematic_camera cameraEffect ["internal","back"];
|
||||
_cinematic_camera camcommit 0;
|
||||
if ( isNil "first_camera_round" ) then { first_camera_round = true; };
|
||||
|
||||
while { cinematic_camera_started } do {
|
||||
|
||||
waitUntil { !cinematic_camera_started || camCommitted _cinematic_camera };
|
||||
|
||||
if ( cinematic_camera_started ) then {
|
||||
camUseNVG false;
|
||||
|
||||
private _positions = [ getpos startbase ];
|
||||
if ( !first_camera_round ) then {
|
||||
|
||||
if ( count GRLIB_all_fobs > 0 ) then {
|
||||
for [ {_idx=0},{_idx < 2},{_idx=_idx+1} ] do {
|
||||
_positions pushback (selectRandom GRLIB_all_fobs);
|
||||
};
|
||||
};
|
||||
|
||||
if ( count active_sectors > 0 ) then {
|
||||
for [ {_idx=0},{_idx < 5},{_idx=_idx+1} ] do {
|
||||
_positions pushback (markerPos (selectRandom active_sectors));
|
||||
};
|
||||
} else {
|
||||
for [ {_idx=0},{_idx < 5},{_idx=_idx+1} ] do {
|
||||
_positions pushback (markerPos (selectRandom sectors_allSectors));
|
||||
};
|
||||
};
|
||||
|
||||
if ( GRLIB_endgame == 0 ) then {
|
||||
_activeplayers = (allPlayers select {alive _x && (_x distance (markerPos GRLIB_respawn_marker)) > 100});
|
||||
if ( count _activeplayers > 0 ) then {
|
||||
for [ {_idx=0},{_idx < 3},{_idx=_idx+1} ] do {
|
||||
_positions pushback (getpos (selectRandom _activeplayers));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
_position = selectRandom (_positions - [_last_position]);
|
||||
_last_position = _position;
|
||||
_cinematic_pointer setpos [ _position select 0, _position select 1, (_position select 2) + 7 ];
|
||||
private _nearentities = _position nearEntities [ "Man", 100 ];
|
||||
private _camtarget = _cinematic_pointer;
|
||||
if ( first_camera_round ) then {
|
||||
_camtarget = startbase;
|
||||
} else {
|
||||
if (count (_nearentities select {alive _x && isPlayer _x}) != 0) then {
|
||||
_camtarget = selectRandom (_nearentities select {alive _x && isPlayer _x});
|
||||
} else {
|
||||
if (count (_nearentities select { alive _x }) != 0) then {
|
||||
_camtarget = selectRandom (_nearentities select {alive _x});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_cinematic_camera camSetTarget _camtarget;
|
||||
private _startpos = [ ((getpos _camtarget) select 0) - 60, ((getpos _camtarget) select 1) + 350, 5 ];
|
||||
private _endpos = [ ((getpos _camtarget) select 0) - 60, ((getpos _camtarget) select 1) - 230, 5 ];
|
||||
private _startfov = 0.5;
|
||||
private _endfov = 0.5;
|
||||
|
||||
if ( !first_camera_round ) then {
|
||||
_startfov = 0.8;
|
||||
_endfov = 0.8;
|
||||
|
||||
_next_transition = selectRandom ([0, 1, 2, 3, 4, 5, 6, 7 ,8 ,9 ,10, 11 ,12 ,13 ,14, 15] - [_last_transition]);
|
||||
_last_transition = _next_transition;
|
||||
|
||||
switch ( _next_transition ) do {
|
||||
case 0: {
|
||||
_startpos = [ ((getpos _camtarget) select 0) - 30, ((getpos _camtarget) select 1) - 50, 15 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) - 30, ((getpos _camtarget) select 1) + 50, 15 ];
|
||||
_endfov = 0.8;
|
||||
};
|
||||
|
||||
case 1: {
|
||||
_startpos = [ ((getpos _camtarget) select 0) + 5, ((getpos _camtarget) select 1) - 100, 1 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) + 5, ((getpos _camtarget) select 1) + 100, 40 ];
|
||||
_endfov = 0.55;
|
||||
};
|
||||
|
||||
case 2: {
|
||||
_startpos = [ ((getpos _camtarget) select 0) + 50, ((getpos _camtarget) select 1) - 50, 100 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) + 50, ((getpos _camtarget) select 1) + 50, 100 ];
|
||||
_startfov = 0.5;
|
||||
_endfov = 0.3;
|
||||
};
|
||||
|
||||
case 3: {
|
||||
_startpos = [ ((getpos _camtarget) select 0) + 50, ((getpos _camtarget) select 1) - 80, 2 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) + 50, ((getpos _camtarget) select 1) + 80, 20 ];
|
||||
};
|
||||
|
||||
case 4: {
|
||||
_startpos = [ ((getpos _camtarget) select 0) - 400, ((getpos _camtarget) select 1) + 400, 50 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) + 400, ((getpos _camtarget) select 1) + 400, 50 ];
|
||||
_startfov = 0.25;
|
||||
_endfov = 0.25;
|
||||
};
|
||||
|
||||
case 5: {
|
||||
_startpos = [ ((getpos _camtarget) select 0) + 300, ((getpos _camtarget) select 1) - 100, 15 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) -300, ((getpos _camtarget) select 1) - 120, 15 ];
|
||||
};
|
||||
|
||||
case 6: {
|
||||
_startpos = [ ((getpos _camtarget) select 0) + 100, ((getpos _camtarget) select 1) - 100, 1 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) + 100, ((getpos _camtarget) select 1) - 100, 50 ];
|
||||
};
|
||||
|
||||
case 7: {
|
||||
_startpos = [ ((getpos _camtarget) select 0) + 50, ((getpos _camtarget) select 1) - 50, 150 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) + 20, ((getpos _camtarget) select 1) - 20, 5 ];
|
||||
_startfov = 0.6;
|
||||
_endfov = 0.9;
|
||||
};
|
||||
|
||||
case 8: {
|
||||
_startpos = [ ((getpos _camtarget) select 0) - 300, ((getpos _camtarget) select 1) - 80, 20 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) + 300, ((getpos _camtarget) select 1) + 120, 20 ];
|
||||
_startfov = 0.55;
|
||||
_endfov = 0.55;
|
||||
};
|
||||
|
||||
case 9: {
|
||||
_startpos = [ ((getpos _camtarget) select 0) - 80, ((getpos _camtarget) select 1) - 300, 30 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) + 120, ((getpos _camtarget) select 1) + 300, 30 ];
|
||||
_startfov = 0.65;
|
||||
_endfov = 0.65;
|
||||
};
|
||||
|
||||
case 10: {
|
||||
_startpos = [ ((getpos _camtarget) select 0) - 5, ((getpos _camtarget) select 1) + 30, 5 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) - 25, ((getpos _camtarget) select 1) -30, 150 ];
|
||||
};
|
||||
|
||||
case 11 : {
|
||||
_cinematic_camera cameraEffect ["Terminate", "BACK"];
|
||||
camDestroy _cinematic_camera;
|
||||
_cinematic_camera = "camera" camCreate [0,0,0];
|
||||
_cinematic_camera cameraEffect ["internal","back"];
|
||||
_cinematic_camera camcommit 0;
|
||||
_startpos = [ ((getpos _camtarget) select 0) + 2, ((getpos _camtarget) select 1) -200, 25 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) + 2, ((getpos _camtarget) select 1) +200, 25 ];
|
||||
_cinematic_camera setDir 0;
|
||||
[ _cinematic_camera, -30, 0 ] call BIS_fnc_setPitchBank;
|
||||
};
|
||||
|
||||
case 12 : {
|
||||
_cinematic_camera cameraEffect ["Terminate", "BACK"];
|
||||
camDestroy _cinematic_camera;
|
||||
_cinematic_camera = "camera" camCreate [0,0,0];
|
||||
_cinematic_camera cameraEffect ["internal","back"];
|
||||
_cinematic_camera camcommit 0;
|
||||
_startpos = [ ((getpos _camtarget) select 0) + 302 , ((getpos _camtarget) select 1) + 300, 50 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) - 198, ((getpos _camtarget) select 1) - 200, 50 ];
|
||||
_cinematic_camera setDir 225;
|
||||
[ _cinematic_camera, -25, 0 ] call BIS_fnc_setPitchBank;
|
||||
};
|
||||
|
||||
case 13 : {
|
||||
_cinematic_camera cameraEffect ["Terminate", "BACK"];
|
||||
camDestroy _cinematic_camera;
|
||||
_cinematic_camera = "camera" camCreate [0,0,0];
|
||||
_cinematic_camera cameraEffect ["internal","back"];
|
||||
_cinematic_camera camcommit 0;
|
||||
_startpos = [ ((getpos _camtarget) select 0) - 80 , ((getpos _camtarget) select 1) + 150, 20 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) - 80, ((getpos _camtarget) select 1) - 150, 20 ];
|
||||
_cinematic_camera setDir 90;
|
||||
[ _cinematic_camera, -15, 0 ] call BIS_fnc_setPitchBank;
|
||||
};
|
||||
|
||||
case 14 : {
|
||||
_cinematic_camera cameraEffect ["Terminate", "BACK"];
|
||||
camDestroy _cinematic_camera;
|
||||
_cinematic_camera = "camera" camCreate [0,0,0];
|
||||
_cinematic_camera cameraEffect ["internal","back"];
|
||||
_cinematic_camera camcommit 0;
|
||||
_startpos = [ ((getpos _camtarget) select 0) - 50 , ((getpos _camtarget) select 1) + 2, 30 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) + 150, ((getpos _camtarget) select 1) - 2, 30 ];
|
||||
_cinematic_camera setDir 270;
|
||||
[ _cinematic_camera, -20, 0 ] call BIS_fnc_setPitchBank;
|
||||
_startfov = 0.55;
|
||||
_endfov = 0.55;
|
||||
};
|
||||
|
||||
case 15 : {
|
||||
_cinematic_camera cameraEffect ["Terminate", "BACK"];
|
||||
camDestroy _cinematic_camera;
|
||||
_cinematic_camera = "camera" camCreate [0,0,0];
|
||||
_cinematic_camera cameraEffect ["internal","back"];
|
||||
_cinematic_camera camcommit 0;
|
||||
_startpos = [ ((getpos _camtarget) select 0) - 150 , ((getpos _camtarget) select 1) + 5, 250 ];
|
||||
_endpos = [ ((getpos _camtarget) select 0) + 150, ((getpos _camtarget) select 1) + 5, 250 ];
|
||||
_cinematic_camera setDir 0;
|
||||
[ _cinematic_camera, -88, 0 ] call BIS_fnc_setPitchBank;
|
||||
_startfov = 0.3;
|
||||
_endfov = 0.3;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
if ( surfaceIsWater _position ) then {
|
||||
_startpos = [ _startpos select 0, _startpos select 1, (_startpos select 2) + 25 ];
|
||||
_endpos = [ _endpos select 0, _endpos select 1, (_endpos select 2) + 25 ];
|
||||
};
|
||||
|
||||
while { terrainIntersect [ _startpos, _endpos ] } do {
|
||||
_startpos = [ _startpos select 0, _startpos select 1, (_startpos select 2) + 30 ];
|
||||
_endpos = [ _endpos select 0, _endpos select 1, (_endpos select 2) + 30 ];
|
||||
};
|
||||
|
||||
_cinematic_camera camSetPos _startpos;
|
||||
_cinematic_camera camSetFov _startfov;
|
||||
_cinematic_camera camCommit 0;
|
||||
_cinematic_camera camSetPos _endpos;
|
||||
_cinematic_camera camSetFov _endfov;
|
||||
|
||||
if ( isNil "howtoplay" ) then { howtoplay = 0; };
|
||||
|
||||
if ( first_camera_round ) then {
|
||||
_cinematic_camera camcommit 18;
|
||||
} else {
|
||||
if ( howtoplay == 0 ) then {
|
||||
_cinematic_camera camcommit 10;
|
||||
} else {
|
||||
_cinematic_camera camcommit 20;
|
||||
};
|
||||
};
|
||||
first_camera_round = false;
|
||||
|
||||
if ( !isNil "showcaminfo" ) then {
|
||||
if ( showcaminfo && howtoplay == 0 ) then {
|
||||
private _unitname = "";
|
||||
if ( isPlayer _camtarget ) then { _unitname = name _camtarget };
|
||||
private _nearest_sector = "";
|
||||
if ( _position distance startbase < 300 ) then {
|
||||
_nearest_sector = "BEGIN OF OPERATION";
|
||||
} else {
|
||||
_nearest_sector = [300, _position ] call KPLIB_fnc_getNearestSector;
|
||||
if ( _nearest_sector != "" ) then {
|
||||
_nearest_sector = markertext _nearest_sector;
|
||||
} else {
|
||||
_nearfobs = GRLIB_all_fobs select {_x distance _position < 300};
|
||||
if ( count _nearfobs > 0 ) then {
|
||||
_nearest_sector = format [ "FOB %1", military_alphabet select ( GRLIB_all_fobs find ( _nearfobs select 0 ) ) ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
[ format [ "<t size='0.7' align='left'>%1<br/>%2</t>", _unitname, _nearest_sector ],1,0.8,6,1 ] spawn BIS_fnc_dynamictext;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_cinematic_camera cameraEffect ["Terminate", "BACK"];
|
||||
camDestroy _cinematic_camera;
|
||||
camUseNVG false;
|
||||
cinematic_camera_stop = true;
|
||||
154
kp_liberation.brf_sumava/scripts/client/ui/end_screen.sqf
Normal file
154
kp_liberation.brf_sumava/scripts/client/ui/end_screen.sqf
Normal file
@@ -0,0 +1,154 @@
|
||||
params [
|
||||
"_stats_ammo_produced",
|
||||
"_stats_ammo_spent",
|
||||
"_stats_blufor_soldiers_killed",
|
||||
"_stats_blufor_soldiers_recruited",
|
||||
"_stats_blufor_teamkills",
|
||||
"_stats_blufor_vehicles_built",
|
||||
"_stats_blufor_vehicles_killed",
|
||||
"_stats_civilian_buildings_destroyed",
|
||||
"_stats_civilian_vehicles_killed",
|
||||
"_stats_civilian_vehicles_killed_by_players",
|
||||
"_stats_civilian_vehicles_seized",
|
||||
"_stats_civilians_healed",
|
||||
"_stats_civilians_killed",
|
||||
"_stats_civilians_killed_by_players",
|
||||
"_stats_fobs_built",
|
||||
"_stats_fobs_lost",
|
||||
"_stats_fuel_produced",
|
||||
"_stats_fuel_spent",
|
||||
"_stats_hostile_battlegroups",
|
||||
"_stats_ieds_detonated",
|
||||
"_stats_opfor_killed_by_players",
|
||||
"_stats_opfor_soldiers_killed",
|
||||
"_stats_opfor_vehicles_killed",
|
||||
"_stats_opfor_vehicles_killed_by_players",
|
||||
"_stats_player_deaths",
|
||||
"_stats_playtime",
|
||||
"_stats_prisoners_captured",
|
||||
"_stats_readiness_earned",
|
||||
"_stats_reinforcements_called",
|
||||
"_stats_resistance_killed",
|
||||
"_stats_resistance_teamkills",
|
||||
"_stats_resistance_teamkills_by_players",
|
||||
"_stats_secondary_objectives",
|
||||
"_stats_sectors_liberated",
|
||||
"_stats_sectors_lost",
|
||||
"_stats_spartan_respawns",
|
||||
"_stats_supplies_produced",
|
||||
"_stats_supplies_spent",
|
||||
"_stats_vehicles_recycled",
|
||||
"_stats_rabbits_killed"
|
||||
];
|
||||
|
||||
// Some preparations
|
||||
if (isNil "cinematic_camera_started") then {cinematic_camera_started = false};
|
||||
private _line_delay = 0.75;
|
||||
private _page_delay = 5;
|
||||
private _addReportLine = {
|
||||
params [
|
||||
"_control",
|
||||
"_string",
|
||||
["_pageEnd", false, [false]]
|
||||
];
|
||||
|
||||
if (dialog) then {
|
||||
[_control, _string] call write_credit_line;
|
||||
sleep ([_line_delay, _page_delay] select _pageEnd);
|
||||
};
|
||||
};
|
||||
private _cleanPage = {
|
||||
if (dialog) then {
|
||||
ctrlSetText [691, ""];
|
||||
ctrlSetText [692, ""];
|
||||
ctrlSetText [693, ""];
|
||||
ctrlSetText [694, ""];
|
||||
ctrlSetText [695, ""];
|
||||
ctrlSetText [696, ""];
|
||||
sleep 2;
|
||||
};
|
||||
};
|
||||
|
||||
// Calculate the playtime
|
||||
private _playtime_days = floor (_stats_playtime / 86400);
|
||||
private _playtime_hours = floor ((_stats_playtime % 86400) / 3600);
|
||||
private _playtime_minutes = floor ((_stats_playtime % 3600) / 60);
|
||||
private _playtime_seconds = _stats_playtime % 60;
|
||||
|
||||
[] spawn cinematic_camera;
|
||||
|
||||
private _dialog = createDialog "liberation_endscreen";
|
||||
waitUntil {dialog};
|
||||
if (dialog) then {sleep 3};
|
||||
|
||||
// Playtime line
|
||||
[690, format [localize "STR_STATS_PLAYTIME", _playtime_days, _playtime_hours, _playtime_minutes, _playtime_seconds]] call _addReportLine;
|
||||
if (dialog) then {sleep 3};
|
||||
|
||||
// First page
|
||||
[691, format [localize "STR_STATS_OPFOR_K_INF", _stats_opfor_soldiers_killed]] call _addReportLine;
|
||||
[692, format [localize "STR_STATS_OPFOR_K_INF_PL", _stats_opfor_killed_by_players]] call _addReportLine;
|
||||
[693, format [localize "STR_STATS_OPFOR_K_VEH", _stats_opfor_vehicles_killed]] call _addReportLine;
|
||||
[694, format [localize "STR_STATS_OPFOR_K_VEH_PL", _stats_opfor_vehicles_killed_by_players], true] call _addReportLine;
|
||||
[] call _cleanPage;
|
||||
|
||||
// Second page
|
||||
[691, format [localize "STR_STATS_BLUFOR_B_INF", _stats_blufor_soldiers_recruited]] call _addReportLine;
|
||||
[692, format [localize "STR_STATS_BLUFOR_K_INF", _stats_blufor_soldiers_killed]] call _addReportLine;
|
||||
[693, format [localize "STR_STATS_BLUFOR_B_VEH", _stats_blufor_vehicles_built]] call _addReportLine;
|
||||
[694, format [localize "STR_STATS_BLUFOR_K_VEH", _stats_blufor_vehicles_killed]] call _addReportLine;
|
||||
[695, format [localize "STR_STATS_BLUFOR_K_PL", _stats_player_deaths]] call _addReportLine;
|
||||
[696, format [localize "STR_STATS_BLUFOR_TK", _stats_blufor_teamkills], true] call _addReportLine;
|
||||
[] call _cleanPage;
|
||||
|
||||
// Third page
|
||||
[691, format [localize "STR_STATS_GUE_K_INF", _stats_resistance_killed]] call _addReportLine;
|
||||
[692, format [localize "STR_STATS_GUE_TK_INF", _stats_resistance_teamkills]] call _addReportLine;
|
||||
[693, format [localize "STR_STATS_GUE_TK_INF_PL", _stats_resistance_teamkills_by_players]] call _addReportLine;
|
||||
[694, format [localize "STR_STATS_CIV_K_INF", _stats_civilians_killed]] call _addReportLine;
|
||||
[695, format [localize "STR_STATS_CIV_K_INF_PL", _stats_civilians_killed_by_players]] call _addReportLine;
|
||||
[696, format [localize "STR_STATS_CIV_B_INF", _stats_civilians_healed], true] call _addReportLine;
|
||||
[] call _cleanPage;
|
||||
|
||||
// Fourth page
|
||||
[691, format [localize "STR_STATS_CIV_K_VEH", _stats_civilian_vehicles_killed]] call _addReportLine;
|
||||
[692, format [localize "STR_STATS_CIV_K_VEH_PL", _stats_civilian_vehicles_killed_by_players]] call _addReportLine;
|
||||
[693, format [localize "STR_STATS_CIV_S_VEH", _stats_civilian_vehicles_seized]] call _addReportLine;
|
||||
[694, format [localize "STR_STATS_CIV_K_BUILDINGS", _stats_civilian_buildings_destroyed]] call _addReportLine;
|
||||
[695, format [localize "STR_STATS_VEH_RECYCLED", _stats_vehicles_recycled], true] call _addReportLine;
|
||||
[] call _cleanPage;
|
||||
|
||||
// Fifth page
|
||||
[691, format [localize "STR_STATS_PROD_AMMO", _stats_ammo_produced]] call _addReportLine;
|
||||
[692, format [localize "STR_STATS_SPENT_AMMO", _stats_ammo_spent]] call _addReportLine;
|
||||
[693, format [localize "STR_STATS_PROD_FUEL", _stats_fuel_produced]] call _addReportLine;
|
||||
[694, format [localize "STR_STATS_SPENT_FUEL", _stats_fuel_spent]] call _addReportLine;
|
||||
[695, format [localize "STR_STATS_PROD_SUPPLY", _stats_supplies_produced]] call _addReportLine;
|
||||
[696, format [localize "STR_STATS_SPENT_SUPPLY", _stats_supplies_spent], true] call _addReportLine;
|
||||
[] call _cleanPage;
|
||||
|
||||
// Sixth page
|
||||
[691, format [localize "STR_STATS_SECTORS_CAPTURED", _stats_sectors_liberated]] call _addReportLine;
|
||||
[692, format [localize "STR_STATS_SECTORS_LOST", _stats_sectors_lost]] call _addReportLine;
|
||||
[693, format [localize "STR_STATS_FOBS_BUILT", _stats_fobs_built]] call _addReportLine;
|
||||
[694, format [localize "STR_STATS_FOBS_LOST", _stats_fobs_lost]] call _addReportLine;
|
||||
[695, format [localize "STR_STATS_SIDEMISSIONS", _stats_secondary_objectives]] call _addReportLine;
|
||||
[696, format [localize "STR_STATS_PRISONERS", _stats_prisoners_captured], true] call _addReportLine;
|
||||
[] call _cleanPage;
|
||||
|
||||
// Seventh page
|
||||
[691, format [localize "STR_STATS_BATTLEGROUPS", _stats_hostile_battlegroups]] call _addReportLine;
|
||||
[692, format [localize "STR_STATS_REINFORCEMENTS", _stats_reinforcements_called]] call _addReportLine;
|
||||
[693, format [localize "STR_STATS_COMBATREADINESS", round _stats_readiness_earned]] call _addReportLine;
|
||||
[694, format [localize "STR_STATS_IEDS", _stats_ieds_detonated]] call _addReportLine;
|
||||
[695, format [localize "STR_STATS_POTATO", _stats_spartan_respawns]] call _addReportLine;
|
||||
[696, format [localize "STR_STATS_RABBITS", _stats_rabbits_killed], true] call _addReportLine;
|
||||
[] call _cleanPage;
|
||||
|
||||
// Eighth page
|
||||
[693, localize "STR_STATS_END1"] call _addReportLine;
|
||||
[694, localize "STR_STATS_END2"] call _addReportLine;
|
||||
[696, localize "STR_STATS_END3"] call _addReportLine;
|
||||
|
||||
waitUntil {!dialog};
|
||||
cinematic_camera_started = false;
|
||||
28
kp_liberation.brf_sumava/scripts/client/ui/intro.sqf
Normal file
28
kp_liberation.brf_sumava/scripts/client/ui/intro.sqf
Normal file
@@ -0,0 +1,28 @@
|
||||
if ( isNil "cinematic_camera_started" ) then { cinematic_camera_started = false };
|
||||
sleep 0.5;
|
||||
waitUntil { time > 0 };
|
||||
|
||||
[] spawn cinematic_camera;
|
||||
|
||||
if ( GRLIB_introduction ) then {
|
||||
|
||||
sleep 1;
|
||||
cutRsc ["intro1","PLAIN",1,true];
|
||||
sleep 5.5;
|
||||
cutRsc ["intro2","PLAIN",1,true];
|
||||
sleep 10;
|
||||
|
||||
};
|
||||
|
||||
showcaminfo = true;
|
||||
dostartgame = 0;
|
||||
howtoplay = 0;
|
||||
private _dialog = createDialog "liberation_menu";
|
||||
waitUntil { dialog };
|
||||
waitUntil { dostartgame == 1 || howtoplay == 1 || !dialog };
|
||||
|
||||
closeDialog 0;
|
||||
if ( howtoplay == 0 ) then {
|
||||
cinematic_camera_started = false;
|
||||
};
|
||||
introDone = true;
|
||||
81
kp_liberation.brf_sumava/scripts/client/ui/secondary_ui.sqf
Normal file
81
kp_liberation.brf_sumava/scripts/client/ui/secondary_ui.sqf
Normal file
@@ -0,0 +1,81 @@
|
||||
if ( isNil "GRLIB_secondary_starting" ) then { GRLIB_secondary_starting = false; };
|
||||
if ( isNil "GRLIB_secondary_in_progress" ) then { GRLIB_secondary_in_progress = -1; };
|
||||
|
||||
_dialog = createDialog "liberation_secondary";
|
||||
dostartsecondary = 0;
|
||||
|
||||
waitUntil { dialog };
|
||||
|
||||
{
|
||||
lbAdd [ 101, localize _x ];
|
||||
} foreach [
|
||||
"STR_SECONDARY_MISSION0",
|
||||
"STR_SECONDARY_MISSION1",
|
||||
"STR_SECONDARY_MISSION2"
|
||||
];
|
||||
|
||||
private [ "_oldchoice", "_images", "_briefings", "_missioncost" ];
|
||||
|
||||
_images = [
|
||||
"res\secondary\fob_hunting.jpg",
|
||||
"res\secondary\convoy_hijack.jpg",
|
||||
"res\secondary\sar.jpg"
|
||||
];
|
||||
|
||||
_briefings = [
|
||||
"STR_SECONDARY_BRIEFING0",
|
||||
"STR_SECONDARY_BRIEFING1",
|
||||
"STR_SECONDARY_BRIEFING2"
|
||||
];
|
||||
|
||||
_oldchoice = -1;
|
||||
lbSetCurSel [ 101, 0 ];
|
||||
|
||||
while { dialog && alive player && dostartsecondary == 0 } do {
|
||||
|
||||
if ( _oldchoice != lbCurSel 101 ) then {
|
||||
_oldchoice = lbCurSel 101;
|
||||
ctrlSetText [ 106, _images select _oldchoice ];
|
||||
((findDisplay 6842) displayCtrl (102)) ctrlSetStructuredText parseText localize (_briefings select _oldchoice);
|
||||
};
|
||||
|
||||
_missioncost = GRLIB_secondary_missions_costs select _oldchoice;
|
||||
|
||||
if ( ( _missioncost <= resources_intel ) && ( !GRLIB_secondary_starting ) ) then {
|
||||
ctrlEnable [ 103, true ];
|
||||
((findDisplay 6842) displayCtrl (103)) ctrlSetTooltip "";
|
||||
} else {
|
||||
ctrlEnable [ 103, false ];
|
||||
if ( _missioncost > resources_intel ) then {
|
||||
((findDisplay 6842) displayCtrl (103)) ctrlSetTooltip (localize "STR_SECONDARY_NOT_ENOUGH_INTEL");
|
||||
};
|
||||
if ( GRLIB_secondary_starting ) then {
|
||||
((findDisplay 6842) displayCtrl (103)) ctrlSetTooltip (localize "STR_SECONDARY_IN_PROGRESS");
|
||||
};
|
||||
};
|
||||
|
||||
if ( GRLIB_secondary_in_progress >= 0 ) then {
|
||||
lbSetCurSel [ 101, GRLIB_secondary_in_progress ];
|
||||
ctrlEnable [ 101, false ];
|
||||
} else {
|
||||
ctrlEnable [ 101, true ];
|
||||
};
|
||||
|
||||
ctrlSetText [ 107, format [ localize "STR_SECONDARY_INTEL", resources_intel ] ];
|
||||
sleep 0.1;
|
||||
};
|
||||
|
||||
if ( dostartsecondary == 1 ) then {
|
||||
private _index = lbCurSel 101;
|
||||
if !(([2000,999999,false] call KPLIB_fnc_getOpforSpawnPoint) isEqualTo "") then {
|
||||
[_index] remoteExec ["start_secondary_remote_call", 2];
|
||||
} else {
|
||||
hint "There is not enough enemy territory left for secondary missions.";
|
||||
uiSleep 2;
|
||||
hintSilent "";
|
||||
}
|
||||
};
|
||||
|
||||
if ( dialog ) then {
|
||||
closeDialog 0;
|
||||
};
|
||||
249
kp_liberation.brf_sumava/scripts/client/ui/squad_management.sqf
Normal file
249
kp_liberation.brf_sumava/scripts/client/ui/squad_management.sqf
Normal file
@@ -0,0 +1,249 @@
|
||||
private [ "_dialog", "_membercount", "_memberselection", "_unitname", "_selectedmember", "_cfgVehicles", "_cfgWeapons", "_primary_mags", "_secondary_mags", "_vehstring", "_nearfob", "_fobdistance", "_nearsquad", "_tempgmp", "_destpos", "_destdir", "_resupplied","_firstloop", "_squad_camera", "_targetobject", "_isvehicle" ];
|
||||
|
||||
GRLIB_squadaction = -1;
|
||||
GRLIB_squadconfirm = -1;
|
||||
_membercount = -1;
|
||||
_resupplied = false;
|
||||
_memberselection = -1;
|
||||
_selectedmember = objNull;
|
||||
_dialog = createDialog "liberation_squad";
|
||||
_cfgVehicles = configFile >> "cfgVehicles";
|
||||
_cfgWeapons = configFile >> "cfgWeapons";
|
||||
_firstloop = true;
|
||||
_isvehicle = false;
|
||||
|
||||
waitUntil { dialog };
|
||||
|
||||
|
||||
_targetobject = "Sign_Sphere100cm_F" createVehicleLocal [ 0, 0, 0 ];
|
||||
hideObject _targetobject;
|
||||
|
||||
_squad_camera = "camera" camCreate (getpos player);
|
||||
_squad_camera cameraEffect ["internal","back", "rtt"];
|
||||
_squad_camera camSetTarget _targetobject;
|
||||
_squad_camera camcommit 0;
|
||||
"rtt" setPiPEffect [0];
|
||||
|
||||
while { dialog && alive player } do {
|
||||
|
||||
if ( { alive _x } count (units group player) != _membercount ) then {
|
||||
|
||||
_membercount = { alive _x } count (units group player);
|
||||
|
||||
lbClear 101;
|
||||
{
|
||||
if ( alive _x ) then {
|
||||
_unitname = format ["%1. ", [ _x ] call KPLIB_fnc_getUnitPositionId];
|
||||
if(isPlayer _x) then {
|
||||
if ( count (squadParams _x ) != 0) then {
|
||||
_unitname = "[" + ((squadParams _x select 0) select 0) + "] ";
|
||||
};
|
||||
};
|
||||
_unitname = _unitname + ( name _x );
|
||||
lbAdd [ 101, _unitname ];
|
||||
};
|
||||
} foreach (units group player);
|
||||
|
||||
if ( _firstloop ) then {
|
||||
lbSetCurSel [ 101, 0 ];
|
||||
_firstloop = false;
|
||||
};
|
||||
};
|
||||
|
||||
_selectedmember = objNull;
|
||||
if ( lbCurSel 101 != -1 && (count (units group player ) > lbCurSel 101 ) ) then {
|
||||
_selectedmember = (units group player) select (lbCurSel 101);
|
||||
};
|
||||
|
||||
if ( !(isNull _selectedmember) ) then {
|
||||
"spawn_marker" setMarkerPosLocal (getpos _selectedmember);
|
||||
ctrlMapAnimClear ((findDisplay 5155) displayCtrl 100);
|
||||
((findDisplay 5155) displayCtrl 100) ctrlMapAnimAdd [0, 0.3, getpos _selectedmember];
|
||||
ctrlMapAnimCommit ((findDisplay 5155) displayCtrl 100);
|
||||
};
|
||||
|
||||
if ( !(isNull _selectedmember) ) then {
|
||||
if ( _memberselection != lbCurSel 101 || _resupplied || ( ( vehicle _selectedmember == _selectedmember && _isvehicle ) || ( vehicle _selectedmember != _selectedmember && !_isvehicle ) ) ) then {
|
||||
_memberselection = lbCurSel 101;
|
||||
_resupplied = false;
|
||||
|
||||
if (vehicle _selectedmember == _selectedmember) then {
|
||||
_targetobject attachTo [ _selectedmember, [0, 10, 0.05], "neck" ];
|
||||
_squad_camera attachTo [ _selectedmember, [0, 0.25, 0.05], "neck" ];
|
||||
_isvehicle = false;
|
||||
} else {
|
||||
_targetobject attachTo [ vehicle _selectedmember, [0, 20, 2]];
|
||||
_squad_camera attachTo [ vehicle _selectedmember, [0, 0, 2]];
|
||||
_isvehicle = true;
|
||||
};
|
||||
_squad_camera camcommit 0;
|
||||
|
||||
_unitname = format ["%1. ", [ _selectedmember ] call KPLIB_fnc_getUnitPositionId];
|
||||
if(isPlayer _selectedmember) then {
|
||||
if ( count (squadParams _selectedmember ) != 0) then {
|
||||
_unitname = "[" + ((squadParams _selectedmember select 0) select 0) + "] ";
|
||||
};
|
||||
};
|
||||
_unitname = _unitname + ( name _selectedmember );
|
||||
ctrlSetText [ 201, _unitname];
|
||||
|
||||
ctrlSetText [ 202, getText (_cfgVehicles >> (typeof _selectedmember) >> "displayName") ];
|
||||
ctrlSetText [ 203, format ["%1 %2%3", localize 'STR_HEALTH', round (100 - ((damage _selectedmember) * 100)), '%' ] ];
|
||||
|
||||
((findDisplay 5155) displayCtrl 203) ctrlSetTextColor [1,1,1,1];
|
||||
if ( damage _selectedmember > 0.4 ) then { ((findDisplay 5155) displayCtrl 203) ctrlSetTextColor [1,1,0,1]; };
|
||||
if ( damage _selectedmember > 0.6 ) then { ((findDisplay 5155) displayCtrl 203) ctrlSetTextColor [1,0.5,0,1]; };
|
||||
if ( damage _selectedmember > 0.8 ) then { ((findDisplay 5155) displayCtrl 203) ctrlSetTextColor [1,0,0,1]; };
|
||||
|
||||
ctrlSetText [ 204, format ["%1 %2m", localize 'STR_DISTANCE', round (player distance _selectedmember) ] ];
|
||||
|
||||
if ( primaryWeapon _selectedmember != "") then {
|
||||
ctrlSetText [ 205, format ["%1: %2", localize 'STR_PRIMARY_WEAPON', getText (_cfgWeapons >> (primaryWeapon _selectedmember) >> "displayName") ] ];
|
||||
|
||||
_primary_mags = 0;
|
||||
if ( count primaryWeaponMagazine _selectedmember > 0 ) then {
|
||||
_primary_mags = 1;
|
||||
{ if ( ( _x select 0 ) == ( ( primaryWeaponMagazine _selectedmember ) select 0 ) ) then { _primary_mags = _primary_mags + 1; } } foreach (magazinesAmmo _selectedmember);
|
||||
};
|
||||
|
||||
ctrlSetText [ 206, format ["%1: %2", localize 'STR_AMMO', _primary_mags ] ];
|
||||
} else {
|
||||
ctrlSetText [ 205, format ["%1: %2", localize 'STR_PRIMARY_WEAPON', localize 'STR_NONE' ] ];
|
||||
ctrlSetText [ 206, format ["%1: %2", localize 'STR_AMMO', 0 ] ];
|
||||
};
|
||||
|
||||
if ( secondaryWeapon _selectedmember != "") then {
|
||||
ctrlSetText [ 207, format ["%1: %2", localize 'STR_SECONDARY_WEAPON', getText (_cfgWeapons >> (secondaryWeapon _selectedmember) >> "displayName") ] ];
|
||||
|
||||
_secondary_mags = 0;
|
||||
if ( count secondaryWeaponMagazine _selectedmember > 0 ) then {
|
||||
_secondary_mags = 1;
|
||||
{ if ( ( _x select 0 ) == ( ( secondaryWeaponMagazine _selectedmember ) select 0 ) ) then { _secondary_mags = _secondary_mags + 1; } } foreach (magazinesAmmo _selectedmember);
|
||||
};
|
||||
|
||||
ctrlSetText [ 208, format ["%1: %2", localize 'STR_AMMO', _secondary_mags ] ];
|
||||
} else {
|
||||
ctrlSetText [ 207, format ["%1: %2", localize 'STR_SECONDARY_WEAPON', localize 'STR_NONE' ] ];
|
||||
ctrlSetText [ 208, format ["%1: %2", localize 'STR_AMMO', 0 ] ];
|
||||
};
|
||||
|
||||
if ( vehicle _selectedmember == _selectedmember ) then {
|
||||
ctrlSetText [ 209, "" ];
|
||||
} else {
|
||||
_vehstring = localize 'STR_PASSENGER';
|
||||
if (driver vehicle _selectedmember == _selectedmember ) then { _vehstring = localize 'STR_DRIVER'; };
|
||||
if (gunner vehicle _selectedmember == _selectedmember ) then { _vehstring = localize 'STR_GUNNER'; };
|
||||
if (commander vehicle _selectedmember == _selectedmember ) then { _vehstring = localize 'STR_COMMANDER'; };
|
||||
_vehstring = _vehstring + format [ " (%1)", getText (_cfgVehicles >> (typeof vehicle _selectedmember) >> "displayName") ];
|
||||
ctrlSetText [ 209, _vehstring ];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
{ ctrlSetText [ _x, "" ] } foreach [ 201, 202, 203, 204, 205, 206, 207, 208, 209 ];
|
||||
GRLIB_squadconfirm = -1;
|
||||
GRLIB_squadaction = -1;
|
||||
};
|
||||
|
||||
if ( GRLIB_squadaction == -1 ) then {
|
||||
ctrlEnable [ 213, false ];
|
||||
ctrlEnable [ 214, false ];
|
||||
if ( !(isPlayer _selectedmember) && (vehicle _selectedmember == _selectedmember) ) then {
|
||||
ctrlEnable [ 210, true ];
|
||||
if ( leader group player == player ) then {
|
||||
ctrlEnable [ 211, true ];
|
||||
};
|
||||
ctrlEnable [ 212, true ];
|
||||
} else {
|
||||
ctrlEnable [ 210, false ];
|
||||
ctrlEnable [ 211, false ];
|
||||
ctrlEnable [ 212, false ];
|
||||
};
|
||||
} else {
|
||||
ctrlEnable [ 210, false ];
|
||||
ctrlEnable [ 211, false ];
|
||||
ctrlEnable [ 212, false ];
|
||||
ctrlEnable [ 213, true ];
|
||||
ctrlEnable [ 214, true ];
|
||||
};
|
||||
|
||||
if( GRLIB_squadconfirm == 0 ) then {
|
||||
GRLIB_squadconfirm = -1;
|
||||
GRLIB_squadaction = -1;
|
||||
};
|
||||
|
||||
if ( GRLIB_squadconfirm == 1 ) then {
|
||||
GRLIB_squadconfirm = -1;
|
||||
|
||||
if ( GRLIB_squadaction == 1 ) then {
|
||||
|
||||
_nearfob = [ getpos _selectedmember ] call KPLIB_fnc_getNearestFob;
|
||||
_fobdistance = 9999;
|
||||
if ( count _nearfob == 3 ) then {
|
||||
_fobdistance = _selectedmember distance _nearfob;
|
||||
};
|
||||
|
||||
_nearsquad = (getPos _selectedmember) nearEntities [KPLIB_aiResupplySources, 30];
|
||||
|
||||
if ( _fobdistance < 100 || count _nearsquad > 0 ) then {
|
||||
|
||||
_tempgmp = createGroup [GRLIB_side_friendly, true];
|
||||
(typeof _selectedmember) createUnit [ markers_reset, _tempgmp,''];
|
||||
[ (units _tempgmp) select 0, _selectedmember ] call KPLIB_fnc_swapInventory;
|
||||
deleteVehicle ((units _tempgmp) select 0);
|
||||
_selectedmember setDamage 0;
|
||||
|
||||
hint localize 'STR_RESUPPLY_OK';
|
||||
_resupplied = true;
|
||||
} else {
|
||||
hint localize 'STR_RESUPPLY_KO';
|
||||
};
|
||||
};
|
||||
|
||||
if (GRLIB_squadaction == 2) then {
|
||||
deleteVehicle _selectedmember;
|
||||
_resupplied = true;
|
||||
hint localize 'STR_REMOVE_OK';
|
||||
};
|
||||
|
||||
if (GRLIB_squadaction == 3) then {
|
||||
|
||||
closeDialog 0;
|
||||
|
||||
if ( primaryWeapon player == "" && secondaryWeapon player == "" ) then {
|
||||
[ _selectedmember, player ] call KPLIB_fnc_swapInventory;
|
||||
};
|
||||
|
||||
_destpos = getposATL _selectedmember;
|
||||
_destdir = getdir _selectedmember;
|
||||
|
||||
if ( damage _selectedmember > 0.4 ) then {
|
||||
if ( damage _selectedmember < 0.7 ) then {
|
||||
player setDamage (damage _selectedmember);
|
||||
} else {
|
||||
player setDamage 0.7;
|
||||
};
|
||||
};
|
||||
|
||||
deleteVehicle _selectedmember;
|
||||
sleep 0.01;
|
||||
|
||||
player setPosATL _destpos;
|
||||
player setDir _destdir;
|
||||
|
||||
sleep 0.01;
|
||||
|
||||
[ localize 'STR_SQUAD_DEPLOY' ] spawn spawn_camera;
|
||||
|
||||
};
|
||||
|
||||
GRLIB_squadaction = -1;
|
||||
|
||||
};
|
||||
|
||||
sleep 0.1;
|
||||
};
|
||||
|
||||
"spawn_marker" setMarkerPosLocal markers_reset;
|
||||
_squad_camera cameraEffect ["terminate","back"];
|
||||
camDestroy _squad_camera;
|
||||
deleteVehicle _targetobject;
|
||||
@@ -0,0 +1,65 @@
|
||||
private [ "_tutorial_titles", "_tutorial_pages", "_current_page", "_old_page", "_dialog" ];
|
||||
|
||||
if ( isNil "howtoplay" ) then { howtoplay = 0; };
|
||||
|
||||
_tutorial_titles = [
|
||||
localize "STR_TUTO_TITLE1",
|
||||
localize "STR_TUTO_TITLE2",
|
||||
localize "STR_TUTO_TITLE3",
|
||||
localize "STR_TUTO_TITLE4",
|
||||
localize "STR_TUTO_TITLE5",
|
||||
localize "STR_TUTO_TITLE6",
|
||||
localize "STR_TUTO_TITLE7",
|
||||
localize "STR_TUTO_TITLE8",
|
||||
localize "STR_TUTO_TITLE9",
|
||||
localize "STR_TUTO_TITLE10"
|
||||
];
|
||||
|
||||
_tutorial_pages = [
|
||||
"STR_TUTO_TEXT1",
|
||||
"STR_TUTO_TEXT2",
|
||||
"STR_TUTO_TEXT3",
|
||||
"STR_TUTO_TEXT4",
|
||||
"STR_TUTO_TEXT5",
|
||||
"STR_TUTO_TEXT6",
|
||||
"STR_TUTO_TEXT7",
|
||||
"STR_TUTO_TEXT8",
|
||||
"STR_TUTO_TEXT9",
|
||||
"STR_TUTO_TEXT10"
|
||||
];
|
||||
|
||||
_current_page = 0;
|
||||
_old_page = -99;
|
||||
|
||||
while { true } do {
|
||||
waitUntil { sleep 0.3; howtoplay == 1 };
|
||||
waitUntil { !dialog };
|
||||
sleep 0.1;
|
||||
|
||||
_dialog = createDialog "liberation_tutorial";
|
||||
if ( !cinematic_camera_started ) then {
|
||||
[] spawn cinematic_camera;
|
||||
};
|
||||
|
||||
waitUntil { dialog };
|
||||
|
||||
{
|
||||
lbAdd [ 513, _x];
|
||||
} foreach _tutorial_titles;
|
||||
|
||||
lbSetCurSel [ 513, 0 ];
|
||||
|
||||
while { howtoplay == 1 && alive player && dialog } do {
|
||||
_current_page = lbCurSel 513;
|
||||
if ( _current_page != _old_page ) then {
|
||||
ctrlSetText [ 514, _tutorial_titles select _current_page ];
|
||||
((findDisplay 5353) displayCtrl (515)) ctrlSetStructuredText parseText localize (_tutorial_pages select _current_page);
|
||||
_old_page = _current_page;
|
||||
};
|
||||
sleep 0.2;
|
||||
};
|
||||
if ( dialog ) then { closeDialog 0 };
|
||||
|
||||
cinematic_camera_started = false;
|
||||
howtoplay = 0;
|
||||
}
|
||||
177
kp_liberation.brf_sumava/scripts/client/ui/ui_manager.sqf
Normal file
177
kp_liberation.brf_sumava/scripts/client/ui/ui_manager.sqf
Normal file
@@ -0,0 +1,177 @@
|
||||
scriptName "KPLIB_uiManager";
|
||||
|
||||
disableSerialization;
|
||||
|
||||
private _sectorcontrols = [
|
||||
201, // BG Picture Sector
|
||||
202, // Capture Frame
|
||||
203, // Capture Frame OPFOR
|
||||
205, // Label Point
|
||||
244 // Capture Frame BLUFOR
|
||||
];
|
||||
|
||||
GRLIB_ui_notif = "";
|
||||
KP_liberation_supplies = 0;
|
||||
KP_liberation_ammo = 0;
|
||||
KP_liberation_fuel = 0;
|
||||
KP_liberation_air_vehicle_building_near = false;
|
||||
KP_liberation_recycle_building_near = false;
|
||||
|
||||
waitUntil { !isNil "synchro_done" };
|
||||
waitUntil { synchro_done };
|
||||
|
||||
if (isNil "cinematic_camera_started") then {cinematic_camera_started = false;};
|
||||
if (isNil "halojumping") then {halojumping = false;};
|
||||
|
||||
private _uiticks = 0;
|
||||
private _active_sectors_hint = false;
|
||||
private _attacked_string = "";
|
||||
private _nearest_active_sector = "";
|
||||
private _zone_size = 0;
|
||||
private _colorzone = "ColorGrey";
|
||||
private _bar = controlNull;
|
||||
private _barwidth = 0;
|
||||
|
||||
private _overlay = displayNull;
|
||||
private _overlayVisible = false;
|
||||
private _showHud = false;
|
||||
private _showResources = false;
|
||||
private _currentFob = "";
|
||||
|
||||
while {true} do {
|
||||
_currentFob = player getVariable ["KPLIB_fobName", ""];
|
||||
_showHud = alive player && {!dialog && {isNull curatorCamera && {!cinematic_camera_started && !halojumping}}};
|
||||
_visibleMap = visibleMap;
|
||||
|
||||
if (_showHud && {!_overlayVisible}) then {
|
||||
"KPLIB_ui" cutRsc ["KPLIB_overlay", "PLAIN", 1];
|
||||
_uiticks = 0;
|
||||
};
|
||||
if (!_showHud && {_overlayVisible}) then {
|
||||
"KPLIB_ui" cutText ["", "PLAIN"];
|
||||
};
|
||||
|
||||
_overlay = uiNamespace getVariable ["KPLIB_overlay", displayNull];
|
||||
_overlayVisible = !isNull _overlay;
|
||||
|
||||
// Player is at FOB
|
||||
if (_currentFob != "" || {_visibleMap}) then {
|
||||
_showResources = true;
|
||||
|
||||
private _nearestFob = player getVariable "KPLIB_fobPos";
|
||||
([_nearestFob] call KPLIB_fnc_getFobResources) params ["", "_supplies", "_ammo", "_fuel", "_hasAir", "_hasRecycling"];
|
||||
|
||||
if (KP_liberation_resources_global || {_visibleMap}) then {
|
||||
// Overwrite FOB name in global mode
|
||||
_currentFob = localize "STR_RESOURCE_GLOBAL";
|
||||
|
||||
KP_liberation_supplies = KP_liberation_supplies_global;
|
||||
KP_liberation_ammo = KP_liberation_ammo_global;
|
||||
KP_liberation_fuel = KP_liberation_fuel_global;
|
||||
} else {
|
||||
KP_liberation_supplies = _supplies;
|
||||
KP_liberation_ammo = _ammo;
|
||||
KP_liberation_fuel = _fuel;
|
||||
};
|
||||
// TODO this is used by build scripts, move to relevant places
|
||||
KP_liberation_air_vehicle_building_near = _hasAir;
|
||||
KP_liberation_recycle_building_near = _hasRecycling;
|
||||
} else {
|
||||
_showResources = false;
|
||||
KP_liberation_supplies = 0;
|
||||
KP_liberation_ammo = 0;
|
||||
KP_liberation_fuel = 0;
|
||||
KP_liberation_air_vehicle_building_near = false;
|
||||
KP_liberation_recycle_building_near = false;
|
||||
};
|
||||
|
||||
if (_overlayVisible) then {
|
||||
|
||||
(_overlay displayCtrl (266)) ctrlSetText format [ "%1", GRLIB_ui_notif ];
|
||||
(_overlay displayCtrl (267)) ctrlSetText format [ "%1", GRLIB_ui_notif ];
|
||||
|
||||
if ((markerPos "opfor_capture_marker") distance markers_reset > 100 ) then {
|
||||
|
||||
private [ "_attacked_string" ];
|
||||
_attacked_string = [markerpos "opfor_capture_marker"] call KPLIB_fnc_getLocationName;
|
||||
|
||||
(_overlay displayCtrl (401)) ctrlShow true;
|
||||
(_overlay displayCtrl (402)) ctrlSetText _attacked_string;
|
||||
(_overlay displayCtrl (403)) ctrlSetText (markerText "opfor_capture_marker");
|
||||
} else {
|
||||
(_overlay displayCtrl (401)) ctrlShow false;
|
||||
(_overlay displayCtrl (402)) ctrlSetText "";
|
||||
(_overlay displayCtrl (403)) ctrlSetText "";
|
||||
};
|
||||
|
||||
// Update resources overlay
|
||||
[
|
||||
_overlay,
|
||||
_showResources,
|
||||
_uiticks % 5 == 0, // update values
|
||||
_currentFob // area title
|
||||
] call KPLIB_fnc_overlayUpdateResources;
|
||||
|
||||
if (_uiticks % 25 == 0) then {
|
||||
|
||||
if (!isNil "active_sectors" && ([] call KPLIB_fnc_getOpforCap >= GRLIB_sector_cap)) then {
|
||||
|
||||
(_overlay displayCtrl (517)) ctrlShow true;
|
||||
|
||||
if (!_active_sectors_hint) then {
|
||||
hint localize "STR_OVERLOAD_HINT";
|
||||
_active_sectors_hint = true;
|
||||
};
|
||||
|
||||
_active_sectors_string = "<t align='right' color='#e0e000'>" + (localize "STR_ACTIVE_SECTORS") + "<br/>";
|
||||
{
|
||||
_active_sectors_string = [_active_sectors_string, markerText _x, "<br/>"] joinString "";
|
||||
} forEach active_sectors;
|
||||
_active_sectors_string = [_active_sectors_string, "</t>"] joinString "";
|
||||
(_overlay displayCtrl (516)) ctrlSetStructuredText parseText _active_sectors_string;
|
||||
|
||||
} else {
|
||||
(_overlay displayCtrl (516)) ctrlSetStructuredText parseText " ";
|
||||
(_overlay displayCtrl (517)) ctrlShow false;
|
||||
};
|
||||
|
||||
_nearest_active_sector = [GRLIB_sector_size] call KPLIB_fnc_getNearestSector;
|
||||
if ( _nearest_active_sector != "" ) then {
|
||||
_zone_size = GRLIB_capture_size;
|
||||
if ( _nearest_active_sector in sectors_bigtown ) then {
|
||||
_zone_size = GRLIB_capture_size * 1.4;
|
||||
};
|
||||
|
||||
"zone_capture" setmarkerposlocal (markerpos _nearest_active_sector);
|
||||
_colorzone = "ColorGrey";
|
||||
if ( [ markerpos _nearest_active_sector, _zone_size ] call KPLIB_fnc_getSectorOwnership == GRLIB_side_friendly ) then { _colorzone = GRLIB_color_friendly };
|
||||
if ( [ markerpos _nearest_active_sector, _zone_size ] call KPLIB_fnc_getSectorOwnership == GRLIB_side_enemy ) then { _colorzone = GRLIB_color_enemy };
|
||||
if ( [ markerpos _nearest_active_sector, _zone_size ] call KPLIB_fnc_getSectorOwnership == GRLIB_side_resistance ) then { _colorzone = "ColorCivilian" };
|
||||
"zone_capture" setmarkercolorlocal _colorzone;
|
||||
|
||||
_ratio = [_nearest_active_sector] call KPLIB_fnc_getBluforRatio;
|
||||
_barwidth = 0.084 * safezoneW * _ratio;
|
||||
_bar = _overlay displayCtrl (244);
|
||||
_bar ctrlSetPosition [(ctrlPosition _bar) select 0,(ctrlPosition _bar) select 1,_barwidth,(ctrlPosition _bar) select 3];
|
||||
_bar ctrlCommit ([0, 2] select ctrlShown _bar);
|
||||
|
||||
(_overlay displayCtrl (205)) ctrlSetText (markerText _nearest_active_sector);
|
||||
{(_overlay displayCtrl (_x)) ctrlShow true;} forEach _sectorcontrols;
|
||||
if (_nearest_active_sector in blufor_sectors) then {
|
||||
(_overlay displayCtrl (205)) ctrlSetTextColor [0,0.3,1.0,1];
|
||||
} else {
|
||||
(_overlay displayCtrl (205)) ctrlSetTextColor [0.85,0,0,1];
|
||||
};
|
||||
|
||||
"zone_capture" setMarkerSizeLocal [ _zone_size,_zone_size ];
|
||||
} else {
|
||||
{(_overlay displayCtrl (_x)) ctrlShow false;} forEach _sectorcontrols;
|
||||
"zone_capture" setmarkerposlocal markers_reset;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_uiticks = _uiticks + 1;
|
||||
if (_uiticks > 1000) then {_uiticks = 0;};
|
||||
uiSleep 0.25;
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
params [
|
||||
"_control",
|
||||
"_linearray"
|
||||
];
|
||||
|
||||
_linearray = toArray _linearray;
|
||||
private _caretPosition = 0;
|
||||
|
||||
private ["_currentline", "_caretcharacter"];
|
||||
while {dialog && (_caretPosition <= count _linearray)} do {
|
||||
_currentline = [];
|
||||
while {count _currentline < _caretPosition} do {
|
||||
_currentline pushback (_linearray select (count _currentline));
|
||||
};
|
||||
_caretcharacter = "";
|
||||
if ((_caretPosition % 2 == 0) && (_caretPosition != count _linearray)) then {_caretcharacter = "_"};
|
||||
ctrlSetText [_control, format ["%1%2", toString _currentline, _caretcharacter]];
|
||||
_caretPosition = _caretPosition + 1;
|
||||
sleep 0.04;
|
||||
};
|
||||
@@ -0,0 +1,75 @@
|
||||
private _objects_to_build = [
|
||||
["Land_BarGate_F", [3.08, -23.93, 0.00], 0.00],
|
||||
["Land_Cargo_Patrol_V4_F", [-16.67, -17.67, 0.00], 0.00],
|
||||
["Land_Cargo_Patrol_V4_F", [16.25, -17.52, 0.00], 0.00],
|
||||
["Land_Cargo_Tower_V4_F", [14.05, 13.65, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-0.88, 21.72, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-16.20, 1.19, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-16.62, -21.26, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-18.34, 21.81, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-21.59, -0.83, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-21.67, 7.65, 0.00], 90.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-21.74, 16.44, 0.00], 90.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-21.75, -17.91, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-21.78, -9.42, 0.00], 90.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-4.29, -4.05, 0.00], 90.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-4.32, 6.54, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-7.45, 1.15, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-8.11, -21.27, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-9.19, -15.91, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-9.61, 21.68, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [15.84, -21.56, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [16.21, 5.06, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [16.57, 21.48, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [21.40, -18.40, 0.00], 90.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [21.49, -9.60, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [21.52, 16.26, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [21.56, -1.31, 0.00], 90.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [21.59, 7.47, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [4.60, 16.17, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [6.21, -16.03, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [7.33, -21.54, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [7.51, 5.16, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [7.73, 21.59, 0.00], 180.00]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_ammo_container, [-17.69, 6.55, 0.00], 0.00],
|
||||
[opfor_ammo_container, [-8.52, 6.50, 0.00], 0.00],
|
||||
[opfor_fuel_container, [-12.98, 6.80, 0.00], 0.00],
|
||||
[opfor_fuel_container, [-17.49, 15.73, 0.00], 0.00],
|
||||
[opfor_fuel_truck, [14.76, -3.44, 0.00], 270.00],
|
||||
[opfor_ammo_truck, [14.92, 1.33, 0.00], 270.00]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_engineer, [15.07, -0.94, 0.00], 258.84],
|
||||
[opfor_heavygunner, [-18.40, -1.96, 0.00], 134.25],
|
||||
[opfor_heavygunner, [17.84, -17.31, 4.35], 162.32],
|
||||
[opfor_medic, [-0.88, -22.03, 0.00], 170.13],
|
||||
[opfor_medic, [-6.09, -18.08, 0.00], 106.59],
|
||||
[opfor_medic, [18.34, 12.30, 0.00], 229.95],
|
||||
[opfor_officer, [17.04, 14.01, 15.37], 228.55],
|
||||
[opfor_sharpshooter, [18.24, 16.25, 17.89], 60.85],
|
||||
[opfor_rifleman, [-10.67, 19.15, 0.00], 145.13],
|
||||
[opfor_rifleman, [-15.09, -17.86, 4.35], 152.65],
|
||||
[opfor_rifleman, [14.53, -17.52, 4.35], 183.66],
|
||||
[opfor_rifleman, [17.84, 9.35, 17.89], 120.37],
|
||||
[opfor_rifleman, [8.78, -18.50, 0.00], 38.44],
|
||||
[opfor_rifleman, [9.42, 8.60, 12.77], 0.00],
|
||||
[opfor_rpg, [10.13, 6.74, 17.79], 190.12],
|
||||
[opfor_sentry, [-15.34, 11.18, 0.00], 43.12],
|
||||
[opfor_sentry, [15.14, 9.85, 12.77], 0.00],
|
||||
[opfor_marksman, [-17.65, -17.73, 4.35], 192.66],
|
||||
[opfor_grenadier, [-7.66, -1.47, 0.00], 186.27],
|
||||
[opfor_grenadier, [18.23, -6.30, 0.00], 235.17]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,76 @@
|
||||
private _objects_to_build = [
|
||||
[opfor_flag, [-3.09, -13.03, 0.00], 0.00],
|
||||
["Land_BarGate_F", [-20.99, -7.13, 0.00], 270.00],
|
||||
["Land_Cargo_HQ_V4_F", [12.64, -4.76, 0.00], 0.00],
|
||||
["Land_Cargo_Patrol_V4_F", [18.54, 14.75, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-13.52, 18.55, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-15.72, -15.44, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-19.05, 15.24, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-19.26, -2.85, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-4.90, 18.58, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-7.19, -15.46, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [1.42, -15.43, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [12.17, 18.58, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [18.50, -15.42, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [20.69, 18.51, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [23.87, -12.24, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [24.00, -3.73, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [24.08, 4.75, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [24.10, 13.14, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [3.55, 18.60, 0.00], 180.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [9.87, -15.40, 0.00], 180.00],
|
||||
["Land_HBarrier_01_line_1_green_F", [-4.98, 2.23, 0.00], 0.00],
|
||||
["Land_HBarrier_01_line_1_green_F", [-5.01, 0.74, 0.00], 0.00],
|
||||
["Land_HBarrier_01_line_3_green_F", [0.30, 3.78, 0.00], 0.00],
|
||||
["Land_HBarrier_01_line_3_green_F", [6.91, 11.77, 0.00], 270.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [-15.28, 3.84, 0.00], 0.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [-4.16, 3.81, 0.00], 0.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [-4.90, -5.79, 0.00], 270.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [-4.91, -11.49, 0.00], 270.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [-9.68, 3.85, 0.00], 0.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [14.49, 3.65, 0.00], 0.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [2.76, 14.38, 0.00], 270.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [2.77, 5.83, 0.00], 270.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [20.08, 3.65, 0.00], 0.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [6.90, 7.29, 0.00], 270.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [8.91, 3.67, 0.00], 0.00],
|
||||
["Land_HBarrier_01_tower_green_F", [-21.15, 6.09, 0.00], 0.00],
|
||||
[opfor_mrap_armed, [-15.71, -1.05, -0.00], 0.00]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_ammo_container, [-2.27, 6.72, 0.00], 270.00],
|
||||
[opfor_ammo_container, [-2.50, 14.76, 0.00], 270.00],
|
||||
[opfor_fuel_container, [-11.02, 13.18, 0.00], 0.00],
|
||||
[opfor_fuel_container, [-15.81, 13.28, 0.00], 0.00]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_engineer, [-13.04, 1.42, 0.00], 145.49],
|
||||
[opfor_medic, [12.00, -11.32, 0.72], 0.00],
|
||||
[opfor_machinegunner, [9.36, -9.69, 3.13], 224.39],
|
||||
[opfor_rifleman, [-15.90, 6.20, 0.00], 53.33],
|
||||
[opfor_rifleman, [-18.61, -12.86, 0.00], 256.70],
|
||||
[opfor_rifleman, [-2.21, 2.14, 0.00], 154.38],
|
||||
[opfor_rifleman, [-21.42, 5.74, 0.00], 0.00],
|
||||
[opfor_rifleman, [-21.63, 3.43, 2.78], 259.20],
|
||||
[opfor_rifleman, [-7.60, 14.78, 0.00], 177.51],
|
||||
[opfor_rifleman, [17.97, -2.54, 0.60], 222.59],
|
||||
[opfor_at, [9.42, -3.19, 3.13], 299.23],
|
||||
[opfor_sentry, [-1.28, -12.69, 0.00], 0.00],
|
||||
[opfor_sentry, [21.72, 6.34, 0.00], 290.24],
|
||||
[opfor_marksman, [16.94, 14.54, 4.35], 333.07],
|
||||
[opfor_marksman, [19.91, 14.21, 4.35], 0.00],
|
||||
[opfor_team_leader, [10.12, -4.12, 0.60], 175.70],
|
||||
[opfor_grenadier, [-21.11, 7.85, 2.78], 285.67],
|
||||
[opfor_grenadier, [9.27, 7.95, 0.00], 0.00]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,85 @@
|
||||
private _objects_to_build = [
|
||||
["Land_Cargo_House_V4_F", [-0.52, 23.34, 0.00], 0.00],
|
||||
["Land_Cargo_Patrol_V4_F", [-21.19, 11.02, 0.00], 128.79],
|
||||
["Land_Cargo_Patrol_V4_F", [-24.11, -12.44, 0.00], 53.88],
|
||||
["Land_Cargo_Patrol_V4_F", [16.19, -17.03, 0.00], 326.34],
|
||||
["Land_Cargo_Tower_V4_F", [0.19, -0.19, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-0.88, 29.09, 0.00], 0.39],
|
||||
["Land_HBarrier_01_big_4_green_F", [-12.38, -17.50, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-13.32, -22.93, 0.00], 9.33],
|
||||
["Land_HBarrier_01_big_4_green_F", [-16.11, 21.91, 0.00], 137.09],
|
||||
["Land_HBarrier_01_big_4_green_F", [-20.94, -20.05, 0.00], 211.80],
|
||||
["Land_HBarrier_01_big_4_green_F", [-21.73, 15.89, 0.00], 312.44],
|
||||
["Land_HBarrier_01_big_4_green_F", [-25.24, -2.23, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-26.90, 9.27, 0.00], 301.34],
|
||||
["Land_HBarrier_01_big_4_green_F", [-26.91, -14.48, 0.00], 54.18],
|
||||
["Land_HBarrier_01_big_4_green_F", [-29.94, 1.62, 0.00], 98.93],
|
||||
["Land_HBarrier_01_big_4_green_F", [-30.03, -7.00, 0.00], 82.51],
|
||||
["Land_HBarrier_01_big_4_green_F", [-4.80, -23.61, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-6.35, -8.76, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-6.46, 6.01, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-9.21, 26.96, 0.00], 330.73],
|
||||
["Land_HBarrier_01_big_4_green_F", [-9.69, 0.90, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-9.71, 20.75, 0.00], 63.17],
|
||||
["Land_HBarrier_01_big_4_green_F", [13.66, -22.20, 0.00], 340.93],
|
||||
["Land_HBarrier_01_big_4_green_F", [15.15, 23.89, 0.00], 35.54],
|
||||
["Land_HBarrier_01_big_4_green_F", [2.00, 6.02, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [2.11, -8.75, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [20.94, -11.73, 0.00], 61.05],
|
||||
["Land_HBarrier_01_big_4_green_F", [21.16, -18.23, 0.00], 322.90],
|
||||
["Land_HBarrier_01_big_4_green_F", [21.21, 18.03, 0.00], 230.46],
|
||||
["Land_HBarrier_01_big_4_green_F", [25.25, 10.64, 0.00], 253.46],
|
||||
["Land_HBarrier_01_big_4_green_F", [26.38, 2.20, 0.00], 271.37],
|
||||
["Land_HBarrier_01_big_4_green_F", [3.87, -23.65, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [7.17, -5.47, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [7.21, 22.33, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [7.23, 2.91, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [7.34, 11.22, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [7.61, 27.67, 0.00], 18.42],
|
||||
["Land_HBarrier_01_big_4_green_F", [9.03, -20.34, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [9.11, -11.97, 0.00], 270.00],
|
||||
[opfor_mrap, [10.41, -1.98, -0.00], 0.00]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_ammo_truck, [15.60, 18.85, 0.00], 136.21],
|
||||
[opfor_fuel_truck, [21.62, 8.37, 0.00], 167.18],
|
||||
[opfor_ammo_container, [-2.98, -19.06, 0.00], 0.00],
|
||||
[opfor_ammo_container, [-8.06, -19.04, 0.00], 0.00],
|
||||
[opfor_fuel_container, [1.23, -19.09, 0.00], 0.00],
|
||||
[opfor_fuel_container, [5.80, -19.12, 0.00], 0.00]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_engineer, [19.58, 13.89, 0.00], 244.49],
|
||||
[opfor_heavygunner, [-14.31, 17.85, 0.00], 149.97],
|
||||
[opfor_medic, [-1.31, 25.09, 0.73], 135.61],
|
||||
[opfor_aa, [3.89, 2.24, 17.89], 0.00],
|
||||
[opfor_machinegunner, [-25.14, -10.78, 4.35], 214.93],
|
||||
[opfor_at, [2.97, -4.28, 17.89], 130.54],
|
||||
[opfor_rifleman, [-16.34, -19.12, 0.00], 0.00],
|
||||
[opfor_rifleman, [-21.59, 9.39, 4.35], 282.14],
|
||||
[opfor_rifleman, [-3.73, 2.96, 17.89], 0.00],
|
||||
[opfor_rifleman, [-4.31, -3.06, 12.77], 0.00],
|
||||
[opfor_rifleman, [-5.05, -15.86, 0.00], 0.00],
|
||||
[opfor_rifleman, [-6.97, 23.81, 0.00], 143.84],
|
||||
[opfor_rifleman, [24.14, 0.05, 0.00], 177.25],
|
||||
[opfor_rifleman, [4.39, 9.33, 0.00], 317.44],
|
||||
[opfor_sentry, [12.06, -16.47, 0.00], 0.00],
|
||||
[opfor_sentry, [5.83, -11.76, 0.00], 233.53],
|
||||
[opfor_marksman, [-20.07, 11.31, 4.35], 327.13],
|
||||
[opfor_marksman, [14.45, -17.63, 4.35], 143.40],
|
||||
[opfor_squad_leader, [-1.89, -3.39, 15.37], 0.00],
|
||||
[opfor_grenadier, [-1.96, -2.51, 0.00], 265.28],
|
||||
[opfor_grenadier, [-23.10, -13.48, 4.35], 220.27],
|
||||
[opfor_grenadier, [17.35, -16.11, 4.35], 139.83]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,73 @@
|
||||
private _objects_to_build = [
|
||||
["Land_BarGate_F", [-1.35, -21.90, 0.00], 0.00],
|
||||
["Land_BarGate_F", [-25.97, 14.85, 0.00], 270.00],
|
||||
["Land_Cargo_HQ_V4_F", [12.54, 8.46, 0.00], 270.00],
|
||||
["Land_Cargo_Patrol_V4_F", [-4.11, 12.99, 0.00], 141.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-13.36, 0.92, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-19.91, -15.83, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-22.01, 1.08, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-25.39, -12.68, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-25.39, -4.13, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-4.64, 0.77, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-6.31, 20.00, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-9.46, 6.24, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-9.47, 14.79, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-9.67, -4.48, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [10.62, 19.99, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [10.68, -16.06, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [19.16, 19.99, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [19.22, -16.07, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [2.23, 20.00, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [22.25, -10.84, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [22.25, -2.29, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [22.34, 14.71, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [22.35, 6.16, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_tower_green_F", [-12.34, -16.79, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_tower_green_F", [2.99, -16.95, 0.00], 0.00],
|
||||
["Land_HBarrier_01_line_1_green_F", [-22.72, 19.94, 0.00], 270.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [-13.55, 19.94, 0.00], 0.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [-19.12, 19.94, 0.00], 0.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [-24.19, 5.00, 0.00], 270.00],
|
||||
["Land_HBarrier_01_line_5_green_F", [-24.22, 17.71, 0.00], 270.00],
|
||||
[opfor_mrap_armed, [-17.72, 14.91, -0.00], 270.00],
|
||||
[opfor_transport_truck, [-16.45, 7.09, 0.00], 270.00]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_fuel_truck, [14.36, -11.61, 0.00], 270.00],
|
||||
[opfor_fuel_container, [-19.81, -11.27, 0.00], 270.00],
|
||||
[opfor_fuel_container, [-19.85, -3.96, 0.00], 270.00]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_engineer, [-13.45, 3.53, 0.00], 280.96],
|
||||
[opfor_heavygunner, [17.42, 5.17, 3.13], 137.06],
|
||||
[opfor_medic, [17.92, 5.97, 0.60], 274.39],
|
||||
[opfor_officer, [12.32, 11.76, 0.60], 140.46],
|
||||
[opfor_sharpshooter, [-5.79, 11.84, 4.35], 297.99],
|
||||
[opfor_machinegunner, [-11.76, -18.72, 2.28], 152.95],
|
||||
[opfor_machinegunner, [-12.18, -3.17, 0.00], 204.36],
|
||||
[opfor_rifleman, [-13.48, -17.94, 2.28], 170.62],
|
||||
[opfor_rifleman, [-21.78, 17.73, 0.00], 176.87],
|
||||
[opfor_rifleman, [-5.56, -18.04, 0.00], 155.59],
|
||||
[opfor_rifleman, [10.34, 6.15, 0.60], 99.59],
|
||||
[opfor_rifleman, [19.16, 0.25, 0.00], 252.60],
|
||||
[opfor_rifleman, [4.08, 16.23, 0.00], 195.28],
|
||||
[opfor_rifleman, [8.68, -11.60, 0.00], 258.53],
|
||||
[opfor_rpg, [11.21, 13.16, 3.13], 309.16],
|
||||
[opfor_sentry, [-21.30, -7.60, 0.00], 97.63],
|
||||
[opfor_sentry, [-6.04, 4.12, 0.00], 80.41],
|
||||
[opfor_sentry, [2.14, -17.64, 2.28], 246.88],
|
||||
[opfor_marksman, [-3.27, 13.64, 4.35], 332.14],
|
||||
[opfor_marksman, [11.79, 5.74, 3.13], 224.23],
|
||||
[opfor_grenadier, [3.70, -19.06, 2.28], 179.85]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,69 @@
|
||||
private _objects_to_build = [
|
||||
["Land_BarGate_F", [-1.56, -21.23, 0.00], 180.00],
|
||||
["Land_Cargo_House_V4_F", [-15.99, -15.32, 0.00], 180.00],
|
||||
["Land_Cargo_House_V4_F", [-8.30, -15.39, 0.00], 180.00],
|
||||
["Land_Cargo_Patrol_V4_F", [-17.07, 15.12, 0.00], 90.00],
|
||||
["Land_Cargo_Patrol_V4_F", [15.11, -18.26, 0.00], 0.00],
|
||||
["Land_Cargo_Tower_V4_F", [14.91, 13.60, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-15.68, 20.47, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-16.02, -21.09, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-20.99, 17.26, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-21.00, -0.12, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-21.00, 8.55, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-21.13, -8.80, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-21.39, -17.39, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-7.33, 20.43, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [-7.69, -21.22, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [1.12, 20.34, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [11.11, -21.90, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [18.02, 20.28, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [19.55, -21.95, 0.00], 0.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [22.71, -16.70, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [22.81, -8.28, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [22.89, 0.29, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [23.00, 8.71, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [23.12, 17.03, 0.00], 270.00],
|
||||
["Land_HBarrier_01_big_4_green_F", [9.57, 20.36, 0.00], 0.00],
|
||||
[opfor_mrap, [14.22, -4.50, -0.00], 270.00]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_ammo_truck, [15.77, -10.81, 0.00], 270.00],
|
||||
[opfor_fuel_truck, [15.39, 1.95, 0.00], 270.00],
|
||||
[opfor_ammo_container, [-12.54, 6.21, 0.00], 0.00],
|
||||
[opfor_ammo_container, [-16.98, 6.38, 0.00], 0.00],
|
||||
[opfor_fuel_container, [-12.00, -3.02, 0.00], 0.00],
|
||||
[opfor_fuel_container, [-16.72, -3.11, 0.00], 0.00]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_engineer, [16.86, -0.86, 0.00], 257.93],
|
||||
[opfor_heavygunner, [2.53, -18.79, 0.00], 162.42],
|
||||
[opfor_medic, [-8.69, -15.93, 0.59], 0.00],
|
||||
[opfor_sharpshooter, [-17.05, 16.71, 4.35], 272.72],
|
||||
[opfor_sharpshooter, [10.26, 6.69, 17.79], 198.44],
|
||||
[opfor_machinegunner, [-15.20, 1.00, 0.00], 86.01],
|
||||
[opfor_rifleman, [-13.07, 16.89, 0.00], 139.62],
|
||||
[opfor_rifleman, [-16.95, 13.45, 4.35], 259.48],
|
||||
[opfor_rifleman, [-17.18, -17.18, 0.73], 0.00],
|
||||
[opfor_rifleman, [10.74, 10.43, 15.37], 81.16],
|
||||
[opfor_rifleman, [11.20, 10.90, 12.77], 0.00],
|
||||
[opfor_rifleman, [12.76, -16.90, 0.00], 323.09],
|
||||
[opfor_rifleman, [16.63, 12.67, 0.00], 229.50],
|
||||
[opfor_rifleman, [18.63, 15.47, 17.89], 46.70],
|
||||
[opfor_at, [-17.43, -7.40, 0.00], 101.79],
|
||||
[opfor_rpg, [10.88, 16.67, 17.89], 313.11],
|
||||
[opfor_sentry, [18.68, 15.42, 15.37], 240.93],
|
||||
[opfor_marksman, [13.72, -18.55, 4.35], 210.97],
|
||||
[opfor_squad_leader, [-14.42, -16.98, 0.73], 333.26],
|
||||
[opfor_grenadier, [16.74, -18.14, 4.35], 172.08]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,82 @@
|
||||
private _objects_to_build = [
|
||||
["Land_HBarrierBig_F",[-15,-8,0],90],
|
||||
["Land_HBarrierBig_F",[-15,-16.5,0],90],
|
||||
["Land_HBarrierBig_F",[-15,-25,0],90],
|
||||
["Land_HBarrierBig_F",[-15,8,0],90],
|
||||
["Land_HBarrierBig_F",[-15,16.5,0],90],
|
||||
["Land_HBarrierBig_F",[-15,25,0],90],
|
||||
["Land_HBarrierBig_F",[15,-8,0],90],
|
||||
["Land_HBarrierBig_F",[15,-16.5,0],90],
|
||||
["Land_HBarrierBig_F",[15,-25,0],90],
|
||||
["Land_HBarrierBig_F",[15,8,0],90],
|
||||
["Land_HBarrierBig_F",[15,16.5,0],90],
|
||||
["Land_HBarrierBig_F",[15,25,0],90],
|
||||
["Land_HBarrierBig_F",[11,30,0],0],
|
||||
["Land_HBarrierBig_F",[4,30,0],0],
|
||||
["Land_HBarrierBig_F",[-4,30,0],0],
|
||||
["Land_HBarrierBig_F",[-11,30,0],0],
|
||||
["Land_HBarrierBig_F",[11,-30,0],0],
|
||||
["Land_HBarrierBig_F",[4,-30,0],0],
|
||||
["Land_HBarrierBig_F",[-4,-30,0],0],
|
||||
["Land_HBarrierBig_F",[-11,-30,0],0],
|
||||
["Land_Cargo_Patrol_V3_F",[-10,-26,0],0],
|
||||
["Land_Cargo_HQ_V3_F",[4,-20,0],0],
|
||||
["Land_Cargo_House_V3_F",[-9,24,0],0],
|
||||
["Land_Cargo_House_V3_F",[-1,24,0],0],
|
||||
["Land_Cargo_Patrol_V3_F",[10,24,0],180],
|
||||
["Land_CncBarrierMedium4_F",[-21,-5,0],180],
|
||||
["Land_CncBarrierMedium4_F",[-21,5,0],180],
|
||||
["Land_CncBarrierMedium4_F",[21,-5,0],180],
|
||||
["Land_CncBarrierMedium4_F",[21,5,0],180],
|
||||
["Land_Razorwire_F",[-22,-7,0],180],
|
||||
["Land_Razorwire_F",[-22,7,0],180],
|
||||
["Land_Razorwire_F",[19,-7,0],180],
|
||||
["Land_Razorwire_F",[19,7,0],180],
|
||||
["Land_Tank_rust_F",[-9,10,0],180],
|
||||
["Land_Tank_rust_F",[-9,14,0],180],
|
||||
["Land_Tank_rust_F",[-9,6,0],180],
|
||||
[opfor_flag,[-14,-5,0],180],
|
||||
[opfor_flag,[-14,5,0],180],
|
||||
[opfor_flag,[14,-5,0],90],
|
||||
["Land_BarGate_F",[20,0,0],90],
|
||||
["Land_BarGate_F",[-13,0,0],270],
|
||||
[opfor_mrap,[7,-7,0],60]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_fuel_truck,[10,8,0],185],
|
||||
[opfor_fuel_truck,[5,8.5,0],190],
|
||||
[opfor_fuel_truck,[0,9,0],192],
|
||||
[opfor_ammo_truck,[-9,-8,0],10],
|
||||
[opfor_ammo_truck,[-3,-8,0],15]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_marksman,[11,26.5,4.5],0],
|
||||
[opfor_marksman,[-11,-26.5,4.5],180],
|
||||
[opfor_heavygunner,[9,26.5,4.5],0],
|
||||
[opfor_heavygunner,[-9,-26.5,4.5],180],
|
||||
[opfor_rifleman,[12,23,4.5],90],
|
||||
[opfor_rifleman,[-12,-23,4.5],270],
|
||||
[opfor_sentry,[6,-20,1],0],
|
||||
[opfor_sentry,[3,-23,1],90],
|
||||
[opfor_rifleman,[3,-20,1],180],
|
||||
[opfor_team_leader,[6,-23,1],270],
|
||||
[opfor_team_leader,[3,-18,1],180],
|
||||
[opfor_sentry,[6,-18,1],270],
|
||||
[opfor_rifleman,[-9,25,1],180],
|
||||
[opfor_sentry,[-11,25,1],180],
|
||||
[opfor_rifleman,[-1,25,1],180],
|
||||
[opfor_sentry,[-3,25,1],180],
|
||||
[opfor_sentry,[0,-5,0],0],
|
||||
[opfor_sentry,[2,5,0],180]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[30,40,0],
|
||||
[30,-40,0],
|
||||
[-30,-40,0],
|
||||
[-30,40,0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,64 @@
|
||||
private _objects_to_build = [
|
||||
["Land_Cargo_HQ_V3_F", [10.61, -10.99, 0.00], 0.00],
|
||||
["Land_Cargo_Patrol_V3_F", [-17.12, 17.91, 0.00], 90.00],
|
||||
["Land_Cargo_Patrol_V3_F", [-6.10, -17.32, 0.00], 0.00],
|
||||
["Land_Cargo_Patrol_V3_F", [16.21, 19.89, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-0.63, 24.21, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-11.09, -16.24, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-11.31, -7.55, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-11.58, 9.48, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-17.32, 12.59, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-17.75, 23.50, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-20.65, 17.97, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-7.86, -21.51, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-9.08, 23.97, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [0.86, -21.32, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [16.73, 24.67, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [18.13, -20.90, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [20.43, 19.27, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [20.71, 10.54, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [21.02, 1.91, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [21.24, -6.77, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [21.51, -15.29, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [8.11, 24.41, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [9.42, -21.10, 0.00], 0.00],
|
||||
[opfor_mrap_armed, [12.38, 7.12, -0.00], 270.00],
|
||||
[opfor_transport_truck, [13.36, 2.53, 0.00], 270.00]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_ammo_container, [-1.20, 20.76, 0.00], 270.00],
|
||||
[opfor_ammo_container, [-1.59, 15.88, 0.00], 270.00],
|
||||
[opfor_fuel_container, [6.70, 15.99, 0.00], 270.00],
|
||||
[opfor_fuel_container, [6.82, 21.17, 0.00], 270.00],
|
||||
[opfor_ammo_truck, [13.86, -1.90, 0.00], 270.00]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_engineer, [16.56, 0.29, 0.00], 272.36],
|
||||
[opfor_heavygunner, [15.94, 21.60, 4.35], 0.00],
|
||||
[opfor_medic, [13.96, -10.08, 0.60], 212.28],
|
||||
[opfor_sharpshooter, [-16.85, 16.02, 4.35], 262.35],
|
||||
[opfor_machinegunner, [-7.51, -17.34, 4.35], 172.74],
|
||||
[opfor_rifleman, [-8.52, -15.95, 0.00], 25.64],
|
||||
[opfor_rifleman, [-9.09, 6.77, 0.00], 198.94],
|
||||
[opfor_rifleman, [14.18, -6.52, 3.08], 0.00],
|
||||
[opfor_rifleman, [16.20, 18.42, 4.35], 94.53],
|
||||
[opfor_rifleman, [2.83, 18.98, 0.00], 179.03],
|
||||
[opfor_rifleman, [7.46, -17.77, 0.72], 0.00],
|
||||
[opfor_at, [7.10, -9.09, 3.13], 279.26],
|
||||
[opfor_sentry, [16.67, 16.95, 0.00], 231.16],
|
||||
[opfor_marksman, [-17.06, 19.60, 4.35], 273.13],
|
||||
[opfor_squad_leader, [9.67, -10.00, 0.60], 198.89],
|
||||
[opfor_grenadier, [-14.41, 20.23, 0.00], 137.98],
|
||||
[opfor_grenadier, [-4.67, -17.54, 4.35], 177.14]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,102 @@
|
||||
private _objects_to_build = [
|
||||
[ "Land_Cargo_Tower_V3_F", [-5.7, 3.42, 0], 0 ],
|
||||
[ "Land_HBarrierBig_F", [-0.8, -6.62, 0], 0.11 ],
|
||||
[ "Land_PaperBox_open_empty_F", [5.84, -3.25, 0], 332.09 ],
|
||||
[ "Land_HBarrierBig_F", [7.84, -6.52, 0], 359.62 ],
|
||||
[ "Land_PaperBox_closed_F", [10.77, -2.11, 0], 90.97 ],
|
||||
[ opfor_flag, [2.46, 10.93, 0], 90 ],
|
||||
[ "Land_HBarrierBig_F", [-9.22, -6.62, 0], 0.11 ],
|
||||
[ opfor_transport_truck, [4.9, -10.96, -0.03], 272.46 ],
|
||||
[ "Land_HBarrierBig_F", [-1.17, 12.94, 0], 0.25 ],
|
||||
[ opfor_transport_truck, [-8.91, -11.52, -0.03], 266.11 ],
|
||||
[ "Land_HBarrierWall_corridor_F", [-14.26, 3.18, 0], 180.24 ],
|
||||
[ "Land_PaperBox_open_full_F", [11.39, 9.16, 0], 302.69 ],
|
||||
[ "Land_HBarrierBig_F", [-14.52, -3.07, 0], 89.68 ],
|
||||
[ "Land_HBarrierBig_F", [7.22, 13.02, 0], 359.82 ],
|
||||
[ "Land_HBarrierBig_F", [-9.58, 12.94, 0], 0.25 ],
|
||||
[ "Land_HBarrierBig_F", [14.88, -6.47, 0], 0.11 ],
|
||||
[ "Land_HBarrier_1_F", [-16.19, -4.29, 0], 179.54 ],
|
||||
[ "Land_HBarrierBig_F", [-14.55, 9.47, 0], 89.68 ],
|
||||
[ "Land_HBarrierBig_F", [17.26, -0.38, 0], 89.87 ],
|
||||
[ "Land_HBarrierBig_F", [13.25, 13.06, 0], 359.82 ],
|
||||
[ "Land_HBarrierBig_F", [-0.52, 18.6, 0], 359.5 ],
|
||||
[ "Land_HBarrier_1_F", [-18.56, -4.33, 0], 179.54 ],
|
||||
[ "Land_HBarrierBig_F", [17.2, 8.48, 0], 88.84 ],
|
||||
[ "Land_HBarrierBig_F", [8.34, 18.55, 0], 0.52 ],
|
||||
[ "Land_HBarrierBig_F", [-9.38, 18.42, 0], 359.5 ],
|
||||
[ "Land_HBarrier_1_F", [-21.07, -4.36, 0], 179.54 ],
|
||||
[ opfor_mrap_armed, [-13.81, -17.08, 0.01], 254.24 ],
|
||||
[ "Land_HBarrierBig_F", [-1.71, -21.88, 0], 179.75 ],
|
||||
[ "Land_HBarrierBig_F", [22.65, -1.94, 0], 89.87 ],
|
||||
[ opfor_flag, [-21.18, -9.33, 0], 90 ],
|
||||
[ "Land_HBarrierBig_F", [7.15, -21.71, 0], 179.75 ],
|
||||
[ "Land_Cargo_Patrol_V3_F", [17.02, -16.67, 0], 359.51 ],
|
||||
[ "Land_HBarrierBig_F", [-22.85, 1.21, 0], 269.41 ],
|
||||
[ "Land_HBarrierBig_F", [22.51, 6.8, 0], 89.87 ],
|
||||
[ "Land_HBarrierBig_F", [-22.77, -7.28, 0], 269.41 ],
|
||||
[ opfor_flag, [-11.36, -21.78, 0], 90 ],
|
||||
[ "Land_HBarrierBig_F", [-13.12, 20.99, 0], 90.15 ],
|
||||
[ "Land_HBarrierBig_F", [-10.02, -22.67, 0], 347.15 ],
|
||||
[ "Land_HBarrierBig_F", [-22.81, 10.07, 0], 270.43 ],
|
||||
[ "Land_HBarrierBig_F", [22.74, -10.58, 0], 89.87 ],
|
||||
[ "Land_HBarrierBig_F", [17.1, 18.61, 0], 0.52 ],
|
||||
[ "Land_Cargo_Patrol_V3_F", [-18.01, 19.63, 0], 180.02 ],
|
||||
[ "Land_CncBarrierMedium4_F", [-23.12, -12.98, 0], 235.1 ],
|
||||
[ "Land_HBarrierBig_F", [15.93, -21.54, 0], 179.75 ],
|
||||
[ opfor_flag, [20.64, 16.83, 0], 90 ],
|
||||
[ "Land_BarGate_F", [-19.55, -17.64, 0], 235.1 ],
|
||||
[ "Land_HBarrierBig_F", [22.45, 15.67, 0], 88.84 ],
|
||||
[ "Land_HBarrierBig_F", [22.23, -18.72, 0], 277.09 ],
|
||||
[ "Land_HBarrierBig_F", [-22.89, 18.81, 0], 270.43 ],
|
||||
[ "Land_HBarrierBig_F", [-18.23, 24.37, 0], 0.12 ],
|
||||
[ "Land_Pallet_MilBoxes_F", [12.11, 6.54, 0], 235.35 ],
|
||||
[ "Land_Pallet_MilBoxes_F", [8.96, 2.73, 0], 127.39 ],
|
||||
[ "Land_Pallet_MilBoxes_F", [11.85, 1.74, 0], 347.11 ],
|
||||
[ "Land_Pallet_MilBoxes_F", [13.39, 8.21, 0], 25.62 ]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[ opfor_ammo_container, [-3.32, 3.11, 0], 270.02 ],
|
||||
[ opfor_ammo_container, [6.28, 8, 0], 270.25 ]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[ opfor_sentry, [3.35, -3.18, 0], 285.5 ],
|
||||
[ opfor_machinegunner, [-4.14, 3.26, 4.64], 155.19 ],
|
||||
[ opfor_marksman, [-1.97, 5.92, 17.89], 39.77 ],
|
||||
[ opfor_sentry, [-5.07, 4.03, 13.02], 288.05 ],
|
||||
[ opfor_team_leader, [-6.25, 3.04, 15.37], 288.05 ],
|
||||
[ opfor_sentry, [5.03, 5.17, 0], 245.18 ],
|
||||
[ opfor_sentry, [7.48, 0.16, 0], 140.42 ],
|
||||
[ opfor_sentry, [-7.52, 2.19, 15.37], 53.89 ],
|
||||
[ opfor_rifleman, [-6.91, 4.18, 12.77], 105.44 ],
|
||||
[ opfor_rifleman, [8.29, -1.01, 0], 15.07 ],
|
||||
[ opfor_sentry, [-7.72, 3.47, 15.37], 129.9 ],
|
||||
[ opfor_aa, [-8.16, -3.53, 17.79], 162.03 ],
|
||||
[ opfor_rifleman, [-7.69, 5.02, 8.59], 339.29 ],
|
||||
[ opfor_engineer, [9.66, -0.3, 0], 270.08 ],
|
||||
[ opfor_heavygunner, [-9.94, -3.52, 17.79], 197.2 ],
|
||||
[ opfor_aa, [-8.92, 7.21, 17.89], 17.44 ],
|
||||
[ opfor_sentry, [-12.71, -1.34, 0], 70.65 ],
|
||||
[ opfor_sentry, [-0.21, -13.35, 0], 222.75 ],
|
||||
[ opfor_sentry, [12.7, 4.78, 0], 245.18 ],
|
||||
[ opfor_sentry, [-12.62, 7.78, 0], 95.16 ],
|
||||
[ opfor_heavygunner, [-17.46, 1.05, 0], 191.23 ],
|
||||
[ opfor_sentry, [-15.52, -9.95, 0], 222.75 ],
|
||||
[ opfor_sentry, [-20.07, 1.58, 0], 162.91 ],
|
||||
[ opfor_heavygunner, [15.94, -17.43, 4.35], 264.53 ],
|
||||
[ opfor_rpg, [-19.21, -14.96, 0], 184.12 ],
|
||||
[ opfor_marksman, [18.17, -16.98, 4.35], 120.79 ],
|
||||
[ opfor_machinegunner, [-15.66, -20.49, 0], 272.29 ],
|
||||
[ opfor_heavygunner, [-16.9, 20.39, 4.35], 85.04 ],
|
||||
[ opfor_marksman, [-19.16, 19.94, 4.35], 301.3 ]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[35,35,0],
|
||||
[35,-35,0],
|
||||
[-35,-35,0],
|
||||
[-35,35,0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,82 @@
|
||||
|
||||
private _objects_to_build = [
|
||||
[ "Land_HBarrierWall_corridor_F", [-0.11, 4.98, 0], 270.45 ],
|
||||
[ "Land_HBarrierBig_F", [-3.24, 5.12, 0], 90.35 ],
|
||||
[ "CamoNet_OPFOR_open_F", [-1.91, 5.06, 0], 0 ],
|
||||
[ "Land_HBarrierBig_F", [3.27, 5.52, 0], 90.35 ],
|
||||
[ "Land_HBarrierBig_F", [8.17, 5.21, 0], 181.2 ],
|
||||
[ "Land_HBarrierBig_F", [-8.76, 5.21, 0], 0.69 ],
|
||||
[ "Land_HelipadSquare_F", [-0.84, -11.68, 0], 270.25 ],
|
||||
[ "Land_Cargo_Patrol_V3_F", [15.5, -0.02, 0], 178.97 ],
|
||||
[ "Land_Cargo_Patrol_V3_F", [-17.12, -0.35, 0], 179.97 ],
|
||||
[ "CamoNet_OPFOR_open_F", [13.71, -11.54, 0], 270.25 ],
|
||||
[ "Land_HBarrierBig_F", [16.94, 5.18, 0], 181.2 ],
|
||||
[ "Land_Cargo_House_V3_F", [-16.03, -9.69, 0], 269.88 ],
|
||||
[ opfor_transport_truck, [-10.4, 14.9, -0.02], 181.03 ],
|
||||
[ "Land_HBarrierBig_F", [-17.6, 5.28, 0], 359.67 ],
|
||||
[ "Land_Cargo_HQ_V3_F", [11.25, 14.59, 0], 89.97 ],
|
||||
[ "Land_HBarrierBig_F", [20.42, 1.73, 0], 89.37 ],
|
||||
[ "Land_HBarrierBig_F", [-1.65, -21.15, 0], 0.36 ],
|
||||
[ opfor_flag, [-20.59, 7.5, 0], 90 ],
|
||||
[ "Land_HBarrierBig_F", [21.02, -7.36, 0], 90.4 ],
|
||||
[ "Land_HBarrierBig_F", [7.21, -21.33, 0], 1.39 ],
|
||||
[ "Land_HBarrierBig_F", [-22.71, 1.71, 0], 91.24 ],
|
||||
[ opfor_mrap_armed, [-17.33, 14.88, 0.01], 359.22 ],
|
||||
[ "Land_HBarrierBig_F", [20.76, 10.25, 0], 89.37 ],
|
||||
[ "Land_HBarrierBig_F", [-10.52, -21.21, 0], 0.36 ],
|
||||
[ "Land_HBarrierBig_F", [-22.91, -6.7, 0], 270.29 ],
|
||||
[ "Land_HBarrierBig_F", [-23.19, 10.11, 0], 89.68 ],
|
||||
[ "Land_HBarrierBig_F", [21.1, -16.14, 0], 90.4 ],
|
||||
[ "Land_HBarrierBig_F", [15.97, -21.41, 0], 1.39 ],
|
||||
[ opfor_flag, [18.67, -19.05, 0], 90 ],
|
||||
[ opfor_mrap, [11.09, 25.14, 0.01], 268.69 ],
|
||||
[ opfor_flag, [-20.66, -18.6, 0], 90 ],
|
||||
[ "Land_HBarrierBig_F", [-23.05, -15.49, 0], 271.36 ],
|
||||
[ "Land_HBarrierBig_F", [20.55, 19.13, 0], 89.37 ],
|
||||
[ "Land_HBarrierBig_F", [-19.29, -21.29, 0], 0.36 ],
|
||||
[ "Land_HBarrierBig_F", [-23.27, 18.53, 0], 89.68 ]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[ opfor_fuel_container, [2.64, -13.76, -0.04], 0.35 ],
|
||||
[ opfor_ammo_container, [-3.69, -14.92, 0], 180.33 ],
|
||||
[ opfor_fuel_container, [2.7, -5.53, -0.04], 358.03 ],
|
||||
[ opfor_ammo_container, [-3.96, -5.86, 0], 180.38 ]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[ opfor_rifleman, [-6.54, 2.05, 0], 157.41 ],
|
||||
[ opfor_sentry, [6.66, 2.1, 0], 192.72 ],
|
||||
[ opfor_rifleman, [-3.64, 12.06, 0], 339.29 ],
|
||||
[ opfor_sentry, [-10.31, -7.7, 0], 122.29 ],
|
||||
[ opfor_marksman, [14.38, 0.22, 4.35], 346.89 ],
|
||||
[ opfor_grenadier, [-2.56, 14.33, 0], 228.17 ],
|
||||
[ opfor_machinegunner, [-4.79, 14.33, 0], 155.19 ],
|
||||
[ opfor_heavygunner, [-16.04, 0.4, 4.35], 84.99 ],
|
||||
[ opfor_heavygunner, [16.6, 0.75, 4.35], 83.99 ],
|
||||
[ opfor_rifleman, [10.82, 12.69, 0.6], 105.44 ],
|
||||
[ opfor_sentry, [12.36, 12.48, 0.6], 288.05 ],
|
||||
[ opfor_machinegunner, [14.41, -10.39, 0], 183.06 ],
|
||||
[ opfor_engineer, [9.45, 15.46, 0.6], 53.89 ],
|
||||
[ opfor_sharpshooter, [-18.26, -0.02, 4.35], 301.25 ],
|
||||
[ opfor_sentry, [13.86, -12.54, 0], 348.81 ],
|
||||
[ opfor_engineer, [15.06, -11.78, 0], 288.05 ],
|
||||
[ opfor_rifleman, [9.24, 16.75, 0.6], 129.9 ],
|
||||
[ opfor_team_leader, [10.71, 16.31, 0.6], 288.05 ],
|
||||
[ opfor_aa, [15.62, 12.01, 3.09], 124.01 ],
|
||||
[ opfor_sentry, [-17.92, -8.58, 0.73], 122.29 ],
|
||||
[ opfor_aa, [8.45, 18.85, 3.13], 335.85 ],
|
||||
[ opfor_sentry, [-18, -11.54, 0.73], 122.29 ],
|
||||
[ opfor_sentry, [-13.77, 16.65, 0], 339.29 ],
|
||||
[ opfor_heavygunner, [14.04, 17.46, 3.13], 48.56 ],
|
||||
[ opfor_rpg, [12.44, 18.69, 3.13], 16.72 ]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[35,35,0],
|
||||
[35,-35,0],
|
||||
[-35,-35,0],
|
||||
[-35,35,0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,79 @@
|
||||
private _objects_to_build = [
|
||||
[ opfor_mrap, [13.31, 0, 0.01], 268.69 ],
|
||||
[ "Land_Cargo_HQ_V3_F", [11.47, -12.17, 0], 89.97 ],
|
||||
[ "Land_CncBarrierMedium4_F", [-15.55, -1.69, 0], 90.88 ],
|
||||
[ "Land_HBarrierBig_F", [-13.27, -8.61, 0], 91.24 ],
|
||||
[ opfor_transport_truck, [1.21, 15.8, -0.03], 274.41 ],
|
||||
[ "Land_BarGate_F", [-16.65, 2.15, 0], 90.88 ],
|
||||
[ opfor_mrap_armed, [-20.26, -3.22, 0.01], 359.22 ],
|
||||
[ "Land_HBarrierBig_F", [1.23, 20.94, 0], 0.69 ],
|
||||
[ "Land_Cargo_Patrol_V3_F", [16.23, 15.36, 0], 269.81 ],
|
||||
[ opfor_flag, [-12.14, 18.09, 0], 90 ],
|
||||
[ "Land_HBarrierBig_F", [22.07, -0.21, 0], 89.37 ],
|
||||
[ "Land_HBarrierBig_F", [-18.87, 11.86, 0], 182.13 ],
|
||||
[ "Land_HBarrierBig_F", [-19.02, -11.48, 0], 180.79 ],
|
||||
[ "Land_HBarrierBig_F", [-7.55, 20.91, 0], 0.69 ],
|
||||
[ "Land_Cargo_Patrol_V3_F", [-16.73, 16.16, 0], 89.4 ],
|
||||
[ "Land_HBarrierBig_F", [-0.63, -22.83, 0], 0.36 ],
|
||||
[ opfor_flag, [-11.33, -19.92, 0], 90 ],
|
||||
[ "Land_HBarrierBig_F", [9.38, 20.92, 0], 181.2 ],
|
||||
[ "Land_Cargo_Patrol_V3_F", [-16.22, -17.77, 0], 0.54 ],
|
||||
[ "Land_HBarrierBig_F", [21.86, 8.66, 0], 89.37 ],
|
||||
[ "Land_HBarrierBig_F", [22.03, -9.04, 0], 90.4 ],
|
||||
[ "Land_HBarrierBig_F", [8.22, -23.01, 0], 1.39 ],
|
||||
[ "Land_HBarrierBig_F", [-9.5, -22.89, 0], 0.36 ],
|
||||
[ "Land_HBarrierBig_F", [-16.39, 20.98, 0], 359.67 ],
|
||||
[ "Land_HBarrierBig_F", [-21.5, 17.42, 0], 91.24 ],
|
||||
[ "Land_HBarrierBig_F", [18.15, 20.89, 0], 181.2 ],
|
||||
[ "Land_HBarrierBig_F", [21.63, 17.44, 0], 89.37 ],
|
||||
[ "Land_HBarrierBig_F", [-22.04, -17.17, 0], 271.36 ],
|
||||
[ opfor_flag, [19.21, -20.29, 0], 90 ],
|
||||
[ "Land_HBarrierBig_F", [22.12, -17.82, 0], 90.4 ],
|
||||
[ "Land_HBarrierBig_F", [16.99, -23.08, 0], 1.39 ],
|
||||
[ "Land_HBarrierBig_F", [-18.27, -22.97, 0], 0.36 ]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[ opfor_fuel_truck, [1.41, 11.53, -0.03], 271.88 ],
|
||||
[ opfor_ammo_truck, [-1.45, -13.1, -0.04], 357.37 ],
|
||||
[ opfor_ammo_container, [13.59, 4.13, 0.02], 96.77 ],
|
||||
[ opfor_ammo_truck, [-7.67, -13, -0.04], 0.71 ],
|
||||
[ opfor_ammo_container, [13.76, 9.31, 0.02], 270.25 ]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[ opfor_machinegunner, [-3.53, 4.47, 0], 348.81 ],
|
||||
[ opfor_sentry, [-2.09, 5.78, 0], 288.05 ],
|
||||
[ opfor_rifleman, [-5.93, -4.74, 0], 288.05 ],
|
||||
[ opfor_sentry, [-7.45, -5.82, 0], 348.81 ],
|
||||
[ opfor_engineer, [8.02, 6.59, 0], 87.82 ],
|
||||
[ opfor_sentry, [-4.42, -10.1, 0], 349.58 ],
|
||||
[ opfor_heavygunner, [8.68, -7.9, 3.13], 335.85 ],
|
||||
[ opfor_engineer, [-4.24, 12.69, 0], 71.91 ],
|
||||
[ opfor_sentry, [-13.57, -0.21, 0], 280.01 ],
|
||||
[ opfor_rifleman, [9.47, -10.01, 0.6], 129.9 ],
|
||||
[ opfor_rifleman, [9.67, -11.29, 0.6], 53.89 ],
|
||||
[ opfor_team_leader, [10.93, -10.44, 0.6], 288.05 ],
|
||||
[ opfor_aa, [14.26, -9.29, 3.13], 48.56 ],
|
||||
[ opfor_rifleman, [11.05, -14.06, 0.6], 105.44 ],
|
||||
[ opfor_at, [8.89, -16.68, 3.13], 201.77 ],
|
||||
[ opfor_rifleman, [12.59, -14.27, 0.6], 288.05 ],
|
||||
[ opfor_rifleman, [-20.21, 2.04, 0], 286.68 ],
|
||||
[ opfor_machinegunner, [-19.96, 4.15, 0], 241.27 ],
|
||||
[ opfor_marksman, [15.84, -14.74, 3.09], 124.01 ],
|
||||
[ opfor_heavygunner, [17.02, 14.26, 4.35], 174.84 ],
|
||||
[ opfor_marksman, [-16.98, 15.1, 4.35], 210.68 ],
|
||||
[ opfor_sharpshooter, [16.58, 16.48, 4.35], 31.1 ],
|
||||
[ opfor_machinegunner, [-15.08, -18.12, 4.35], 121.82 ],
|
||||
[ opfor_heavygunner, [-17.42, 17.33, 4.35], 354.42 ],
|
||||
[ opfor_sharpshooter, [-17.31, -18.53, 4.35], 265.56 ]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[35,35,0],
|
||||
[35,-35,0],
|
||||
[-35,-35,0],
|
||||
[-35,35,0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,72 @@
|
||||
private _objects_to_build = [
|
||||
[ "Land_HelipadCircle_F", [-1.31, 11.44, 0], 0 ],
|
||||
[ opfor_transport_helo, [-1.31, 11.45, 0], 134.19 ],
|
||||
[ "Land_Cargo_Patrol_V3_F", [17.36, 1.08, 0], 269.81 ],
|
||||
[ "Land_Cargo_House_V3_F", [15.93, -7.13, 0], 90.12 ],
|
||||
[ "Land_Cargo_HQ_V3_F", [-11.82, -13.91, 0], 89.97 ],
|
||||
[ opfor_transport_truck, [-17.59, 5.76, -0.03], 310.87 ],
|
||||
[ opfor_flag, [-20.4, -2.8, 0], 90 ],
|
||||
[ "Land_PaperBox_open_full_F", [12.36, -16.46, 0], 228.14 ],
|
||||
[ opfor_flag, [20.06, 6.22, 0], 90 ],
|
||||
[ "Land_PaperBox_open_empty_F", [14.86, -16.08, 0], 2.94 ],
|
||||
[ "Land_PaperBox_closed_F", [13.68, -18.27, 0], 287.62 ],
|
||||
[ "Land_HBarrierBig_F", [-22.99, -3.72, 0], 89.34 ],
|
||||
[ "CamoNet_OPFOR_open_F", [14.88, -18.51, 0], 0 ],
|
||||
[ "Land_HBarrierBig_F", [22.88, 3.58, 0], 89.34 ],
|
||||
[ opfor_mrap, [17.18, 16.24, 0.01], 326.13 ],
|
||||
[ "Land_HBarrierBig_F", [23.08, -5.21, 0], 89.34 ],
|
||||
[ "Land_HBarrierBig_F", [0.66, -24.24, 0], 0.36 ],
|
||||
[ "Land_HBarrierBig_F", [-8.2, -24.3, 0], 0.36 ],
|
||||
[ "Land_HBarrierBig_F", [-22.79, -12.51, 0], 89.34 ],
|
||||
[ "Land_HBarrierBig_F", [9.52, -24.42, 0], 1.39 ],
|
||||
[ "Land_HBarrierBig_F", [23.35, -14.06, 0], 89.34 ],
|
||||
[ opfor_flag, [19.21, -21.72, 0], 90 ],
|
||||
[ "Land_HBarrierBig_F", [-16.97, -24.38, 0], 0.36 ],
|
||||
[ "Land_HBarrierBig_F", [18.28, -24.49, 0], 1.39 ],
|
||||
[ "Land_HBarrierBig_F", [-22.52, -21.36, 0], 89.34 ],
|
||||
[ "Land_HBarrierBig_F", [22.45, -21.48, 0], 103.04 ]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[ opfor_fuel_container, [-16.82, 17.67, -0.01], 47.97 ],
|
||||
[ opfor_ammo_container, [-0.42, -3.26, 0.02], 104.66 ],
|
||||
[ opfor_fuel_container, [-9.52, -0.47, -0.04], 295.86 ],
|
||||
[ opfor_ammo_container, [2.85, -14.48, 0], 0.69 ]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[ opfor_engineer, [2.32, 3.25, 0], 10.12 ],
|
||||
[ opfor_engineer, [3.59, 3.89, 0], 288.05 ],
|
||||
[ opfor_engineer, [2.31, 4.93, 0], 158.22 ],
|
||||
[ opfor_rifleman, [3.96, -9.85, 0], 37.83 ],
|
||||
[ opfor_machinegunner, [-9.04, -11.04, 3.13], 48.56 ],
|
||||
[ opfor_team_leader, [-12.46, -12.21, 0.6], 288.05 ],
|
||||
[ opfor_aa, [-14.62, -9.64, 3.13], 335.85 ],
|
||||
[ opfor_sharpshooter, [17.7, 2.21, 4.35], 31.1 ],
|
||||
[ opfor_aa, [-7.46, -16.48, 3.09], 124.01 ],
|
||||
[ opfor_heavygunner, [18.14, -0.02, 4.35], 174.84 ],
|
||||
[ opfor_rifleman, [-13.89, -11.76, 0.6], 129.9 ],
|
||||
[ opfor_sentry, [-13.62, -13.03, 0.6], 53.89 ],
|
||||
[ opfor_sentry, [10.86, -15.42, 0], 348.81 ],
|
||||
[ opfor_sentry, [17.87, -6.07, 0.73], 294.41 ],
|
||||
[ opfor_rifleman, [12.59, -14.14, 0], 288.05 ],
|
||||
[ opfor_rifleman, [-10.49, -15.94, 0.6], 288.05 ],
|
||||
[ opfor_sentry, [-12.03, -15.74, 0.6], 105.44 ],
|
||||
[ opfor_sentry, [17.96, -8.4, 0.73], 294.41 ],
|
||||
[ opfor_sentry, [-2.5, 20.13, 0], 288.05 ],
|
||||
[ opfor_grenadier, [-5.17, 20.37, 0], 84.75 ],
|
||||
[ opfor_engineer, [-17.83, 11.21, 0], 288.05 ],
|
||||
[ opfor_at, [-13.21, -18.42, 3.13], 196.73 ],
|
||||
[ opfor_sentry, [-20.27, 11.9, 0], 112.14 ],
|
||||
[ opfor_sentry, [13.03, 19.64, 0], 348.81 ],
|
||||
[ opfor_rifleman, [14.76, 20.92, 0], 288.05 ]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[30,40,0],
|
||||
[30,-40,0],
|
||||
[-30,-40,0],
|
||||
[-30,40,0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,63 @@
|
||||
private _objects_to_build = [
|
||||
["Land_HBarrier_Big_F", [1.26, 3.05, 0.00], 270.00],
|
||||
["Land_HBarrierWall_corridor_F", [3.15, -3.47, 0.00], 0.00],
|
||||
["Land_HBarrier_3_F", [6.63, -1.77, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [1.30, -10.24, 0.00], 270.00],
|
||||
["Land_HBarrier_3_F", [-11.31, -3.66, 0.00], 0.00],
|
||||
["Land_HBarrier_3_F", [10.17, -1.77, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [1.30, 11.84, 0.00], 270.00],
|
||||
["Land_HBarrier_3_F", [10.39, -5.08, 0.00], 0.00],
|
||||
["Land_HBarrier_5_F", [-17.00, -3.61, 0.00], 0.00],
|
||||
["Land_HBarrier_3_F", [13.91, -4.95, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [4.46, -15.53, 0.00], 0.00],
|
||||
["Land_Cargo_Patrol_V3_F", [14.31, -9.82, 0.00], 270.00],
|
||||
["Land_BarGate_F", [-2.24, -15.93, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [2.95, 17.31, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [17.88, -2.95, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-5.57, 17.11, 0.00], 0.00],
|
||||
["Land_Cargo_Patrol_V3_F", [-13.93, 12.36, 0.00], 180.00],
|
||||
["Land_HBarrier_Big_F", [17.64, 5.67, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-18.70, -3.80, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [12.73, -15.14, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-19.06, 4.79, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [11.68, 17.41, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [18.24, -11.71, 0.00], 270.00],
|
||||
["Land_HBarrierTower_F", [-14.27, -16.29, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-14.18, 16.76, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-18.39, -12.33, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [17.25, 14.49, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-19.27, 13.26, 0.00], 270.00]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_fuel_truck, [-13.32, -0.24, 0.00], 270.00],
|
||||
[opfor_ammo_truck, [-13.24, 3.86, 0.00], 270.00],
|
||||
[opfor_fuel_container, [6.71, 13.81, 0.00], 270.00],
|
||||
[opfor_ammo_container, [7.09, 1.62, 0.00], 270.00],
|
||||
[opfor_fuel_container, [6.87, 7.71, 0.00], 270.00]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_machinegunner, [3.87, -7.16, 0.00], 102.55],
|
||||
[opfor_rpg, [4.48, 10.62, 0.00], 90.00],
|
||||
[opfor_rpg, [-1.45, 14.18, 0.00], 199.35],
|
||||
[opfor_sentry, [4.03, -13.81, 0.00], 45.23],
|
||||
[opfor_engineer, [14.05, -8.39, 4.35], 58.33],
|
||||
[opfor_grenadier, [-16.46, -5.86, 0.00], 90.00],
|
||||
[opfor_machinegunner, [-16.45, 6.53, 0.00], 90.00],
|
||||
[opfor_sentry, [-12.40, 12.03, 4.35], 0.00],
|
||||
[opfor_rifleman, [14.11, -11.35, 4.35], 134.48],
|
||||
[opfor_rifleman, [-15.71, 12.02, 4.35], 355.76],
|
||||
[opfor_rifleman, [14.62, 15.10, 0.00], 180.00],
|
||||
[opfor_rifleman, [-13.29, -17.54, 2.28], 163.03],
|
||||
[opfor_heavygunner, [-14.64, -17.31, 2.28], 180.00]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,70 @@
|
||||
private _objects_to_build = [
|
||||
["Land_HBarrier_Big_F", [-0.69, -3.60, 0.00], 270.00],
|
||||
["Land_HBarrierWall4_F", [-4.80, 0.99, 0.00], 180.00],
|
||||
["Land_HBarrier_5_F", [4.39, -1.64, 0.00], 0.00],
|
||||
["Land_HBarrier_5_F", [4.55, -7.50, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-8.78, 2.77, 0.00], 270.00],
|
||||
["Land_HBarrier_5_F", [10.12, -1.58, 0.00], 0.00],
|
||||
["Land_Cargo_House_V3_F", [10.28, -6.52, 0.00], 0.00],
|
||||
["Land_HBarrierWall_corner_F", [0.68, -13.90, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-9.26, 11.33, 0.00], 270.00],
|
||||
["Land_Cargo_Tower_V3_F", [-1.90, 7.25, 0.00], 180.00],
|
||||
["Land_HBarrier_Big_F", [16.38, -5.51, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [4.00, 16.85, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-4.72, 16.74, 0.00], 0.00],
|
||||
["Land_BarGate_F", [-3.40, -15.97, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [2.53, -17.80, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [11.20, -17.64, 0.00], 0.00],
|
||||
["Land_HBarrierWall_corner_F", [-13.71, -15.85, 0.00], 90.00],
|
||||
[opfor_flag, [13.91, -15.57, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [12.50, 17.11, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [21.62, -1.75, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [16.65, -14.10, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-14.65, 16.14, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-22.73, -0.69, 0.00], 0.00],
|
||||
["Land_Cargo_Patrol_V3_F", [-21.66, -10.67, 0.00], 90.00],
|
||||
["Land_HBarrier_Big_F", [24.93, 3.64, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-22.27, 12.82, 0.00], 133.60],
|
||||
["Land_HBarrier_Big_F", [-25.24, 4.73, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-19.88, -17.77, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-25.81, -6.16, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [20.92, 17.41, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [24.76, 12.32, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-25.42, -14.65, 0.00], 270.00]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_ammo_truck, [-13.14, 10.16, 0.00], 0.00],
|
||||
[opfor_fuel_container, [18.22, 5.43, 0.00], 270.00],
|
||||
[opfor_fuel_container, [17.86, 11.39, 0.00], 270.00],
|
||||
[opfor_fuel_truck, [-17.96, 9.56, 0.00], 0.00]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_heavygunner, [-5.65, 0.87, 1.25], 196.97],
|
||||
[opfor_rifleman, [8.77, -4.14, 0.73], 133.49],
|
||||
[opfor_grenadier, [12.04, -4.37, 0.73], 205.94],
|
||||
[opfor_heavygunner, [0.80, -16.01, 1.25], 224.40],
|
||||
[opfor_rifleman, [-4.46, 5.64, 15.37], 0.00],
|
||||
[opfor_rifleman, [1.55, 11.61, 12.77], 202.68],
|
||||
[opfor_at, [1.20, 3.98, 17.89], 176.06],
|
||||
[opfor_rifleman, [10.76, -15.11, 0.00], 291.66],
|
||||
[opfor_sentry, [-16.09, 10.06, 0.00], 184.01],
|
||||
[opfor_rifleman, [18.18, 8.32, 0.00], 264.25],
|
||||
[opfor_marksman, [-5.72, 10.17, 17.89], 287.12],
|
||||
[opfor_rifleman, [-14.59, -16.40, 1.24], 156.40],
|
||||
[opfor_medic, [22.50, 1.32, 0.00], 275.86],
|
||||
[opfor_rifleman, [-23.11, 1.83, 0.00], 77.87],
|
||||
[opfor_rifleman, [-21.51, -9.11, 4.35], 279.37],
|
||||
[opfor_sentry, [-23.58, -2.96, 0.00], 118.12],
|
||||
[opfor_marksman, [-21.28, -12.32, 4.35], 232.31]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,85 @@
|
||||
private _objects_to_build = [
|
||||
["Land_BarGate_F", [25.69, 12.03, 0.00], 257.61],
|
||||
["Land_Cargo_House_V3_F", [6.05, 17.88, 0.00], 0.00],
|
||||
["Land_Cargo_Patrol_V3_F", [-18.68, 18.47, 0.00], 180.00],
|
||||
["Land_Cargo_Patrol_V3_F", [23.76, -10.91, 0.00], 270.00],
|
||||
["Land_Cargo_Tower_V3_F", [-4.99, -5.71, 0.00], 180.00],
|
||||
["Land_HBarrier_Big_F", [-10.92, 22.43, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-11.55, -10.66, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-11.58, -2.00, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-12.47, -28.10, 0.00], 25.81],
|
||||
["Land_HBarrier_Big_F", [-12.81, 16.72, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-13.96, 3.47, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-19.69, 22.10, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-19.71, -23.42, 0.00], 222.44],
|
||||
["Land_HBarrier_Big_F", [-2.15, 22.72, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-22.39, 3.29, 0.00], 180.12],
|
||||
["Land_HBarrier_Big_F", [-25.43, -16.67, 0.00], 63.49],
|
||||
["Land_HBarrier_Big_F", [-26.11, 17.30, 0.00], 299.18],
|
||||
["Land_HBarrier_Big_F", [-27.46, -8.47, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-27.75, 0.13, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-28.03, 8.89, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-3.88, -30.03, 0.00], 6.18],
|
||||
["Land_HBarrier_Big_F", [-5.77, 3.82, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-6.24, -13.67, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-7.83, -24.34, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [1.02, -18.87, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [11.27, 17.63, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [11.46, -0.32, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [11.64, -11.36, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [11.87, -20.07, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [13.46, -27.49, 0.00], 341.74],
|
||||
["Land_HBarrier_Big_F", [14.74, -5.71, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [15.58, 22.08, 0.00], 198.74],
|
||||
["Land_HBarrier_Big_F", [2.81, 3.93, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [20.94, -23.33, 0.00], 324.95],
|
||||
["Land_HBarrier_Big_F", [22.75, 17.19, 0.00], 230.73],
|
||||
["Land_HBarrier_Big_F", [23.45, -5.60, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [26.55, -16.84, 0.00], 299.95],
|
||||
["Land_HBarrier_Big_F", [28.45, -0.09, 0.00], 263.54],
|
||||
["Land_HBarrier_Big_F", [28.92, -8.70, 0.00], 274.95],
|
||||
["Land_HBarrier_Big_F", [4.95, -29.68, 0.00], 354.59],
|
||||
["Land_HBarrier_Big_F", [6.30, -1.30, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [6.52, -9.98, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [6.78, -18.56, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [6.93, 23.16, 0.00], 180.13],
|
||||
[opfor_flag, [14.12, 19.01, 0.00], 0.00],
|
||||
[opfor_mrap_armed, [23.49, 2.01, -0.00], 0.00],
|
||||
[opfor_mrap, [16.54, 1.76, -0.00], 0.00]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_ammo_container, [-20.65, -16.90, 0.00], 326.51],
|
||||
[opfor_ammo_container, [-13.62, -23.20, 0.00], 306.22],
|
||||
[opfor_ammo_truck, [-9.16, 16.70, 0.00], 0.00],
|
||||
[opfor_fuel_container, [-18.07, -7.63, 0.00], 270.00],
|
||||
[opfor_fuel_truck, [-4.62, 16.86, 0.00], 0.00],
|
||||
[opfor_fuel_container, [-18.02, -2.18, 0.00], 270.00]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_engineer, [1.33, 20.43, 0.00], 224.42],
|
||||
[opfor_heavygunner, [-9.34, -1.30, 17.89], 0.00],
|
||||
[opfor_medic, [-15.26, 18.70, 0.00], 198.18],
|
||||
[opfor_officer, [4.52, 20.27, 0.73], 121.81],
|
||||
[opfor_sharpshooter, [23.62, -12.61, 4.35], 90.59],
|
||||
[opfor_rifleman, [-2.12, -1.42, 12.77], 205.28],
|
||||
[opfor_rifleman, [-20.20, 18.70, 4.35], 0.00],
|
||||
[opfor_rifleman, [-6.93, -5.71, 15.37], 0.00],
|
||||
[opfor_rifleman, [20.35, -0.20, 0.00], 0.00],
|
||||
[opfor_rifleman, [3.38, 0.09, 0.00], 182.65],
|
||||
[opfor_rpg, [0.18, -8.11, 17.79], 129.88],
|
||||
[opfor_sentry, [-25.60, 0.02, 0.00], 156.91],
|
||||
[opfor_marksman, [-17.47, 18.68, 4.35], 0.00],
|
||||
[opfor_marksman, [23.70, -9.01, 4.35], 74.26],
|
||||
[opfor_grenadier, [14.67, -8.28, 0.00], 160.61]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,66 @@
|
||||
private _objects_to_build = [
|
||||
[opfor_flag, [-19.05, -5.29, 0.00], 0.00],
|
||||
[opfor_flag, [2.55, 4.91, 0.00], 0.00],
|
||||
["Land_BarGate_F", [-18.53, 3.79, 0.00], 270.00],
|
||||
["Land_Cargo_HQ_V3_F", [8.99, 1.74, 0.00], 0.00],
|
||||
["Land_Cargo_Patrol_V3_F", [-3.15, 24.19, 0.00], 180.00],
|
||||
["Land_HBarrier_Big_F", [-11.04, -17.98, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-11.45, 19.44, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-16.53, -7.99, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-16.80, 9.31, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [-2.23, -17.62, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-3.20, 28.38, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [-8.29, 25.01, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [14.65, 20.26, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [15.06, -17.16, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [2.51, 25.17, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [20.34, 10.15, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [20.43, 1.59, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [20.60, -7.15, 0.00], 270.00],
|
||||
["Land_HBarrier_Big_F", [5.93, 20.00, 0.00], 0.00],
|
||||
["Land_HBarrier_Big_F", [6.34, -17.42, 0.00], 0.00],
|
||||
["Land_HBarrierTower_F", [-17.31, -15.72, 0.00], 90.00],
|
||||
["Land_HBarrierTower_F", [-17.88, 17.11, 0.00], 90.00],
|
||||
["Land_HBarrierTower_F", [21.12, 18.04, 0.00], 270.00],
|
||||
["Land_HBarrierTower_F", [21.43, -14.52, 0.00], 270.00],
|
||||
[opfor_mrap, [-12.85, -10.52, -0.00], 180.00],
|
||||
[opfor_transport_truck, [-8.65, -8.70, 0.00], 180.00]
|
||||
];
|
||||
private _objectives_to_build = [
|
||||
[opfor_ammo_container, [12.70, -11.73, 0.00], 0.00],
|
||||
[opfor_ammo_container, [8.19, -11.71, 0.00], 0.00],
|
||||
[opfor_fuel_container, [12.28, 15.45, 0.00], 0.00],
|
||||
[opfor_fuel_container, [7.56, 15.24, 0.00], 0.00],
|
||||
[opfor_ammo_truck, [-12.86, 10.58, 0.00], 0.00],
|
||||
[opfor_fuel_truck, [-8.32, 10.38, 0.00], 0.00]
|
||||
];
|
||||
private _defenders_to_build = [
|
||||
[opfor_engineer, [-10.53, -4.64, 0.00], 0.00],
|
||||
[opfor_heavygunner, [-18.74, -15.05, 2.28], 270.00],
|
||||
[opfor_heavygunner, [22.80, 18.84, 2.28], 0.00],
|
||||
[opfor_heavygunner, [6.31, -14.37, 0.00], 318.61],
|
||||
[opfor_medic, [12.50, 1.07, 0.60], 244.47],
|
||||
[opfor_squad_leader, [7.16, -3.84, 0.60], 308.87],
|
||||
[opfor_at, [5.57, 4.09, 3.13], 270.00],
|
||||
[opfor_rifleman, [-10.39, 6.70, 0.00], 181.51],
|
||||
[opfor_rifleman, [-18.42, -16.71, 2.28], 263.48],
|
||||
[opfor_rifleman, [-19.11, 5.66, 0.00], 251.10],
|
||||
[opfor_rifleman, [-19.58, 16.36, 2.28], 262.09],
|
||||
[opfor_rifleman, [-4.32, 24.55, 4.35], 0.00],
|
||||
[opfor_rifleman, [22.19, -15.53, 2.28], 155.63],
|
||||
[opfor_rifleman, [23.32, -13.89, 2.28], 84.56],
|
||||
[opfor_rifleman, [5.96, -3.84, 3.13], 265.58],
|
||||
[opfor_sentry, [-20.00, 17.92, 2.28], 0.00],
|
||||
[opfor_sentry, [10.18, 11.45, 0.00], 214.49],
|
||||
[opfor_marksman, [-2.31, 24.52, 4.35], 0.00],
|
||||
[opfor_grenadier, [-6.11, -14.77, 0.00], 0.00],
|
||||
[opfor_grenadier, [22.96, 17.33, 2.28], 82.66]
|
||||
];
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
--- USAGE ---
|
||||
|
||||
Place this file in the Eden mission folder where you want to build your FOB templates.
|
||||
After building your FOB in Eden, place down a center object in the middle of your FOB.
|
||||
I recommend a small cluttercutter object (Land_ClutterCutter_small_F) for this.
|
||||
|
||||
In the init field of the center object add:
|
||||
_ = [this] execVM "export_template.sqf";
|
||||
|
||||
Then preview the mission in eden to execute the script.
|
||||
|
||||
The fetched information can be found in your client rpt (between the START and END line) for copy/paste.
|
||||
Ref for finding your RPT file: https://community.bistudio.com/wiki/Crash_Files#Arma_3
|
||||
|
||||
--- RECOMMENDATIONS ---
|
||||
|
||||
!IMPORTANT! Don't (!) exceed an area with a radius of 35m for the FOB. !IMPORTANT!
|
||||
|
||||
You could create a trigger with that radius and use it as "build area helper".
|
||||
After exporting the template, you should replace possible placed vehicles or crates etc. with the Liberation variables.
|
||||
Have a look at the other templates to get an idea of it.
|
||||
*/
|
||||
|
||||
params [
|
||||
["_center", player, [objNull]]
|
||||
];
|
||||
|
||||
diag_log text "";
|
||||
diag_log text "";
|
||||
diag_log text "[KP LIBERATION] [FOB EXPORT] ---------- START ----------";
|
||||
|
||||
// Fetch all objects
|
||||
diag_log text "";
|
||||
diag_log text "private _objects_to_build = [";
|
||||
{
|
||||
diag_log text format [
|
||||
" [""%1"", [%2, %3, %4], %5],",
|
||||
typeof _x,
|
||||
((getpos _x select 0) - (getpos _center select 0)) toFixed 2,
|
||||
((getpos _x select 1) - (getpos _center select 1)) toFixed 2,
|
||||
(getposatl _x select 2) toFixed 2,
|
||||
(getdir _x) toFixed 2
|
||||
];
|
||||
} forEach ((nearestObjects [_center, ["All"], 40]) - ((nearestObjects [_center, ["Man","Animal"], 40]) + [_center]));
|
||||
diag_log text "];";
|
||||
|
||||
diag_log text "";
|
||||
diag_log text "private _objectives_to_build = [";
|
||||
diag_log text " // Move all things which should be destroyed to accomplish the mission from the above to this array";
|
||||
diag_log text "];";
|
||||
|
||||
// Fetch all infantry/guards
|
||||
diag_log text "";
|
||||
diag_log text "private _defenders_to_build = [";
|
||||
{
|
||||
diag_log text format [
|
||||
" [""%1"", [%2, %3, %4], %5],",
|
||||
typeof _x,
|
||||
((getpos _x select 0) - (getpos _center select 0)) toFixed 2,
|
||||
((getpos _x select 1) - (getpos _center select 1)) toFixed 2,
|
||||
(getposatl _x select 2) toFixed 2,
|
||||
(getdir _x) toFixed 2
|
||||
];
|
||||
} forEach ((nearestObjects [_center, ["Man"], 40]) - ((nearestObjects [_center, [ "Animal" ], 40]) + [_center]));
|
||||
diag_log text "];";
|
||||
|
||||
diag_log text "";
|
||||
diag_log text "private _base_corners = [";
|
||||
diag_log text " [40, 40, 0],";
|
||||
diag_log text " [40, -40, 0],";
|
||||
diag_log text " [-40, -40, 0],";
|
||||
diag_log text " [-40, 40, 0],";
|
||||
diag_log text "];";
|
||||
|
||||
diag_log text "";
|
||||
diag_log text "[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]";
|
||||
|
||||
diag_log text "";
|
||||
diag_log text "[KP LIBERATION] [FOB EXPORT] ---------- END ----------";
|
||||
diag_log text "";
|
||||
diag_log text "";
|
||||
|
||||
true
|
||||
@@ -0,0 +1,57 @@
|
||||
private _objects_to_build = [
|
||||
["csj_VCshelter01", [-3.22, -7.46, 0.00], 180.00],
|
||||
["Land_Campfire_burning", [-1.45, -2.75, -0.04], 0.00],
|
||||
["LAND_uns_firepit1", [-5.16, 6.73, 0.00], 0.00],
|
||||
["LAND_uns_vcshelter4", [13.86, 2.46, 0.00], 270.00],
|
||||
["LAND_uns_vcshelter4", [13.93, -2.34, 0.00], 270.00],
|
||||
["LAND_uns_vcshelter6", [-10.17, 4.53, 0.00], 61.07],
|
||||
["LAND_uns_vcshelter6", [-3.45, 11.60, 0.00], 0.00],
|
||||
["LAND_uns_vcshelter6", [-8.32, 9.97, 0.00], 153.44],
|
||||
["LAND_uns_vctower1", [10.47, -11.34, 0.00], 324.04],
|
||||
["LAND_uns_vctower1", [12.42, 14.10, 0.00], 211.82],
|
||||
["LAND_uns_vctower2", [-11.86, -6.29, 0.00], 57.67],
|
||||
[opfor_mrap_armed, [5.61, 12.49, -0.00], 90.00],
|
||||
[opfor_flag, [0.39, -10.73, 0.00], 0.00],
|
||||
["Vil_Fence", [-13.37, 11.66, 0.00], 270.00],
|
||||
["Vil_Fence", [-13.42, 5.62, 0.00], 270.00],
|
||||
["Vil_Fence", [-2.75, 15.24, 0.00], 0.00],
|
||||
["Vil_Fence", [-2.98, -11.88, 0.00], 0.00],
|
||||
["Vil_Fence", [-8.69, 15.22, 0.00], 323.79],
|
||||
["Vil_Fence", [17.07, 6.81, 0.00], 270.00],
|
||||
["Vil_Fence", [17.13, 0.67, 0.00], 270.00],
|
||||
["Vil_Fence", [2.98, -11.87, 0.00], 0.00],
|
||||
["Vil_Fence", [3.49, 15.37, 0.00], 0.00],
|
||||
["Vil_Fence", [9.04, -11.90, 0.00], 0.00],
|
||||
["Vil_Fence", [9.63, 15.27, 0.00], 0.00]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_fuel_container, [13.71, -1.74, 0.00], 270.00],
|
||||
[opfor_ammo_container, [13.61, 3.38, 0.00], 270.00]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_engineer, [4.25, 10.00, 0.00], 176.53],
|
||||
[opfor_heavygunner, [12.59, 14.31, 4.85], 35.26],
|
||||
[opfor_medic, [-2.52, -5.68, 0.00], 209.23],
|
||||
[opfor_officer, [-2.23, -8.35, 0.00], 336.06],
|
||||
[opfor_rifleman, [-12.16, 0.48, 0.00], 258.30],
|
||||
[opfor_rifleman, [-4.69, -7.79, 0.00], 23.76],
|
||||
[opfor_rifleman, [-4.84, 8.98, 0.00], 165.32],
|
||||
[opfor_rifleman, [1.21, -9.56, 0.00], 157.97],
|
||||
[opfor_rifleman, [10.06, 1.24, 0.00], 255.76],
|
||||
[opfor_rifleman, [10.65, -11.13, 4.86], 155.65],
|
||||
[opfor_rifleman, [15.96, 6.35, 0.00], 78.60],
|
||||
[opfor_rpg, [-7.23, 13.95, 0.00], 312.21],
|
||||
[opfor_sentry, [-7.64, 5.85, 0.00], 99.50],
|
||||
[opfor_marksman, [-12.80, -6.27, 4.80], 248.21]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,70 @@
|
||||
private _objects_to_build = [
|
||||
["csj_VCbunk01", [-17.58, -2.59, 0.00], 90.00],
|
||||
["csj_VCshelter01", [-14.59, 14.24, 0.00], 332.83],
|
||||
["csj_VCshelter01", [7.63, 12.90, 0.00], 20.24],
|
||||
["Land_Campfire_burning", [-3.66, 1.91, -0.03], 0.00],
|
||||
["LAND_uns_crate6", [-14.81, 15.10, 0.00], 149.10],
|
||||
["LAND_uns_eastbunker2", [15.23, -13.65, 0.00], 301.85],
|
||||
["LAND_uns_eastbunker2", [16.35, 4.79, 0.00], 252.88],
|
||||
["LAND_uns_vcshelter1", [-1.84, 5.94, 0.00], 0.00],
|
||||
["LAND_uns_vcshelter1", [-5.30, 5.93, 0.00], 0.00],
|
||||
["LAND_uns_vcshelter4", [-4.57, -12.19, 0.00], 0.00],
|
||||
["LAND_uns_vcshelter4", [0.56, -12.12, 0.00], 0.00],
|
||||
["LAND_uns_vcshelter4", [5.59, -11.87, 0.00], 0.00],
|
||||
["LAND_uns_vctower1", [-10.29, -12.49, 0.00], 22.32],
|
||||
["LAND_uns_villseat", [-1.36, 5.83, 0.00], 5.87],
|
||||
["LAND_uns_villseat", [-3.15, 5.83, 0.00], 355.74],
|
||||
["LAND_uns_villseat", [-4.65, 5.90, 0.00], 351.41],
|
||||
["LAND_uns_villseat", [-6.29, 5.83, 0.00], 0.00],
|
||||
["LAND_uns_villtable1a", [-5.51, 5.85, 0.00], 0.00],
|
||||
["uns_crate1", [-13.79, 15.85, 0.00], 163.23],
|
||||
[opfor_flag, [14.77, -9.94, 0.00], 0.00],
|
||||
[opfor_flag, [15.10, 1.55, 0.00], 0.00],
|
||||
["uns_villtable1", [-2.26, 5.86, 0.00], 0.00],
|
||||
["Vil_Fence", [-0.27, 16.94, 0.00], 205.79],
|
||||
["Vil_Fence", [-0.65, -15.95, 0.00], 0.00],
|
||||
["Vil_Fence", [-11.76, 15.16, 0.00], 165.34],
|
||||
["Vil_Fence", [-13.68, -10.35, 0.00], 60.18],
|
||||
["Vil_Fence", [-16.58, 5.64, 0.00], 270.00],
|
||||
["Vil_Fence", [-16.67, 5.85, 0.00], 90.00],
|
||||
["Vil_Fence", [-5.97, 16.63, 0.00], 177.63],
|
||||
["Vil_Fence", [10.30, 11.70, 0.00], 238.67],
|
||||
["Vil_Fence", [12.19, -14.97, 0.00], 349.45],
|
||||
["Vil_Fence", [5.31, -16.06, 0.00], 0.00]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_ammo_truck, [2.50, -6.89, 0.00], 90.00],
|
||||
[opfor_fuel_container, [-3.77, -11.61, 0.00], 0.00],
|
||||
[opfor_fuel_container, [1.46, -11.62, 0.00], 0.00],
|
||||
[opfor_fuel_container, [6.37, -11.54, 0.00], 0.00]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_engineer, [-1.39, -7.99, 0.00], 320.58],
|
||||
[opfor_heavygunner, [-18.11, -3.26, 0.00], 253.65],
|
||||
[opfor_medic, [-12.55, 13.97, 0.00], 177.21],
|
||||
[opfor_medic, [-3.45, 15.76, 0.00], 0.00],
|
||||
[opfor_rifleman, [-14.83, 13.12, 0.00], 138.45],
|
||||
[opfor_rifleman, [-18.42, -1.54, 0.00], 319.02],
|
||||
[opfor_rifleman, [-6.20, -14.27, 0.00], 244.68],
|
||||
[opfor_rifleman, [11.79, 7.26, 0.00], 58.15],
|
||||
[opfor_rifleman, [13.05, -8.81, 0.00], 39.37],
|
||||
[opfor_rpg, [16.12, -13.59, 0.00], 70.33],
|
||||
[opfor_sentry, [-11.88, 0.79, 0.00], 0.00],
|
||||
[opfor_sentry, [-5.27, 3.62, 0.00], 143.78],
|
||||
[opfor_marksman, [-10.45, -12.21, 4.84], 206.60],
|
||||
[opfor_squad_leader, [7.02, 13.98, 0.00], 190.09],
|
||||
[opfor_team_leader, [9.40, 12.45, 0.00], 240.68],
|
||||
[opfor_grenadier, [-1.73, 3.11, 0.00], 215.79],
|
||||
[opfor_grenadier, [16.61, 5.00, 0.00], 71.25]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,64 @@
|
||||
private _objects_to_build = [
|
||||
["csj_VCbunk01", [2.11, 12.76, 0.00], 180.00],
|
||||
["Land_Campfire_burning", [-9.11, 3.99, 0.00], 0.00],
|
||||
["LAND_uns_eastbunker1", [-16.60, -12.28, 0.00], 60.70],
|
||||
["LAND_uns_eastbunker1", [16.15, 13.08, 0.00], 245.97],
|
||||
["LAND_uns_eastbunker2", [-10.93, 18.73, 0.00], 164.64],
|
||||
["LAND_uns_eastbunker2", [10.31, -16.80, 0.00], 323.39],
|
||||
["LAND_uns_vcshelter2", [-10.73, 6.26, 0.00], 9.31],
|
||||
["LAND_uns_vcshelter2", [-11.45, 1.27, 0.00], 347.58],
|
||||
["LAND_uns_vcshelter2", [-7.96, 8.47, 0.00], 63.79],
|
||||
["LAND_uns_vcshelter4", [-5.80, -14.27, 0.00], 270.00],
|
||||
["LAND_uns_vcshelter4", [-5.87, -9.61, 0.00], 270.00],
|
||||
["LAND_uns_vcshelter4", [1.77, -14.25, 0.00], 270.00],
|
||||
["LAND_uns_vcshelter4", [1.78, -9.53, 0.00], 270.00],
|
||||
[opfor_flag, [-15.79, -3.95, 0.00], 0.00],
|
||||
[opfor_flag, [16.39, 1.56, 0.00], 0.00],
|
||||
["Vil_Fence", [-0.49, -16.46, 0.00], 0.00],
|
||||
["Vil_Fence", [-1.22, 16.53, 0.00], 0.00],
|
||||
["Vil_Fence", [-15.78, 9.56, 0.00], 114.93],
|
||||
["Vil_Fence", [-17.10, -2.51, 0.00], 86.64],
|
||||
["Vil_Fence", [-17.32, 3.62, 0.00], 102.65],
|
||||
["Vil_Fence", [-6.45, -16.40, 0.00], 0.00],
|
||||
["Vil_Fence", [12.93, -12.98, 0.00], 107.43],
|
||||
["Vil_Fence", [16.42, 2.24, 0.00], 81.60],
|
||||
["Vil_Fence", [4.74, 16.50, 0.00], 0.00],
|
||||
["Vil_Fence", [4.98, 16.37, 0.00], 190.02],
|
||||
["Vil_Fence", [5.42, -16.54, 0.00], 0.00]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_ammo_container, [1.76, -8.89, 0.00], 270.00],
|
||||
[opfor_ammo_container, [1.85, -13.44, 0.00], 270.00],
|
||||
[opfor_fuel_container, [-6.11, -13.37, 0.00], 270.00],
|
||||
[opfor_fuel_container, [-6.15, -8.81, 0.00], 270.00]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_engineer, [14.44, 1.66, 0.00], 124.27],
|
||||
[opfor_heavygunner, [3.22, 13.79, 0.00], 0.00],
|
||||
[opfor_medic, [2.37, 3.09, 0.00], 86.61],
|
||||
[opfor_officer, [0.73, 13.99, 0.00], 154.25],
|
||||
[opfor_rifleman, [-11.72, 19.08, 0.00], 308.60],
|
||||
[opfor_rifleman, [-14.81, -10.93, 0.00], 297.93],
|
||||
[opfor_rifleman, [-2.47, -11.92, 0.00], 0.00],
|
||||
[opfor_rifleman, [11.05, -16.87, 0.00], 103.44],
|
||||
[opfor_rifleman, [13.61, -6.92, 0.00], 70.80],
|
||||
[opfor_rifleman, [14.00, 11.59, 0.00], 107.80],
|
||||
[opfor_rpg, [9.81, -17.28, 0.00], 183.70],
|
||||
[opfor_sentry, [-11.14, 1.90, 0.00], 64.87],
|
||||
[opfor_sentry, [-2.53, 15.10, 0.00], 0.00],
|
||||
[opfor_sentry, [3.43, 0.56, 0.00], 0.00],
|
||||
[opfor_marksman, [-10.66, 19.57, 0.00], 0.00],
|
||||
[opfor_grenadier, [-10.48, 6.93, 0.00], 121.83],
|
||||
[opfor_grenadier, [14.28, 12.52, 0.00], 0.00]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,67 @@
|
||||
private _objects_to_build = [
|
||||
["Land_Campfire_burning", [-2.54, 0.11, -0.03], 0.00],
|
||||
["LAND_uns_vcshelter1", [-3.90, 0.16, 0.00], 0.00],
|
||||
["LAND_uns_vcshelter2", [5.75, 9.72, 0.00], 90.00],
|
||||
["LAND_uns_vcshelter2", [9.24, 6.72, 0.00], 175.56],
|
||||
["LAND_uns_vctower1", [-13.31, 13.96, 0.00], 144.79],
|
||||
["LAND_uns_vctower1", [-14.13, -13.21, 0.00], 42.90],
|
||||
["LAND_uns_vctower1", [12.95, -12.88, 0.00], 318.28],
|
||||
["LAND_uns_vctower1", [13.68, 14.05, 0.00], 224.50],
|
||||
[opfor_mrap, [9.04, -7.43, -0.00], 270.00],
|
||||
[opfor_flag, [-6.05, -13.43, 0.00], 0.00],
|
||||
[opfor_flag, [0.55, 14.33, 0.00], 0.00],
|
||||
["Vil_Fence", [-14.66, 12.34, 0.00], 270.00],
|
||||
["Vil_Fence", [-14.71, 6.41, 0.00], 270.00],
|
||||
["Vil_Fence", [-14.77, 0.42, 0.00], 270.00],
|
||||
["Vil_Fence", [-14.86, -5.61, 0.00], 270.00],
|
||||
["Vil_Fence", [-6.15, 14.69, 0.00], 0.00],
|
||||
["Vil_Fence", [-6.50, -14.03, 0.00], 0.00],
|
||||
["Vil_Fence", [11.80, -13.94, 0.00], 0.00],
|
||||
["Vil_Fence", [12.15, 14.78, 0.00], 0.00],
|
||||
["Vil_Fence", [14.65, -5.31, 0.00], 270.00],
|
||||
["Vil_Fence", [14.74, 0.72, 0.00], 270.00],
|
||||
["Vil_Fence", [14.79, 6.71, 0.00], 270.00],
|
||||
["Vil_Fence", [14.85, 12.65, 0.00], 270.00],
|
||||
["Vil_Fence", [5.86, -13.88, 0.00], 0.00],
|
||||
["Vil_Fence", [6.21, 14.84, 0.00], 0.00],
|
||||
["wx_chair", [-3.49, 1.43, 0.00], 322.25],
|
||||
["wx_chair", [-4.20, -0.30, 0.00], 283.18]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_ammo_truck, [9.96, -2.73, 0.00], 270.00],
|
||||
[opfor_fuel_truck, [10.24, 2.73, 0.00], 270.00],
|
||||
[opfor_ammo_container, [-10.12, -7.24, 0.00], 270.00],
|
||||
[opfor_ammo_container, [-9.74, -2.72, 0.00], 270.00],
|
||||
[opfor_fuel_container, [-9.75, 2.07, 0.00], 270.00],
|
||||
[opfor_fuel_container, [-9.82, 6.30, 0.00], 270.00]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_engineer, [12.94, -4.11, 0.00], 93.06],
|
||||
[opfor_heavygunner, [-13.52, -13.88, 4.88], 186.59],
|
||||
[opfor_medic, [8.98, 11.77, 0.00], 210.35],
|
||||
[opfor_rifleman, [-13.37, 0.92, 0.00], 271.85],
|
||||
[opfor_rifleman, [-13.78, 13.34, 4.87], 235.25],
|
||||
[opfor_rifleman, [-4.09, 0.81, 0.00], 114.75],
|
||||
[opfor_rifleman, [-6.94, 13.46, 0.00], 0.00],
|
||||
[opfor_rifleman, [14.09, 13.37, 4.83], 98.03],
|
||||
[opfor_at, [6.97, 0.37, 0.00], 285.40],
|
||||
[opfor_sentry, [-14.61, -12.85, 4.83], 239.93],
|
||||
[opfor_sentry, [-4.64, -1.39, 0.00], 147.93],
|
||||
[opfor_sentry, [12.63, -13.31, 4.83], 197.32],
|
||||
[opfor_marksman, [-13.29, 14.03, 4.85], 323.41],
|
||||
[opfor_marksman, [12.96, 14.41, 4.87], 0.00],
|
||||
[opfor_marksman, [13.41, -12.52, 4.86], 126.65],
|
||||
[opfor_squad_leader, [9.30, 8.28, 0.00], 250.30],
|
||||
[opfor_grenadier, [1.15, -12.96, 0.00], 206.96]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
@@ -0,0 +1,80 @@
|
||||
private _objects_to_build = [
|
||||
["csj_VCbunk01", [-2.92, -19.96, 0.00], 17.74],
|
||||
["csj_VCbunk01", [18.36, -8.12, 0.00], 284.30],
|
||||
["csj_VCshelter01", [-12.86, -11.05, 0.00], 238.31],
|
||||
["csj_VCshelter01", [-15.63, -5.00, 0.00], 253.72],
|
||||
["csj_VCshelter01", [-16.15, 1.49, 0.00], 269.83],
|
||||
["Land_Campfire_burning", [-6.25, -5.76, 0.00], 0.00],
|
||||
["Land_CongCage", [12.43, -13.26, 0.00], 34.77],
|
||||
["Land_CongCage", [13.73, -11.25, 0.00], 19.58],
|
||||
["LAND_uns_vcshelter4", [12.02, 7.05, 0.00], 243.49],
|
||||
["LAND_uns_vcshelter4", [14.64, 1.79, 0.00], 248.42],
|
||||
["LAND_uns_vcshelter4", [8.44, 12.23, 0.00], 222.74],
|
||||
["LAND_uns_vctower1", [-16.64, 9.00, 0.00], 88.93],
|
||||
["LAND_uns_vctower1", [0.36, 19.12, 0.00], 179.83],
|
||||
["LAND_uns_vctower2", [-10.19, 17.03, 0.00], 138.17],
|
||||
["LAND_uns_villseat", [-3.60, -1.42, 0.00], 353.67],
|
||||
["LAND_uns_villseat", [-3.72, 2.47, 0.00], 173.03],
|
||||
["LAND_uns_villseat", [-5.30, -1.47, 0.00], 0.00],
|
||||
["LAND_uns_villseat", [-5.43, 2.58, 0.00], 355.54],
|
||||
["LAND_uns_villseat", [-7.23, 2.51, 0.00], 4.85],
|
||||
["LAND_uns_villseat", [-7.24, -1.44, 0.00], 5.24],
|
||||
["LAND_uns_villseat", [-9.06, 2.52, 0.00], 355.69],
|
||||
["LAND_uns_villseat", [-9.11, -1.45, 0.00], 4.71],
|
||||
[opfor_mrap, [-3.07, 15.27, -0.00], 89.49],
|
||||
["uns_bench1", [-4.67, -6.81, 0.00], 30.92],
|
||||
["uns_bench1", [-7.78, -7.16, 0.00], 136.72],
|
||||
[opfor_flag, [12.70, -15.73, 0.00], 0.00],
|
||||
[opfor_flag, [4.94, -19.60, 0.00], 0.00],
|
||||
["uns_villtable1", [-4.48, -1.54, 0.00], 0.00],
|
||||
["uns_villtable1", [-4.62, 2.33, 0.00], 0.00],
|
||||
["uns_villtable1", [-8.15, 2.62, 0.00], 0.00],
|
||||
["uns_villtable1", [-8.18, -1.47, 0.00], 0.00],
|
||||
["Vil_Fence", [-16.69, 12.13, 0.00], 129.93],
|
||||
["Vil_Fence", [-2.38, 19.26, 0.00], 0.67],
|
||||
["Vil_Fence", [-5.93, -17.85, 0.00], 36.44],
|
||||
["Vil_Fence", [12.36, 14.38, 0.00], 232.54],
|
||||
["Vil_Fence", [16.06, 9.59, 0.00], 246.56],
|
||||
["Vil_Fence", [16.91, -11.44, 0.00], 307.87],
|
||||
["Vil_Fence", [18.50, 4.07, 0.00], 261.70],
|
||||
["Vil_Fence", [5.68, -20.35, 0.00], 0.67],
|
||||
["Vil_Fence", [7.69, 18.17, 0.00], 218.47]
|
||||
];
|
||||
|
||||
private _objectives_to_build = [
|
||||
[opfor_ammo_container, [11.83, 7.85, 0.00], 244.41],
|
||||
[opfor_fuel_container, [14.17, 2.33, 0.00], 247.91],
|
||||
[opfor_fuel_container, [7.65, 12.72, 0.00], 223.11]
|
||||
];
|
||||
|
||||
private _defenders_to_build = [
|
||||
[opfor_engineer, [-4.18, 13.73, 0.00], 176.93],
|
||||
[opfor_heavygunner, [-12.66, -10.52, 0.00], 0.00],
|
||||
[opfor_heavygunner, [-4.12, -20.00, 0.00], 249.04],
|
||||
[opfor_medic, [-15.97, -6.49, 0.00], 0.00],
|
||||
[opfor_sharpshooter, [1.09, 18.82, 4.83], 0.00],
|
||||
[opfor_rifleman, [-1.82, -20.39, 0.00], 154.51],
|
||||
[opfor_rifleman, [-10.58, 17.79, 4.81], 143.79],
|
||||
[opfor_rifleman, [-15.11, 2.16, 0.00], 108.85],
|
||||
[opfor_rifleman, [-16.03, -3.77, 0.00], 91.87],
|
||||
[opfor_rifleman, [-4.67, -4.78, 0.00], 212.50],
|
||||
[opfor_rifleman, [18.35, -7.05, 0.00], 0.00],
|
||||
[opfor_rifleman, [6.01, -19.19, 0.00], 133.28],
|
||||
[opfor_rifleman, [7.52, 8.87, 0.00], 220.50],
|
||||
[opfor_rpg, [10.95, -10.90, 0.00], 291.65],
|
||||
[opfor_sentry, [11.95, 4.52, 0.00], 43.29],
|
||||
[opfor_marksman, [-0.29, 18.86, 4.87], 305.92],
|
||||
[opfor_marksman, [-16.39, 9.43, 4.84], 317.61],
|
||||
[opfor_marksman, [-16.53, 8.30, 4.87], 223.01],
|
||||
[opfor_grenadier, [-7.72, -4.93, 0.00], 120.76],
|
||||
[opfor_grenadier, [18.02, -9.31, 0.00], 141.02]
|
||||
];
|
||||
|
||||
private _base_corners = [
|
||||
[40, 40, 0],
|
||||
[40, -40, 0],
|
||||
[-40, -40, 0],
|
||||
[-40, 40, 0]
|
||||
];
|
||||
|
||||
[_objects_to_build, _objectives_to_build, _defenders_to_build, _base_corners]
|
||||
20
kp_liberation.brf_sumava/scripts/server/CfgFunctions.hpp
Normal file
20
kp_liberation.brf_sumava/scripts/server/CfgFunctions.hpp
Normal file
@@ -0,0 +1,20 @@
|
||||
class server_highcommand {
|
||||
file = "scripts\server\highcommand";
|
||||
|
||||
class highcommand {ext = ".fsm";};
|
||||
};
|
||||
|
||||
class server_sector {
|
||||
file = "scripts\server\sector";
|
||||
|
||||
class destroyFob {};
|
||||
class sectorMonitor {ext = ".fsm";};
|
||||
class spawnSectorCrates {};
|
||||
class spawnSectorIntel {};
|
||||
};
|
||||
|
||||
class server_support {
|
||||
file = "scripts\server\support";
|
||||
|
||||
class createSuppModules {};
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
private _grp = _this select 0;
|
||||
private _basepos = getpos (leader _grp);
|
||||
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow leader _grp} foreach units _grp;
|
||||
|
||||
private _wpPositions = [
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360]
|
||||
];
|
||||
|
||||
private _waypoint = _grp addWaypoint [_wpPositions select 0, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCombatMode "BLUE";
|
||||
_waypoint setWaypointCompletionRadius 5;
|
||||
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 1, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCombatMode "BLUE";
|
||||
_waypoint setWaypointCompletionRadius 5;
|
||||
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 2, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCombatMode "BLUE";
|
||||
_waypoint setWaypointCompletionRadius 5;
|
||||
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 3, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCombatMode "BLUE";
|
||||
_waypoint setWaypointCompletionRadius 5;
|
||||
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 4, 10];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCombatMode "BLUE";
|
||||
_waypoint setWaypointCompletionRadius 5;
|
||||
@@ -0,0 +1,85 @@
|
||||
private _grp = _this select 0;
|
||||
private _flagpos = _this select 1;
|
||||
private _basepos = getpos (leader _grp);
|
||||
private _is_infantry = false;
|
||||
private _wpPositions = [];
|
||||
private _waypoint = [];
|
||||
if (vehicle (leader _grp) == (leader _grp)) then {_is_infantry = true;};
|
||||
|
||||
sleep 5;
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
sleep 1;
|
||||
{_x doFollow leader _grp} foreach units _grp;
|
||||
sleep 1;
|
||||
|
||||
if (_is_infantry) then {
|
||||
_wpPositions = [
|
||||
_flagpos getPos [random 150, random 360],
|
||||
_flagpos getPos [random 150, random 360],
|
||||
_flagpos getPos [random 150, random 360],
|
||||
_flagpos getPos [random 150, random 360],
|
||||
_flagpos getPos [random 150, random 360]
|
||||
];
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 0, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCompletionRadius 10;
|
||||
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 1, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 2, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 3, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 4, 10];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
} else {
|
||||
_waypoint = _grp addWaypoint [_basepos, 1];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCompletionRadius 30;
|
||||
};
|
||||
|
||||
_grp setCurrentWaypoint [_grp, 0];
|
||||
|
||||
waitUntil {
|
||||
sleep 10;
|
||||
({alive _x} count (units _grp) == 0) || !(isNull ((leader _grp) findNearestEnemy (leader _grp)))
|
||||
};
|
||||
|
||||
if ({alive _x} count (units _grp) > 0) then {
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0)};
|
||||
sleep 1;
|
||||
{_x doFollow leader _grp} foreach units _grp;
|
||||
sleep 1;
|
||||
_wpPositions = [
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360]
|
||||
];
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 0, 10];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint setWaypointBehaviour "COMBAT";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
if (_is_infantry) then {
|
||||
_waypoint setWaypointSpeed "NORMAL";
|
||||
} else {
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
};
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 1, 10];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 2, 10];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 3, 10];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 4, 10];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
_grp setCurrentWaypoint [_grp, 0];
|
||||
};
|
||||
@@ -0,0 +1,53 @@
|
||||
params [
|
||||
["_grp", grpNull, [grpNull]]
|
||||
];
|
||||
|
||||
if (isNull _grp) exitWith {};
|
||||
if (isNil "reset_battlegroups_ai") then {reset_battlegroups_ai = false};
|
||||
|
||||
sleep (5 + (random 5));
|
||||
|
||||
private _objPos = [getPos (leader _grp)] call KPLIB_fnc_getNearestBluforObjective;
|
||||
|
||||
[_objPos] remoteExec ["remote_call_incoming"];
|
||||
|
||||
private _startpos = getPos (leader _grp);
|
||||
|
||||
private _waypoint = [];
|
||||
while {((getPos (leader _grp)) distance _startpos) < 100} do {
|
||||
|
||||
while {!((waypoints _grp) isEqualTo [])} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow leader _grp} forEach units _grp;
|
||||
|
||||
_startpos = getPos (leader _grp);
|
||||
|
||||
_waypoint = _grp addWaypoint [_objPos, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "NORMAL";
|
||||
_waypoint setWaypointBehaviour "AWARE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointCompletionRadius 30;
|
||||
|
||||
_waypoint = _grp addWaypoint [_objPos, 100];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [_objPos, 100];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [_objPos, 100];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [_objPos, 100];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
|
||||
sleep 90;
|
||||
};
|
||||
|
||||
waitUntil {
|
||||
sleep 5;
|
||||
(((units _grp) select {alive _x}) isEqualTo []) || reset_battlegroups_ai
|
||||
};
|
||||
|
||||
sleep (5 + (random 5));
|
||||
reset_battlegroups_ai = false;
|
||||
|
||||
if (!((units _grp) isEqualTo []) && (GRLIB_endgame == 0)) then {
|
||||
[_grp] spawn battlegroup_ai;
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
params ["_unit", ["_sector", ""]];
|
||||
|
||||
_unit setUnitPos "UP";
|
||||
_unit disableAI "PATH";
|
||||
private _move_is_disabled = true;
|
||||
private _hostiles = 0;
|
||||
private _ratio = 0.4;
|
||||
private _range = 40;
|
||||
|
||||
while {_move_is_disabled && local _unit && alive _unit && !(captive _unit)} do {
|
||||
|
||||
if !(_sector isEqualTo "") then {
|
||||
_ratio = [_sector] call KPLIB_fnc_getBluforRatio;
|
||||
};
|
||||
|
||||
_range = floor (linearConversion [0, 1, _ratio, 0, GRLIB_capture_size / 3 * 2, true]);
|
||||
|
||||
_hostiles = ((getPos _unit) nearEntities [["Man"], _range]) select {side _x == GRLIB_side_friendly};
|
||||
|
||||
if (_move_is_disabled &&
|
||||
{
|
||||
(_sector in blufor_sectors) ||
|
||||
{!(_hostiles isEqualTo [])} ||
|
||||
{damage _unit > 0.25}
|
||||
}
|
||||
) then {
|
||||
_move_is_disabled = false;
|
||||
_unit enableAI "PATH";
|
||||
_unit setUnitPos "AUTO";
|
||||
};
|
||||
|
||||
if (_move_is_disabled) then {
|
||||
private _target = assignedTarget _unit;
|
||||
if(!(isnull _target)) then {
|
||||
private _vd = (getPosASL _target) vectorDiff (getpos _unit);
|
||||
private _newdir = (_vd select 0) atan2 (_vd select 1);
|
||||
if (_newdir < 0) then {_dir = 360 + _newdir};
|
||||
_unit setdir (_newdir);
|
||||
};
|
||||
};
|
||||
sleep 5;
|
||||
};
|
||||
60
kp_liberation.brf_sumava/scripts/server/ai/patrol_ai.sqf
Normal file
60
kp_liberation.brf_sumava/scripts/server/ai/patrol_ai.sqf
Normal file
@@ -0,0 +1,60 @@
|
||||
private _grp = _this select 0;
|
||||
private _waypoint = [];
|
||||
if ( isNil "reinforcements_sector_under_attack" ) then { reinforcements_sector_under_attack = "" };
|
||||
|
||||
while { count (units _grp) > 0 } do {
|
||||
|
||||
if ( reinforcements_sector_under_attack != "" ) then {
|
||||
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow leader _grp} foreach units _grp;
|
||||
|
||||
_waypoint = _grp addWaypoint [markerpos reinforcements_sector_under_attack, 50];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "FULL";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointCompletionRadius 30;
|
||||
_waypoint = _grp addWaypoint [markerpos reinforcements_sector_under_attack, 50];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos reinforcements_sector_under_attack, 50];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos reinforcements_sector_under_attack, 50];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
|
||||
sleep 300;
|
||||
};
|
||||
|
||||
if ( reinforcements_sector_under_attack == "" ) then {
|
||||
private _sectors_patrol = [];
|
||||
private _patrol_startpos = getpos (leader _grp);
|
||||
{
|
||||
if ( _patrol_startpos distance (markerpos _x) < 2500) then {
|
||||
_sectors_patrol pushBack _x;
|
||||
};
|
||||
} foreach (sectors_allSectors - blufor_sectors);
|
||||
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow leader _grp} foreach units _grp;
|
||||
|
||||
{
|
||||
_waypoint = _grp addWaypoint [markerpos _x, 300];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "NORMAL";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointCompletionRadius 30;
|
||||
} foreach _sectors_patrol;
|
||||
|
||||
_waypoint = _grp addWaypoint [_patrol_startpos, 300];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointCompletionRadius 100;
|
||||
_waypoint = _grp addWaypoint [_patrol_startpos , 300];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
};
|
||||
|
||||
waitUntil { sleep 5;(count (units _grp) == 0) || (reinforcements_sector_under_attack != "") };
|
||||
};
|
||||
52
kp_liberation.brf_sumava/scripts/server/ai/prisonner_ai.sqf
Normal file
52
kp_liberation.brf_sumava/scripts/server/ai/prisonner_ai.sqf
Normal file
@@ -0,0 +1,52 @@
|
||||
params ["_unit", ["_force_surrender", false]];
|
||||
|
||||
if ((!_force_surrender) && ((random 100) > GRLIB_surrender_chance)) exitWith {};
|
||||
|
||||
if ((_unit isKindOf "Man") && (alive _unit) && (side group _unit == GRLIB_side_enemy)) then {
|
||||
|
||||
if (vehicle _unit != _unit) then {deleteVehicle _unit};
|
||||
|
||||
sleep (random 5);
|
||||
|
||||
if (alive _unit) then {
|
||||
|
||||
removeAllWeapons _unit;
|
||||
if (typeof _unit != pilot_classname) then {
|
||||
removeHeadgear _unit;
|
||||
};
|
||||
removeBackpack _unit;
|
||||
removeVest _unit;
|
||||
_unit unassignItem "NVGoggles_OPFOR";
|
||||
_unit removeItem "NVGoggles_OPFOR";
|
||||
_unit unassignItem "NVGoggles_INDEP";
|
||||
_unit removeItem "NVGoggles_INDEP";
|
||||
_unit setUnitPos "UP";
|
||||
sleep 1;
|
||||
private _grp = createGroup [GRLIB_side_civilian, true];
|
||||
[_unit] joinSilent _grp;
|
||||
if (KP_liberation_ace) then {
|
||||
["ace_captives_setSurrendered", [_unit, true], _unit] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
_unit disableAI "ANIM";
|
||||
_unit disableAI "MOVE";
|
||||
_unit playmove "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon";
|
||||
sleep 2;
|
||||
_unit setCaptive true;
|
||||
};
|
||||
waitUntil {sleep 1;
|
||||
!alive _unit || side group _unit == GRLIB_side_friendly
|
||||
};
|
||||
|
||||
if (alive _unit) then {
|
||||
if (KP_liberation_ace) then {
|
||||
["ace_captives_setSurrendered", [_unit, false], _unit] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
_unit enableAI "ANIM";
|
||||
_unit enableAI "MOVE";
|
||||
_unit setCaptive false;
|
||||
};
|
||||
sleep 1;
|
||||
[_unit] remoteExec ["remote_call_prisonner", _unit];
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,74 @@
|
||||
params [
|
||||
["_transVeh", objNull, [objNull]]
|
||||
];
|
||||
|
||||
if (isNull _transVeh) exitWith {};
|
||||
sleep 1;
|
||||
|
||||
private _transGrp = (group (driver _transVeh));
|
||||
private _start_pos = getpos _transVeh;
|
||||
private _objPos = [getpos _transVeh] call KPLIB_fnc_getNearestBluforObjective;
|
||||
private _unload_distance = 500;
|
||||
private _crewcount = count crew _transVeh;
|
||||
|
||||
waitUntil {
|
||||
sleep 0.2;
|
||||
!(alive _transVeh) ||
|
||||
!(alive (driver _transVeh)) ||
|
||||
(((_transVeh distance _objPos) < _unload_distance) && !(surfaceIsWater (getpos _transVeh)))
|
||||
};
|
||||
|
||||
if ((alive _transVeh) && (alive (driver _transVeh))) then {
|
||||
_infGrp = createGroup [GRLIB_side_enemy, true];
|
||||
|
||||
{
|
||||
[_x, _start_pos, _infGrp, "PRIVATE", 0.5] call KPLIB_fnc_createManagedUnit;
|
||||
} foreach ([] call KPLIB_fnc_getSquadComp);
|
||||
|
||||
{_x moveInCargo _transVeh} forEach (units _infGrp);
|
||||
|
||||
while {(count (waypoints _infGrp)) != 0} do {deleteWaypoint ((waypoints _infGrp) select 0);};
|
||||
|
||||
sleep 3;
|
||||
|
||||
private _transVehWp = _transGrp addWaypoint [getpos _transVeh, 0,0];
|
||||
_transVehWp setWaypointType "TR UNLOAD";
|
||||
_transVehWp setWaypointCompletionRadius 200;
|
||||
|
||||
private _infWp = _infGrp addWaypoint [getpos _transVeh, 0];
|
||||
_infWp setWaypointType "GETOUT";
|
||||
_infWp setWaypointCompletionRadius 200;
|
||||
|
||||
_infWp synchronizeWaypoint [_transVehWp];
|
||||
|
||||
{unassignVehicle _transVeh} forEach (units _infGrp);
|
||||
_infGrp leaveVehicle _transVeh;
|
||||
(units _infGrp) allowGetIn false;
|
||||
|
||||
private _infWp_2 = _infGrp addWaypoint [getpos _transVeh, 250];
|
||||
_infWp_2 setWaypointType "MOVE";
|
||||
_infWp_2 setWaypointCompletionRadius 5;
|
||||
|
||||
waitUntil {sleep 0.5; _crewcount >= count crew _transVeh};
|
||||
|
||||
sleep 5;
|
||||
|
||||
while {(count (waypoints _transGrp)) != 0} do {deleteWaypoint ((waypoints _transGrp) select 0);};
|
||||
|
||||
_transVehWp = _transGrp addWaypoint [_objPos, 100];
|
||||
_transVehWp setWaypointType "SAD";
|
||||
_transVehWp setWaypointSpeed "NORMAL";
|
||||
_transVehWp setWaypointBehaviour "COMBAT";
|
||||
_transVehWp setWaypointCombatMode "RED";
|
||||
_transVehWp setWaypointCompletionRadius 30;
|
||||
|
||||
_transVehWp = _transGrp addWaypoint [_objPos, 100];
|
||||
_transVehWp setWaypointType "SAD";
|
||||
|
||||
_transVehWp = _transGrp addWaypoint [_objPos, 100];
|
||||
_transVehWp setWaypointType "CYCLE";
|
||||
|
||||
sleep 10;
|
||||
|
||||
[_infGrp] spawn battlegroup_ai;
|
||||
};
|
||||
@@ -0,0 +1,63 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "KP_liberation_civ_rep"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Loop spawned on: %1", debug_source], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
|
||||
KP_liberation_asymmetric_sectors = [];
|
||||
|
||||
while {GRLIB_endgame == 0} do {
|
||||
private _sectors_to_remove = [];
|
||||
|
||||
{
|
||||
if (!(_x in blufor_sectors) || (KP_liberation_civ_rep > -25)) then {
|
||||
_sectors_to_remove pushBack _x;
|
||||
};
|
||||
} forEach KP_liberation_asymmetric_sectors;
|
||||
|
||||
KP_liberation_asymmetric_sectors = KP_liberation_asymmetric_sectors - _sectors_to_remove;
|
||||
|
||||
if (KP_liberation_civ_rep <= -25) then {
|
||||
{
|
||||
private _sector = _x;
|
||||
private _blocked = false;
|
||||
private _units_at_sector = [markerPos _sector, GRLIB_sector_size, GRLIB_side_friendly] call KPLIB_fnc_getUnitsCount;
|
||||
|
||||
{
|
||||
if ((_x select 0) == _sector) exitWith {
|
||||
if ((((_x select 1) + 1800) < time) && (_units_at_sector == 0)) then {
|
||||
asymm_blocked_sectors = asymm_blocked_sectors - [_x];
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Sector %1 removed from blocked sectors", markerText (_x select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
} else {
|
||||
_blocked = true;
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Sector %1 still blocked for ambush", markerText (_x select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
};
|
||||
};
|
||||
} forEach asymm_blocked_sectors;
|
||||
|
||||
if ((_units_at_sector > 0) && !(_sector in KP_liberation_asymmetric_sectors) && !_blocked) then {
|
||||
KP_liberation_asymmetric_sectors pushBack _sector;
|
||||
|
||||
if ((random 100) <= KP_liberation_resistance_ambush_chance) then {
|
||||
private _hc = [] call KPLIB_fnc_getLessLoadedHC;
|
||||
private _ieds = round (([] call KPLIB_fnc_crGetMulti) * GRLIB_difficulty_modifier);
|
||||
|
||||
if (isNull _hc) then {
|
||||
[_sector, _ieds] spawn manage_asymIED;
|
||||
[_sector] spawn asym_sector_ambush;
|
||||
} else {
|
||||
[_sector, _ieds] remoteExec ["manage_asymIED", _hc];
|
||||
[_sector] remoteExec ["asym_sector_ambush",_hc];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (!(_units_at_sector > 0) && (_sector in KP_liberation_asymmetric_sectors)) then {
|
||||
KP_liberation_asymmetric_sectors = KP_liberation_asymmetric_sectors - [_sector];
|
||||
};
|
||||
} forEach ((sectors_capture + sectors_bigtown) select {_x in blufor_sectors});
|
||||
};
|
||||
publicVariable "KP_liberation_asymmetric_sectors";
|
||||
publicVariable "asymm_blocked_sectors";
|
||||
sleep 10;
|
||||
};
|
||||
@@ -0,0 +1,140 @@
|
||||
params ["_convoy"];
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1: spawning ambush", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
|
||||
private _pos = [0,0,0];
|
||||
|
||||
switch ((_convoy select 7)) do {
|
||||
case 2: {_pos = (_convoy select 3) getPos [(_convoy select 8) * 400, (_convoy select 3) getDir (_convoy select 2)]};
|
||||
case 4: {_pos = (_convoy select 2) getPos [(_convoy select 8) * 400, (_convoy select 2) getDir (_convoy select 3)]};
|
||||
default {[format ["Logistic convoy %1 ambush: convoy is not travelling", (_convoy select 0)], "ERROR"] call KPLIB_fnc_log;};
|
||||
};
|
||||
|
||||
if (_pos isEqualTo [0,0,0]) exitWith {[format ["Logistic convoy %1 ambush: no position", (_convoy select 0)], "ERROR"] call KPLIB_fnc_log;};
|
||||
|
||||
private _roadObj = [_pos, 400, []] call BIS_fnc_nearestRoad;
|
||||
if (isNull _roadObj) exitWith {
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: no road near current convoy position", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
KP_liberation_convoy_ambush_check = 1;
|
||||
};
|
||||
|
||||
KP_liberation_convoy_ambush_check = 2;
|
||||
KP_liberation_convoy_ambush_inProgress = true;
|
||||
[0, getPos _roadObj] remoteExec ["asymm_notifications"];
|
||||
|
||||
private _vehicleArray = [];
|
||||
for "_i" from 1 to (_convoy select 1) do {
|
||||
private _veh = createVehicle [KP_liberation_truck_classname, getPos _roadObj, [], 50, "NONE"];
|
||||
_veh setDir (getDir _roadObj);
|
||||
{
|
||||
private _damage = random 0.6;
|
||||
if ((_x find "Wheel") != -1) then {
|
||||
_damage = _damage + 0.6;
|
||||
} else {
|
||||
_damage = _damage + 0.3;
|
||||
};
|
||||
if (_damage > 1) then {_damage = 1.0};
|
||||
_veh setHitPointDamage [_x, _damage];
|
||||
} forEach ((getAllHitPointsDamage _veh) select 0);
|
||||
_vehicleArray pushBack _veh;
|
||||
|
||||
private _driver = createVehicle [crewman_classname, getPos _veh, [], 12, "NONE"];
|
||||
_driver setDamage 1;
|
||||
};
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: truck spawning done", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
|
||||
private _supplies = (_convoy select 6) select 0;
|
||||
private _ammo = (_convoy select 6) select 1;
|
||||
private _fuel = (_convoy select 6) select 2;
|
||||
private _crateArray = [];
|
||||
|
||||
while {_supplies > 0} do {
|
||||
private _amount = 100;
|
||||
if ((_supplies / 100) < 1) then {
|
||||
_amount = _supplies;
|
||||
};
|
||||
_supplies = _supplies - _amount;
|
||||
private _crate = [KP_liberation_supply_crate, _amount, getPos _roadObj] call KPLIB_fnc_createCrate;
|
||||
_crate setPos (_crate getPos [random 60, random 360]);
|
||||
_crateArray pushBack [_crate];
|
||||
};
|
||||
|
||||
while {_ammo > 0} do {
|
||||
private _amount = 100;
|
||||
if ((_ammo / 100) < 1) then {
|
||||
_amount = _ammo;
|
||||
};
|
||||
_ammo = _ammo - _amount;
|
||||
private _crate = [KP_liberation_ammo_crate, _amount, getPos _roadObj] call KPLIB_fnc_createCrate;
|
||||
_crate setPos (_crate getPos [random 60, random 360]);
|
||||
_crateArray pushBack [_crate];
|
||||
};
|
||||
|
||||
while {_fuel > 0} do {
|
||||
private _amount = 100;
|
||||
if ((_fuel / 100) < 1) then {
|
||||
_amount = _fuel;
|
||||
};
|
||||
_fuel = _fuel - _amount;
|
||||
private _crate = [KP_liberation_fuel_crate, _amount, getPos _roadObj] call KPLIB_fnc_createCrate;
|
||||
_crate setPos (_crate getPos [random 60, random 360]);
|
||||
_crateArray pushBack [_crate];
|
||||
};
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: resource spawning done", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
|
||||
private _grp = [getPos _roadObj] call KPLIB_fnc_spawnGuerillaGroup;
|
||||
|
||||
private _waypoint = _grp addWaypoint [getPos _roadObj, 150];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint setWaypointCompletionRadius 10;
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 150];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint setWaypointCompletionRadius 10;
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 150];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint setWaypointCompletionRadius 10;
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 150];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
_waypoint setWaypointCompletionRadius 10;
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: guerillas spawning done", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
|
||||
private _waitingTime = KP_liberation_convoy_ambush_duration;
|
||||
|
||||
while {(({alive _x} count (units _grp)) > 0) && (_waitingTime > 0)} do {
|
||||
uiSleep 1;
|
||||
private _player_near = false;
|
||||
{
|
||||
if (((_x distance _roadObj) < 250) && (alive _x)) exitWith {_player_near = true};
|
||||
} foreach allPlayers;
|
||||
|
||||
if !(_player_near) then {
|
||||
_waitingTime = _waitingTime - 1;
|
||||
};
|
||||
};
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: ambush finished", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
|
||||
KP_liberation_convoy_ambush_inProgress = false;
|
||||
|
||||
if ((_waitingTime <= 0) && (({alive _x} count (units _grp)) > 0)) then {
|
||||
[2] remoteExec ["asymm_notifications"];
|
||||
private _gain = 0;
|
||||
{
|
||||
if (alive _x) then {
|
||||
deleteVehicle _x;
|
||||
_gain = _gain + 2;
|
||||
};
|
||||
} forEach (units _grp);
|
||||
{
|
||||
if ((typeOf (_x select 0)) == KP_liberation_ammo_crate) then {
|
||||
_gain = _gain + 3;
|
||||
} else {
|
||||
_gain = _gain + 2;
|
||||
};
|
||||
deleteVehicle (_x select 0);
|
||||
} forEach _crateArray;
|
||||
KP_liberation_guerilla_strength = KP_liberation_guerilla_strength + _gain;
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: guerillas escaped", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
} else {
|
||||
[1] remoteExec ["asymm_notifications"];
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: guerillas defeated", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
params ["_sector", "_count"];
|
||||
|
||||
if (_count <= 0) exitWith {};
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["manage_asymIED.sqf for %1 spawned on: %2", markerText _sector, debug_source], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
waitUntil {sleep 1; _sector in KP_liberation_asymmetric_sectors};
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["manage_asymIED.sqf -> spawning IED %1 at %2", _count, markerText _sector], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
private _activation_radius_infantry = 6.66;
|
||||
private _activation_radius_vehicles = 10;
|
||||
private _spread = 7;
|
||||
private _infantry_trigger = 1 + (ceil (random 2));
|
||||
private _vehicle_trigger = 1;
|
||||
private _ied_type = selectRandom ["IEDLandBig_F","IEDLandSmall_F","IEDUrbanBig_F","IEDUrbanSmall_F"];
|
||||
private _ied_obj = objNull;
|
||||
private _roadobj = [(markerPos (_sector) getPos [random (200), random (360)]), 200, []] call BIS_fnc_nearestRoad;
|
||||
private _goes_boom = false;
|
||||
private _ied_marker = "";
|
||||
|
||||
if (_count > 0) then {
|
||||
[_sector, _count - 1] spawn manage_asymIED;
|
||||
};
|
||||
|
||||
if (!(isnull _roadobj)) then {
|
||||
private _roadpos = getpos _roadobj;
|
||||
_ied_obj = createMine [_ied_type, _roadpos getPos [_spread, random (360)], [], 0];
|
||||
_ied_obj setdir (random 360);
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["manage_asymIED.sqf -> IED %1 spawned at %2", _count, markerText _sector], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
while {(_sector in KP_liberation_asymmetric_sectors) && (mineActive _ied_obj) && !_goes_boom} do {
|
||||
_nearinfantry = ((getpos _ied_obj) nearEntities ["Man", _activation_radius_infantry]) select {side _x == GRLIB_side_friendly};
|
||||
_nearvehicles = ((getpos _ied_obj) nearEntities [["Car", "Tank", "Air"], _activation_radius_vehicles]) select {side _x == GRLIB_side_friendly};
|
||||
if (count _nearinfantry >= _infantry_trigger || count _nearvehicles >= _vehicle_trigger) then {
|
||||
_ied_obj setDamage 1;
|
||||
stats_ieds_detonated = stats_ieds_detonated + 1; publicVariable "stats_ieds_detonated";
|
||||
_goes_boom = true;
|
||||
};
|
||||
sleep 1;
|
||||
};
|
||||
} else {
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["manage_asymIED.sqf -> _roadobj is Null for IED %1 at %2", _count, markerText _sector], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
};
|
||||
|
||||
if ((KP_liberation_asymmetric_debug > 0) && !(isNull _roadobj)) then {[format ["manage_asymIED.sqf -> exit IED %1 loop at %2", _count, markerText _sector], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
sleep 60;
|
||||
|
||||
if (!(isNull _ied_obj)) then {deleteVehicle _ied_obj;};
|
||||
@@ -0,0 +1,17 @@
|
||||
// Scripts
|
||||
// Logistic convoy ambush
|
||||
logistic_convoy_ambush = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\convoy\logistic_convoy_ambush.sqf";
|
||||
// IED spawner for blufor sectors
|
||||
manage_asymIED = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\ied\manage_asymIED.sqf";
|
||||
// Spawner for guerilla ambushes in blufor sectors
|
||||
asym_sector_ambush = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\random\asym_sector_ambush.sqf";
|
||||
// Spawner for guerilla forces who join a fight at an opfor sector
|
||||
sector_guerilla = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\random\sector_guerilla.sqf";
|
||||
|
||||
// Globals
|
||||
// List sectors which are just liberated. Preventing direct ambush spawn.
|
||||
asymm_blocked_sectors = [];
|
||||
publicVariable "asymm_blocked_sectors";
|
||||
|
||||
// Start module loop
|
||||
execVM "scripts\server\asymmetric\asymmetric_loop.sqf";
|
||||
@@ -0,0 +1,74 @@
|
||||
params ["_sector"];
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["asym_sector_ambush.sqf for %1 spawned on: %2 - Time: %3", markerText _sector, debug_source, diag_tickTime], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
waitUntil {sleep 1; _sector in KP_liberation_asymmetric_sectors};
|
||||
|
||||
private _buildings = (nearestObjects [(markerPos _sector), ["House"], 75]) select {(alive _x) && !((typeOf _x) in KP_liberation_cr_ign_buildings)};
|
||||
private _positions = [];
|
||||
{
|
||||
_positions = _positions + ([_x] call BIS_fnc_buildingPositions);
|
||||
} forEach _buildings;
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["asym_sector_ambush.sqf -> Found %1 suitable buildings in %2 - Time: %3", count _buildings, markerText _sector, diag_tickTime], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
private _position_indexes = [];
|
||||
private _position_count = count _positions;
|
||||
while {count _position_indexes < 10} do {
|
||||
private _nextposit = floor (random _position_count);
|
||||
if !(_nextposit in _position_indexes) then {
|
||||
_position_indexes pushback _nextposit;
|
||||
};
|
||||
};
|
||||
|
||||
private _grp = [(markerPos _sector)] call KPLIB_fnc_spawnGuerillaGroup;
|
||||
_grp setBehaviour "STEALTH";
|
||||
private _idxposit = 0;
|
||||
{
|
||||
_x setpos (_positions select (_position_indexes select _idxposit));
|
||||
_x setUnitPos "UP";
|
||||
doStop _x;
|
||||
|
||||
_idxposit = _idxposit + 1;
|
||||
} forEach (units _grp);
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["asym_sector_ambush.sqf -> Units spawned in %1 - Time: %2", markerText _sector, diag_tickTime], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
private _attack = false;
|
||||
|
||||
while {(_sector in KP_liberation_asymmetric_sectors) && (!isNull _grp)} do {
|
||||
private _blufor_near = {alive _x && side _x == GRLIB_side_friendly} count ((getpos (leader _grp)) nearEntities [["LAND"], 140]);
|
||||
if ((_blufor_near > 0) && !_attack) then {
|
||||
_attack = true;
|
||||
{
|
||||
_x setUnitPos "AUTO";
|
||||
} forEach (units _grp);
|
||||
(units _grp) doFollow (leader _grp);
|
||||
_grp setBehaviour "COMBAT";
|
||||
_grp setCombatMode "RED";
|
||||
private _waypoint = _grp addWaypoint [markerpos _sector, 20];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint setWaypointSpeed "FULL";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 150];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 150];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 150];
|
||||
_waypoint setWaypointType "SAD";
|
||||
};
|
||||
sleep 1;
|
||||
};
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["asym_sector_ambush.sqf -> Exit Loop in %1 - Time: %2", markerText _sector, diag_tickTime], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
sleep 60;
|
||||
|
||||
if (!isNull _grp) then {
|
||||
{
|
||||
if (alive _x) then {
|
||||
deleteVehicle _x;
|
||||
};
|
||||
} forEach (units _grp);
|
||||
};
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["asym_sector_ambush.sqf -> Ambush dropped in %1 - Time: %2", markerText _sector, diag_tickTime], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user