Last active
September 5, 2023 01:00
-
-
Save Drofseh/93a937fed3d5bc70bd33b9a4d48a36fe to your computer and use it in GitHub Desktop.
Prevent a Unit from Bleeding Out in Ace Medical
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dro_FNC_Bleedout_Prevention = { | |
params ["_unit", ["_wakeup", false, [true]]]; | |
if (!alive _unit || {_unit getVariable ["dro_endBleedoutPrevention", false]}) exitWith {false}; | |
if (_unit getVariable ["ACE_isUnconscious",false]) then { | |
private _bloodVolume = _unit getVariable ["ace_medical_bloodVolume", 6]; | |
if (_bloodVolume < 3.5) then { | |
[_unit, false] call ace_medical_fnc_setUnconscious; | |
_unit setVariable ["ace_medical_bloodVolume", ([3.5, 5.2] select _wakeup)]; | |
}; | |
}; | |
[{ | |
_this call dro_FNC_Bleedout_Prevention; | |
}, [_unit,_wakeup], 1] call CBA_fnc_waitAndExecute; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment