2016-11-07 21:21:07 +00:00
|
|
|
/*
|
|
|
|
* Author: BaerMitUmlaut
|
|
|
|
* Handles a unit entering cardiac arrest.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
2016-12-05 20:34:20 +00:00
|
|
|
|
2016-11-07 21:21:07 +00:00
|
|
|
params ["_unit"];
|
|
|
|
|
2016-11-15 13:52:09 +00:00
|
|
|
private _time = GVAR(cardiacArrestTime);
|
|
|
|
_time = _time + random [_time*-0.1, 0, _time*0.1];
|
|
|
|
|
|
|
|
_unit setVariable [QGVAR(cardiacArrestTime), _time];
|
2016-11-07 21:21:07 +00:00
|
|
|
_unit setVariable [QGVAR(cardiacArrestStart), CBA_missionTime];
|
2016-12-05 20:34:20 +00:00
|
|
|
|
|
|
|
[_unit] call FUNC(setCardiacArrest);
|