Handle Marker in Masterloop (for later E-Pad use)

This commit is contained in:
He-Man 2018-06-12 20:22:37 +02:00
parent 32e1836d1e
commit 1e64f6702a
4 changed files with 33 additions and 16 deletions

View File

@ -364,17 +364,30 @@ if !(_playerTempKey isEqualTo "EPOCH_playerTemp") then {
};
// Check for PlayerMarker and Update or Remove it
if(_PlayerMarkerName in allMapMarkers)then{
if!('ItemGPS' in (assignedItems player))then{
['PlayerMarker'] call EPOCH_fnc_deleteLocalMarkerSet;
if(_DeathMarkerName in allMapMarkers)then{
['DeathMarker'] call EPOCH_fnc_deleteLocalMarkerSet;
};
}else{
if (_PlayerMarkerEnabled && EPOCH_PlayerMarkerOn && 'ItemGPS' in (assignedItems player)) then {
if (_PlayerMarkerName in allMapMarkers) then {
{
(_x select 0) setMarkerPosLocal (position player);
if(count(_x) >= 8)then{(_x select 0) setMarkerTextLocal (call compile (_x select 7))};
}forEach _PlayerMarkerArray;
}
else {
['PlayerMarker',position player] call EPOCH_fnc_createLocalMarkerSet;
};
}
else {
if (_PlayerMarkerName in allMapMarkers) then {
['PlayerMarker'] call EPOCH_fnc_deleteLocalMarkerSet;
};
};
if (_DeathMarkerEnabled && EPOCH_DeathMarkerOn && !(_DeathMarker isEqualTo [])) then {
if !(_DeathMarkerName in allMapMarkers) then {
['DeathMarker',_DeathMarker] call EPOCH_fnc_createLocalMarkerSet
};
}
else {
if (_DeathMarkerName in allMapMarkers) then {
['DeathMarker'] call EPOCH_fnc_deleteLocalMarkerSet;
};
};
if(_mapOnZoomSetMarkerSize isEqualTo 1)then{

View File

@ -136,7 +136,9 @@ _PlayerMarkerArray = getArray(('CfgMarkerSets' call EPOCH_returnConfig) >> 'Play
_PlayerMarkerName = (_PlayerMarkerArray param [0,[]]) param [0,"EPOCH_PlayerMarker1"];
_DeathMarkerName = ((getArray (('CfgMarkerSets' call EPOCH_returnConfig) >> 'DeathMarker' >> 'markerArray')) param [0,[]]) param [0,"EPOCH_DeathMarker1"];
_mapOnZoomSetMarkerSize = ["CfgEpochClient", "mapOnZoomSetMarkerSize", 0] call EPOCH_fnc_returnConfigEntryV2;
_PlayerMarkerEnabled = (["CfgEpochClient", "playerLocationMarkerGPSOnly", 0] call EPOCH_fnc_returnConfigEntryV2) isequalto 1;
_DeathMarkerEnabled = (["CfgEpochClient", "playerDeathMarkerGPSOnly", 0] call EPOCH_fnc_returnConfigEntryV2) isequalto 1;
_DeathMarker = profileNameSpace getVariable ['EPOCHLastKnownDeath',[]];
_chargeRate = 0;
_antagonistChanceDefaults = [

View File

@ -59,6 +59,8 @@ EPOCH_nearestLocations = [];
EPOCH_lastFiredLocation = [];
EPOCH_IsAutoRunning = false;
EPOCH_LastAutoRunKeyPressed = diag_ticktime;
EPOCH_PlayerMarkerOn = false;
EPOCH_DeathMarkerOn = false;
//Radiation
EPOCH_geiger_shown = false;

View File

@ -15,29 +15,29 @@
class playerMarker_on
{
condition = "dyna_mapPlayerMarkerON && 'ItemGPS' in dyna_assignedItems && !dyna_mapPlayerMarker";
action = "['PlayerMarker',position player] call EPOCH_fnc_createLocalMarkerSet";
condition = "!EPOCH_PlayerMarkerOn";
action = "EPOCH_PlayerMarkerOn = true; if !('ItemGPS' in dyna_assignedItems) then {['You need a GPS to see your Position',5] call epoch_message}";
icon = "x\addons\a3_epoch_community\buttons\gps.paa";
tooltip = "Toggle ON player marker";
};
class playerMarker_off
{
condition = "dyna_mapPlayerMarkerON && dyna_mapPlayerMarker";
action = "['PlayerMarker'] call EPOCH_fnc_deleteLocalMarkerSet";
condition = "EPOCH_PlayerMarkerOn";
action = "EPOCH_PlayerMarkerOn = false";
icon = "x\addons\a3_epoch_community\buttons\gps.paa";
tooltip = "Toggle OFF player marker";
};
class deathMarker_on
{
condition = "dyna_deathMarkerON && dyna_deathMarkerAvail && !dyna_mapDeathMarker";
action = "['DeathMarker',dyna_deathMarker] call EPOCH_fnc_createLocalMarkerSet";
condition = "!EPOCH_DeathMarkerOn";
action = "EPOCH_DeathMarkerOn = true; if ((profileNameSpace getVariable ['EPOCHLastKnownDeath',[]]) isequalto []) then {['You had no GPS on last death',5] call epoch_message}";
icon = "x\addons\a3_epoch_community\icons\skull.paa";
tooltip = "Toggle ON death marker";
};
class deathMarker_off
{
condition = "dyna_deathMarkerON && dyna_mapDeathMarker";
action = "['DeathMarker'] call EPOCH_fnc_deleteLocalMarkerSet";
condition = "EPOCH_DeathMarkerOn";
action = "EPOCH_DeathMarkerOn = false";
icon = "x\addons\a3_epoch_community\icons\skull.paa";
tooltip = "Toggle OFF death marker";
};