mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
LootPos - More Filter + objnull fix
This commit is contained in:
parent
a30a966e6a
commit
9e891464d6
@ -17,9 +17,18 @@ if !(_source isEqualTo _unit) then {
|
|||||||
if ((missionnamespace getvariable ["EPOCH_HandleDamageTimeOut",diag_ticktime]) > diag_ticktime) exitwith {}; // prevent multiple actions here
|
if ((missionnamespace getvariable ["EPOCH_HandleDamageTimeOut",diag_ticktime]) > diag_ticktime) exitwith {}; // prevent multiple actions here
|
||||||
switch _projectile do {
|
switch _projectile do {
|
||||||
case "B_EnergyPack": {
|
case "B_EnergyPack": {
|
||||||
if (_source distance _unit > 10) exitwith {};
|
|
||||||
if (missionnamespace getvariable ["EPOCH_OldRevive",false]) exitwith {};
|
|
||||||
EPOCH_HandleDamageTimeOut = diag_ticktime + 0.1;
|
EPOCH_HandleDamageTimeOut = diag_ticktime + 0.1;
|
||||||
|
if (currentweapon _source isEqualTo "pvcrifle_01_epoch") then {
|
||||||
|
if !(lifeState _unit == "INCAPACITATED") then {
|
||||||
|
EPOCH_HandleDamageTimeOut = diag_ticktime + 1;
|
||||||
|
_unit setUnconscious true;
|
||||||
|
EPOCH_UnconsciousTime = diag_ticktime + 60 + (random 120);
|
||||||
|
["You are Knocked out for a while...",5] call Epoch_Message;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (_source distance _unit > 10) exitwith {};
|
||||||
|
if !(missionnamespace getvariable ["EPOCH_OldRevive",false]) then {
|
||||||
_attachments = handgunItems _source;
|
_attachments = handgunItems _source;
|
||||||
if ("Heal_EPOCH" in _attachments) then {
|
if ("Heal_EPOCH" in _attachments) then {
|
||||||
if (lifeState _unit == "INCAPACITATED") exitwith {
|
if (lifeState _unit == "INCAPACITATED") exitwith {
|
||||||
@ -53,11 +62,14 @@ if !(_source isEqualTo _unit) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
case "B_KnockOut": {
|
case "B_KnockOut": {
|
||||||
if !(lifeState _unit == "INCAPACITATED") then {
|
if !(lifeState _unit == "INCAPACITATED") then {
|
||||||
EPOCH_HandleDamageTimeOut = diag_ticktime + 1;
|
EPOCH_HandleDamageTimeOut = diag_ticktime + 1;
|
||||||
_unit setUnconscious true;
|
_unit setUnconscious true;
|
||||||
EPOCH_UnconsciousTime = diag_ticktime + 60 + (random 120);
|
EPOCH_UnconsciousTime = diag_ticktime + 60 + (random 120);
|
||||||
|
["You are Knocked out for a while...",5] call Epoch_Message;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
if (isnil "LootMarkersPositions" && isnil "LootMarkers") then {
|
if (isnil "LootMarkersPositions" && isnil "LootMarkers") then {
|
||||||
_Skipbuildings = [
|
_Skipbuildings = [
|
||||||
|
"Land_LandMark_F",
|
||||||
|
"Land_wpp_Turbine_V2_F",
|
||||||
"Land_Mil_Barracks_L",
|
"Land_Mil_Barracks_L",
|
||||||
"Land_Mil_Guardhouse",
|
"Land_Mil_Guardhouse",
|
||||||
"Land_Mil_ControlTower_ruins",
|
"Land_Mil_ControlTower_ruins",
|
||||||
@ -50,6 +52,7 @@ if (isnil "LootMarkersPositions" && isnil "LootMarkers") then {
|
|||||||
"Land_House_1W04_ruins_F"
|
"Land_House_1W04_ruins_F"
|
||||||
];
|
];
|
||||||
_skipstrings = [
|
_skipstrings = [
|
||||||
|
"land_powerwire",
|
||||||
"land_containerline",
|
"land_containerline",
|
||||||
"land_telephoneline",
|
"land_telephoneline",
|
||||||
"land_power_pole",
|
"land_power_pole",
|
||||||
@ -353,10 +356,16 @@ player allowdamage false;
|
|||||||
_idx = round (random ((count LootMarkersPositions)-1));
|
_idx = round (random ((count LootMarkersPositions)-1));
|
||||||
systemchat format ["Index = %1",_idx];
|
systemchat format ["Index = %1",_idx];
|
||||||
player setpos (LootMarkersPositions select _idx);
|
player setpos (LootMarkersPositions select _idx);
|
||||||
Building = nearestObject [player, LootMarkers select _idx];
|
Building = (nearestObjects [player, [LootMarkers select _idx],200]) param [0,objnull];
|
||||||
|
if !(isnull Building) then {
|
||||||
systemchat format ['Selected Building = %1',typeof Building];
|
systemchat format ['Selected Building = %1',typeof Building];
|
||||||
hint format ['Selected Building = %1',typeof Building];
|
hint format ['Selected Building = %1',typeof Building];
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
systemchat "Error - Building not found";
|
||||||
|
hint "Error - Building not found";
|
||||||
|
};
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
hint "No more positions found!";
|
hint "No more positions found!";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user