Medical injured sound "moan" when thirst/hunger > 70

This commit is contained in:
mrschick 2024-08-11 19:31:25 +02:00
parent 17c1ef3c03
commit 207fb4dc82

View File

@ -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) &&