From 207fb4dc820cc4e32d24242fd6566af2c87379f4 Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Sun, 11 Aug 2024 19:31:25 +0200 Subject: [PATCH] Medical injured sound "moan" when thirst/hunger > 70 --- addons/field_rations/functions/fnc_handleEffects.sqf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/addons/field_rations/functions/fnc_handleEffects.sqf b/addons/field_rations/functions/fnc_handleEffects.sqf index d84608ac22..f86ff3f3f3 100644 --- a/addons/field_rations/functions/fnc_handleEffects.sqf +++ b/addons/field_rations/functions/fnc_handleEffects.sqf @@ -27,6 +27,15 @@ if ((_thirst > 99.9 || {_hunger > 99.9}) && {random 1 < 0.5}) exitWith { // Exit if unit is not awake, below are animation based consequences if !(_player call EFUNC(common,isAwake)) exitWith {}; +// Make unit moan from high hunger/thirst +if ( + GETEGVAR(medical,enabled,false) && + {(_thirst > 70) || {_hunger > 70}} && + {random 1 < linearConversion [70, 100, _thirst max _hunger, 0.05, 0.2, true]} +) then { + [ACE_Player, "moan", round (linearConversion [70, 100, _thirst max _hunger, 0, 1, true])] call EFUNC(medical_feedback,playInjuredSound); +}; + // Trigger high thirst/hunger consequence if ( GETEGVAR(medical,enabled,false) &&