From fcbdd594aea24f7051d5ec8c3307078d69fc8fec Mon Sep 17 00:00:00 2001 From: vbawol Date: Sun, 3 Sep 2017 10:32:47 -0500 Subject: [PATCH] Screen effect when taking radiation damage #796 --- Sources/epoch_code/compile/setup/masterLoop/Event2.sqf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf index a160c2e0..9b56ef25 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf @@ -39,6 +39,14 @@ if (EPOCH_playerAlcohol > 20) then { [0, 2] call epoch_setDrunk; }; +// Sets visual effect +if (_playerRadiation > 1) then { + _radiationVal = linearConversion [0,100,_playerRadiation,0.1,1,true]; + [(round(_radiationVal * 10)/10), 2] call epoch_setRadiation; +} else { + [0, 2] call epoch_setRadiation; +}; + EPOCH_playerEnergy = ((EPOCH_playerEnergy + _energyValue) min EPOCH_playerEnergyMax) max 0; if !(EPOCH_playerEnergy isEqualTo _prevEnergy) then {