ACE3/addons/medical_status/functions/fnc_setCardiacArrest.sqf
SilentSpike 4466f9e785
Strip medical component (#6442)
* Move litter to `treatment`
* Move eden object attributes to `treatment`
* Move treatment items to `treatment`
* Move bodybag handling to `treatment`
* Move state conditions to `statemachine`
* Move radio addon handling to `feedback`
* Move medical macros to `engine`
* Move medical extension to `damage`
* Fix texture and material paths after move
* Remove duplicate medical menu config
* Remove old faction class
* Remove a bunch of old code
2018-07-18 19:13:25 +01:00

30 lines
718 B
Plaintext

/*
* 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.
*
* Arguments:
* 0: The unit that will be put in cardiac arrest state <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob] call ace_medical_fnc_setCardiacArrest
*
* Public: yes
*/
#include "script_component.hpp"
params ["_unit"];
if IN_CRDC_ARRST(_unit) exitWith {};
_unit setVariable [VAR_CRDC_ARRST, true, true];
_unit setVariable [VAR_HEART_RATE, 0, true];
["ace_cardiacArrestEntered", [_unit]] call CBA_fnc_localEvent;
[_unit, true] call FUNC(setUnconsciousStatemachine);