Skip to content

Commit

Permalink
Field Rations - Add small grace period between consciousness losses (#…
Browse files Browse the repository at this point in the history
…10443)

* Give a small grace period between uncons

* Update fnc_handleEffects.sqf
  • Loading branch information
johnb432 authored Oct 22, 2024
1 parent 323d993 commit 3773684
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/field_rations/functions/fnc_handleEffects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ if !(_player call EFUNC(common,isAwake)) exitWith {};

// Set unit unconscious (chance based on how high thirst/hunger are)
if (
GETEGVAR(medical,enabled,false) &&
GETEGVAR(medical,enabled,false) &&
{(_thirst > 85 || {_hunger > 85}) && {random 1 < linearConversion [85, 100, _thirst max _hunger, 0.05, 0.1, true]}}
) exitWith {
if (_player getVariable [QGVAR(nextUnconsciousTime), CBA_missionTime] > CBA_missionTime) exitWith {};

_player setVariable [QGVAR(nextUnconsciousTime), CBA_missionTime + 15];

[_player, true, 5, true] call EFUNC(medical,setUnconscious);
};

Expand Down

0 comments on commit 3773684

Please sign in to comment.