ACE3/addons/medical/functions/fnc_getUnconsciousCondition.sqf

33 lines
589 B
Plaintext
Raw Normal View History

/*
* Author: Glowbal
* Get whatever or not a unit should be or stay unconscious.
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* Should the unit stay unconscious? <BOOL>
*
* Example:
* [bob] call ace_medical_fnc_getUnconsciousCondition
*
* Public: Yes
*/
#include "script_component.hpp"
2015-08-22 14:25:10 +00:00
params ["_unit"];
if (isnil QGVAR(unconsciousConditions)) then {
GVAR(unconsciousConditions) = [];
};
2016-06-13 08:55:19 +00:00
private _return = false;
{
if ((_x isEqualType {}) && {([_unit] call _x)}) exitwith {
_return = true;
};
2015-08-22 14:25:10 +00:00
} foreach GVAR(unconsciousConditions);
2015-08-22 14:25:10 +00:00
_return