2015-02-08 09:01:32 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Triggers a unit into the Cardiac Arrest state from CMS. Will put the unit in an unconscious state and run a countdown timer until unit dies.
|
|
|
|
* Timer is a random value between 120 and 720 seconds.
|
2015-02-07 23:08:36 +00:00
|
|
|
*
|
2015-02-08 09:01:32 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: The unit that will be put in cardiac arrest state <OBJECT>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Return Value:
|
2015-08-22 17:47:23 +00:00
|
|
|
* None
|
2015-02-08 09:01:32 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [bob] call ace_medical_fnc_setCardiacArrest
|
|
|
|
*
|
2015-02-08 09:01:32 +00:00
|
|
|
* Public: yes
|
2015-02-07 23:08:36 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-22 17:47:23 +00:00
|
|
|
params ["_unit"];
|
2015-02-07 23:08:36 +00:00
|
|
|
|
2018-05-22 17:06:28 +00:00
|
|
|
if IN_CRDC_ARRST(_unit) exitWith {};
|
2016-12-06 16:26:11 +00:00
|
|
|
|
2018-05-22 17:06:28 +00:00
|
|
|
_unit setVariable [VAR_CRDC_ARRST, true, true];
|
2018-05-11 14:28:25 +00:00
|
|
|
_unit setVariable [VAR_HEART_RATE, 0, true];
|
2015-02-07 23:08:36 +00:00
|
|
|
|
2016-06-24 13:45:13 +00:00
|
|
|
["ace_cardiacArrestEntered", [_unit]] call CBA_fnc_localEvent;
|
2015-02-07 23:08:36 +00:00
|
|
|
|
2018-05-09 12:37:07 +00:00
|
|
|
[_unit, true] call EFUNC(medical,setUnconsciousStatemachine);
|