mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Epoch Survival 0.4 b650
- experiment with using dynamic UI (HOLD down Space Bar) for base building: enable, disable, free mode, and snap alignment options. build mode can still be disabled with "1" key only if already enabled. - Replace the use of 1,2,3 keys for base building to free them up to be used for Arma 3 weapon switching.
This commit is contained in:
parent
422b3883af
commit
a0b078a683
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -50,8 +50,8 @@ if (!isNull EPOCH_currentTarget && vehicle player == player) then {
|
||||
_icon = "\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa";
|
||||
_color = [100,0,_stability,1] call EPOCH_colorRange;
|
||||
};
|
||||
case 1: {
|
||||
_text = if (EPOCH_buildMode > 0) then[{_text}, { format ["Press (%1)",EPOCH_keysBuildMode1 call BIS_fnc_keyCode] }];
|
||||
case 1: {
|
||||
// _text = if (EPOCH_buildMode > 0) then[{_text}, { format ["Hold (%1)",EPOCH_keysBuildMode1 call BIS_fnc_keyCode] }];
|
||||
_stability = if (EPOCH_buildMode > 0) then[{_currentTarget getVariable["stability", 100]}, {100 - round(damage _currentTarget * 100)}];
|
||||
_icon = "\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa";
|
||||
_color = [100,0,_stability,1] call EPOCH_colorRange;
|
||||
@ -78,7 +78,7 @@ if (!isNull EPOCH_currentTarget && vehicle player == player) then {
|
||||
};
|
||||
case 4: {
|
||||
// Base Objects With Storage
|
||||
_text = if (EPOCH_buildMode > 0) then[{_text}, { format ["Press (%1) or (%2)",EPOCH_keysBuildMode1 call BIS_fnc_keyCode, ((actionKeys "Gear" select 0) call BIS_fnc_keyCode),_text] }];
|
||||
_text = if (EPOCH_buildMode > 0) then[{_text}, { format ["Hold (%1) or (%2)",EPOCH_keysAction call BIS_fnc_keyCode, ((actionKeys "Gear" select 0) call BIS_fnc_keyCode),_text] }];
|
||||
_stability = if (EPOCH_buildMode > 0) then[{_currentTarget getVariable["stability", 100]}, {100 - round(damage _currentTarget * 100)}];
|
||||
_icon = "\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa";
|
||||
_color = [100,0,_stability,1] call EPOCH_colorRange;
|
||||
|
@ -26,7 +26,7 @@
|
||||
BOOL
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_currentPos","_disableBuildMode","_handled"];
|
||||
private ["_currentPos","_handled"];
|
||||
//[[[end]]]
|
||||
params ["_display","_dikCode","_shift","_ctrl","_alt"];
|
||||
|
||||
@ -95,45 +95,16 @@ if (_dikCode == EPOCH_keysAction) then {
|
||||
|
||||
// Player only code
|
||||
if (vehicle player == player) then {
|
||||
_disableBuildMode = {
|
||||
EPOCH_buildMode = 0;
|
||||
|
||||
if (_dikCode == EPOCH_keysBuildMode1 && EPOCH_buildMode > 0) then {
|
||||
EPOCH_buildMode = 0;
|
||||
EPOCH_snapDirection = 0;
|
||||
["Build Mode Disabled", 5] call Epoch_message;
|
||||
["Build Mode: Disabled", 5] call Epoch_message;
|
||||
EPOCH_Target = objNull;
|
||||
EPOCH_Z_OFFSET = 0;
|
||||
EPOCH_X_OFFSET = 0;
|
||||
EPOCH_Y_OFFSET = 5;
|
||||
};
|
||||
if (_dikCode == EPOCH_keysBuildMode1) then {
|
||||
if (EPOCH_buildMode == 1) then {
|
||||
call _disableBuildMode;
|
||||
} else {
|
||||
if (EPOCH_playerEnergy > 0) then {
|
||||
EPOCH_stabilityTarget = objNull;
|
||||
EPOCH_buildMode = 1;
|
||||
["Build Mode Enabled: Snap alignment", 5] call Epoch_message;
|
||||
EPOCH_buildDirection = 0;
|
||||
} else {
|
||||
["Need Energy", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
_handled = true;
|
||||
};
|
||||
if (_dikCode == EPOCH_keysBuildMode2) then {
|
||||
if (EPOCH_buildMode == 2) then {
|
||||
call _disableBuildMode;
|
||||
} else {
|
||||
if (EPOCH_playerEnergy > 0) then {
|
||||
EPOCH_stabilityTarget = objNull;
|
||||
EPOCH_buildMode = 2;
|
||||
["Build Mode Enabled: Free", 5] call Epoch_message;
|
||||
EPOCH_buildDirection = 0;
|
||||
}
|
||||
else {
|
||||
["Need Energy", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
_handled = true;
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
// H - holster unholster
|
||||
@ -152,18 +123,6 @@ if (vehicle player == player) then {
|
||||
};
|
||||
|
||||
if (EPOCH_buildMode > 0) then {
|
||||
if (_dikCode == EPOCH_keysBuildDir) then {
|
||||
EPOCH_snapDirection = EPOCH_snapDirection + 1;
|
||||
if (EPOCH_snapDirection > 3) then {
|
||||
EPOCH_snapDirection = 0;
|
||||
["SNAP DIRECTION MODE: 0", 5] call Epoch_message;
|
||||
}
|
||||
else {
|
||||
[format["SNAP DIRECTION MODE: %1", EPOCH_snapDirection], 5] call Epoch_message;
|
||||
};
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
if (!_ctrl) then {
|
||||
switch (_dikCode) do {
|
||||
case EPOCH_keysBuildMovUp: { EPOCH_Z_OFFSET = (EPOCH_Z_OFFSET + 0.1) min 6; _handled = true };
|
||||
|
@ -36,9 +36,9 @@ _keyMap =
|
||||
["Volume + (ctrl)","EPOCH_keysVolumeUp",0x0D],
|
||||
["Volume - (ctrl)","EPOCH_keysVolumeDown",0x0C],
|
||||
["Build: Mode 1", "EPOCH_keysBuildMode1", 2],
|
||||
["Build: Mode 2", "EPOCH_keysBuildMode2", 3],
|
||||
["Build: Direction", "EPOCH_keysBuildDir", 4],
|
||||
//["Build: Static", "EPOCH_keysBuildStatic", 5],
|
||||
// ["Build: Mode 2", "EPOCH_keysBuildMode2", 3],
|
||||
// ["Build: Direction", "EPOCH_keysBuildDir", 4],
|
||||
// ["Build: Static", "EPOCH_keysBuildStatic", 5],
|
||||
["Build: Move UP", "EPOCH_keysBuildMovUp", 0xC9],
|
||||
["Build: Move DOWN", "EPOCH_keysBuildMovDn", 0xD1],
|
||||
["Build: Move FORWARD", "EPOCH_keysBuildMovFwd", 0xC7],
|
||||
|
@ -48,3 +48,54 @@ class player_group_requests
|
||||
icon = "x\addons\a3_epoch_code\Data\UI\buttons\group_requests_ca.paa";
|
||||
tooltip = "Group Requests";
|
||||
};
|
||||
|
||||
class base_mode_enable
|
||||
{
|
||||
condition = "EPOCH_buildMode in [0,2] && EPOCH_playerEnergy > 0";
|
||||
action = "EPOCH_stabilityTarget = objNull;EPOCH_buildMode = 1;['Build Mode: Enabled Snap alignment', 5] call Epoch_message;EPOCH_buildDirection = 0;";
|
||||
icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_maintain.paa";
|
||||
tooltip = "Build Mode: Snap alignment";
|
||||
};
|
||||
class base_mode_enable_free
|
||||
{
|
||||
condition = "EPOCH_buildMode == 1 && EPOCH_playerEnergy > 0";
|
||||
action = "EPOCH_stabilityTarget = objNull;EPOCH_buildMode = 2;['Build Mode: Enabled Free alignment', 5] call Epoch_message;EPOCH_buildDirection = 0;";
|
||||
icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_maintain.paa";
|
||||
tooltip = "Build Mode: Free alignment";
|
||||
};
|
||||
class base_mode_disable
|
||||
{
|
||||
condition = "EPOCH_buildMode > 0";
|
||||
action = "EPOCH_buildMode = 0;EPOCH_snapDirection = 0;['Build Mode: Disabled', 5] call Epoch_message;EPOCH_Target = objNull;EPOCH_Z_OFFSET = 0;EPOCH_X_OFFSET = 0;EPOCH_Y_OFFSET = 5;";
|
||||
icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_remove.paa";
|
||||
tooltip = "Build Mode: Disable";
|
||||
};
|
||||
|
||||
class base_mode_snap_direction_0
|
||||
{
|
||||
condition = "EPOCH_buildMode == 1 && EPOCH_snapDirection != 0";
|
||||
action = "EPOCH_snapDirection = 0;[format['SNAP DIRECTION MODE: %1', EPOCH_snapDirection], 5] call Epoch_message;";
|
||||
icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_move.paa";
|
||||
tooltip = "Build Mode: Snap Direction 0°";
|
||||
};
|
||||
class base_mode_snap_direction_1
|
||||
{
|
||||
condition = "EPOCH_buildMode == 1 && EPOCH_snapDirection != 1";
|
||||
action = "EPOCH_snapDirection = 1;[format['SNAP DIRECTION MODE: %1', EPOCH_snapDirection], 5] call Epoch_message;";
|
||||
icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_move.paa";
|
||||
tooltip = "Build Mode: Snap Direction 90°";
|
||||
};
|
||||
class base_mode_snap_direction_2
|
||||
{
|
||||
condition = "EPOCH_buildMode == 1 && EPOCH_snapDirection != 2";
|
||||
action = "EPOCH_snapDirection = 2;[format['SNAP DIRECTION MODE: %1', EPOCH_snapDirection], 5] call Epoch_message;";
|
||||
icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_move.paa";
|
||||
tooltip = "Build Mode: Snap Direction 180°";
|
||||
};
|
||||
class base_mode_snap_direction_3
|
||||
{
|
||||
condition = "EPOCH_buildMode == 1 && EPOCH_snapDirection != 3";
|
||||
action = "EPOCH_snapDirection = 3;[format['SNAP DIRECTION MODE: %1', EPOCH_snapDirection], 5] call Epoch_message;";
|
||||
icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_move.paa";
|
||||
tooltip = "Build Mode: Snap Direction 270°";
|
||||
};
|
||||
|
@ -1 +1 @@
|
||||
build=646;
|
||||
build=650;
|
||||
|
@ -1 +1 @@
|
||||
build=646;
|
||||
build=650;
|
||||
|
@ -1 +1 @@
|
||||
build=646;
|
||||
build=650;
|
||||
|
@ -1 +1 @@
|
||||
build=646;
|
||||
build=650;
|
||||
|
Loading…
Reference in New Issue
Block a user