2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-02-08 12:06:44 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Adds new condition for the unconscious state. Conditions are not actively checked for units unless unit is in unconscious state.
|
|
|
|
*
|
|
|
|
* Arguments:
|
2015-08-22 14:25:10 +00:00
|
|
|
* 0-N: Code, should return a boolean <CODE>
|
2015-02-08 12:06:44 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Return Value:
|
2015-08-22 14:25:10 +00:00
|
|
|
* None
|
2015-02-08 12:06:44 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [[{bob}]] call ace_medical_fnc_addUnconsciousCondition
|
|
|
|
*
|
2015-02-08 12:06:44 +00:00
|
|
|
* Public: Yes
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (isnil QGVAR(unconsciousConditions)) then {
|
|
|
|
GVAR(unconsciousConditions) = [];
|
|
|
|
};
|
2015-11-20 17:40:31 +00:00
|
|
|
if (_this isEqualType []) then {
|
2015-02-08 12:06:44 +00:00
|
|
|
{
|
2015-11-20 17:40:31 +00:00
|
|
|
if (_x isEqualType {}) then {
|
2015-02-08 12:06:44 +00:00
|
|
|
GVAR(unconsciousConditions) pushback _x;
|
|
|
|
};
|
2015-08-22 14:25:10 +00:00
|
|
|
} foreach _this;
|
2015-02-08 12:06:44 +00:00
|
|
|
};
|