mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
E-Pad Scans + Earplug Fixes
- Added wait time to E-Pad Scans - Added needed energy to E-Pad Scans - Smaller Earplug-fixes
This commit is contained in:
parent
e7f8ab7bbe
commit
77b1434a08
@ -23,8 +23,10 @@ if (_unit == player) then {
|
||||
EPOCH_Target = objNull;
|
||||
};
|
||||
if (missionnamespace getvariable ["EPOCH_AutoEarplug",false]) then {
|
||||
systemchat 'Earplugs have been auto-inserted...';
|
||||
EPOCH_Earplugsin = true;
|
||||
1 fadeSound 0.15;
|
||||
if !(EPOCH_Earplugsin) then {
|
||||
systemchat 'Earplugs have been auto-inserted...';
|
||||
EPOCH_Earplugsin = true;
|
||||
1 fadeSound 0.15;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -37,8 +37,10 @@ if (_unit == player) then {
|
||||
} forEach lineintersectsobjs [_start, _end, player, _vehicle, true, 2];
|
||||
};
|
||||
if (missionnamespace getvariable ["EPOCH_AutoEarplug",false]) then {
|
||||
systemchat 'Earplugs have been auto-removed...';
|
||||
EPOCH_Earplugsin = false;
|
||||
1 fadeSound 1;
|
||||
if (EPOCH_Earplugsin) then {
|
||||
systemchat 'Earplugs have been auto-removed...';
|
||||
EPOCH_Earplugsin = false;
|
||||
1 fadeSound 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -106,6 +106,17 @@ if (_dikCode == EPOCH_keysEPad) then {
|
||||
};
|
||||
};
|
||||
|
||||
if (_dikCode == EPOCH_Earplugs) then {
|
||||
if (EPOCH_Earplugsin) then {
|
||||
EPOCH_Earplugsin = false;
|
||||
1 fadeSound 1;
|
||||
}
|
||||
else {
|
||||
EPOCH_Earplugsin = true;
|
||||
1 fadeSound 0.15;
|
||||
};
|
||||
};
|
||||
|
||||
//Action Menu
|
||||
if (_dikCode == EPOCH_keysAction) then {
|
||||
//_handled = true;
|
||||
@ -255,16 +266,6 @@ if (vehicle player == player) then {
|
||||
player switchMove "";
|
||||
};
|
||||
};
|
||||
if (_dikCode == EPOCH_Earplugs) then {
|
||||
if (EPOCH_Earplugsin) then {
|
||||
EPOCH_Earplugsin = false;
|
||||
1 fadeSound 1;
|
||||
}
|
||||
else {
|
||||
EPOCH_Earplugsin = true;
|
||||
1 fadeSound 0.15;
|
||||
};
|
||||
};
|
||||
}; // end player only code
|
||||
|
||||
EPOCH_favBar_itemConsumed = false;
|
||||
|
@ -1,14 +1,23 @@
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_plyr","_plyrs","_trdrMsg"];
|
||||
//[[[end]]]
|
||||
_trdrMsg = "Do I look like the local Neighbourhood Watch..? No, I do not !";
|
||||
_plyrs = [];
|
||||
_plyrs = player nearEntities [["Epoch_Man_base_F","Epoch_Female_base_F"], 250];
|
||||
if (count _plyrs < 2) then {
|
||||
_trdrMsg = format["Apart from you %1. %2",name player, selectRandom ["I haven't seen any round these parts for a long while.","It has been very quiet around here,","There is not much to report !"]];
|
||||
} else {
|
||||
_plyrs deleteAt 0;
|
||||
_plyr = selectRandom _plyrs;
|
||||
_trdrMsg = format["%2 %1.",name _plyr, selectRandom ["The last person picked up by the UAV was","I did spot someone earlier, their name was","I heard there was somebody new in the area, "]];
|
||||
params [["_EnergyRequired",250],["_radius",250]];
|
||||
if (missionnamespace getvariable ["Epoch_PlayerScanActive",false]) exitwith {};
|
||||
if (EPOCH_playerEnergy - _EnergyRequired < 0) exitwith {
|
||||
[format ['You need %1 Energy to scan for near Players',_EnergyRequired], 5,[[0,0,0,0.5],[1,0.5,0,1]]] call Epoch_message;
|
||||
};
|
||||
[_trdrMsg, 5,[[0,0,0,0.5],[1,0.5,0,1]]] call Epoch_message;
|
||||
Epoch_PlayerScanActive = true;
|
||||
["Energy",-_EnergyRequired] call Epoch_GiveAttributes;
|
||||
_radius spawn {
|
||||
private ["_plyr","_plyrs","_trdrMsg"];
|
||||
["Scanning for near Players... Please wait...", 10,[[0,0,0,0.5],[1,0.5,0,1]]] call Epoch_message;
|
||||
uisleep (5 + random 3);
|
||||
_trdrMsg = "";
|
||||
_plyrs = (player nearEntities _this) select {isplayer _x};
|
||||
if (count _plyrs < 2) then {
|
||||
_trdrMsg = format["Apart from you %1. %2",name player, selectRandom ["I haven't seen any round these parts for a long while.","It has been very quiet around here,","There is not much to report !"]];
|
||||
} else {
|
||||
_plyrs deleteAt 0;
|
||||
_plyr = selectRandom _plyrs;
|
||||
_trdrMsg = format["%2 %1.",name _plyr, selectRandom ["The last person picked up by the UAV was","I did spot someone earlier, their name was","I heard there was somebody new in the area, "]];
|
||||
};
|
||||
[_trdrMsg, 5,[[0,0,0,0.5],[1,0.5,0,1]]] call Epoch_message;
|
||||
Epoch_PlayerScanActive = nil;
|
||||
};
|
@ -1,15 +1,23 @@
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_dist","_plyr","_trdrMsg","_veh","_vehs"];
|
||||
//[[[end]]]
|
||||
_trdrMsg = "Hey, there is a garage down the road.. Well, there used to be.";
|
||||
_vehs = [];
|
||||
_plyr = player;
|
||||
_vehs = nearestObjects [_plyr, ["CAR","AIR"], 1000];
|
||||
if (count _vehs < 1) then {
|
||||
_trdrMsg = format["%2 %1.",name _plyr,selectRandom["I haven't seen anything lately","There is nothing around here","The last time the UAV went out it found nothing"]];
|
||||
} else {
|
||||
_veh = _vehs select (floor (random count _vehs));
|
||||
_dist = _veh distance _plyr;
|
||||
_trdrMsg = format["I know of at least one vehicle within about %1m. It looks like a %2.",round (_dist/2 + (random _dist)) , (typeof _veh) call EPOCH_itemDisplayName];
|
||||
params [["_EnergyRequired",250],["_radius",250]];
|
||||
if (missionnamespace getvariable ["Epoch_VehicleScanActive",false]) exitwith {};
|
||||
if (EPOCH_playerEnergy - _EnergyRequired < 0) exitwith {
|
||||
[format ['You need %1 Energy to scan for near Players',_EnergyRequired], 5,[[0,0,0,0.5],[1,0.5,0,1]]] call Epoch_message;
|
||||
};
|
||||
Epoch_VehicleScanActive = true;
|
||||
["Energy",-_EnergyRequired] call Epoch_GiveAttributes;
|
||||
_radius spawn {
|
||||
private ["_dist","_trdrMsg","_veh","_vehs"];
|
||||
["Scanning for near Vehicles... Please wait...", 10,[[0,0,0,0.5],[1,0.5,0,1]]] call Epoch_message;
|
||||
uisleep (5 + random 3);
|
||||
_trdrMsg = "";
|
||||
_vehs = player nearEntities [["Landvehicle","SHIP","AIR","TANK"],_this];
|
||||
if (count _vehs < 1) then {
|
||||
_trdrMsg = format["%2 %1.",name player,selectRandom["I haven't seen anything lately","There is nothing around here","The last time the UAV went out it found nothing"]];
|
||||
} else {
|
||||
_veh = selectrandom _vehs;
|
||||
_dist = ceil ((_veh distance player) / 100) * 100;
|
||||
_trdrMsg = format["I know of at least one vehicle within about %1m. It looks like a %2.",_dist, (typeof _veh) call EPOCH_itemDisplayName];
|
||||
};
|
||||
[_trdrMsg, 5,[[0,0,0,0.5],[1,0.5,0,1]]] call Epoch_message;
|
||||
Epoch_VehicleScanActive = nil;
|
||||
};
|
||||
[_trdrMsg, 5,[[0,0,0,0.5],[1,0.5,0,1]]] call Epoch_message;
|
||||
|
@ -177,8 +177,8 @@ class e_pad_config
|
||||
Icon = "";
|
||||
color[] = {1,1,1,1};
|
||||
colortoggled[] = {0,1,0,1};
|
||||
action = "call compile preprocessfilelinenumbers ""epoch_code\gui\scripts\e_pad\Apps\traderDiag_nearVehicles.sqf""";
|
||||
Tooltip = "Vehicles Nearby?";
|
||||
action = "[250,1000] call compile preprocessfilelinenumbers ""epoch_code\gui\scripts\e_pad\Apps\traderDiag_nearVehicles.sqf""";
|
||||
Tooltip = "Scan for near Vehicles (costs 250 energy)";
|
||||
ToggleVar = "";
|
||||
ToggleAble = "false";
|
||||
};
|
||||
@ -189,8 +189,8 @@ class e_pad_config
|
||||
Icon = "";
|
||||
color[] = {1,1,1,1};
|
||||
colortoggled[] = {0,1,0,1};
|
||||
action = "call compile preprocessfilelinenumbers ""epoch_code\gui\scripts\e_pad\Apps\traderDiag_nearPlayers.sqf""";
|
||||
Tooltip = "Players Nearby?";
|
||||
action = "[250,250] call compile preprocessfilelinenumbers ""epoch_code\gui\scripts\e_pad\Apps\traderDiag_nearPlayers.sqf""";
|
||||
Tooltip = "Scan for near Players (costs 250 energy)";
|
||||
ToggleVar = "";
|
||||
ToggleAble = "false";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user