2018-07-30 09:22:14 +00:00
|
|
|
#include "script_component.hpp"
|
2016-11-07 21:21:07 +00:00
|
|
|
/*
|
|
|
|
* Author: BaerMitUmlaut
|
2016-11-09 18:01:55 +00:00
|
|
|
* Checks if the cardiac arrest timer ran out.
|
2016-11-07 21:21:07 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
2019-03-30 16:07:54 +00:00
|
|
|
* Example:
|
|
|
|
* [player] call ace_medical_statemachine_fnc_conditionCardiacArrestTimer
|
|
|
|
*
|
2016-11-07 21:21:07 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
2018-08-02 14:02:10 +00:00
|
|
|
|
2016-11-07 21:21:07 +00:00
|
|
|
params ["_unit"];
|
|
|
|
|
|
|
|
private _startTime = _unit getVariable [QGVAR(cardiacArrestStart), CBA_missionTime];
|
2018-08-11 10:40:06 +00:00
|
|
|
private _lifeTime = _unit getVariable [QGVAR(cardiacArrestTime), GVAR(cardiacArrestTime)];
|
2016-11-07 21:21:07 +00:00
|
|
|
|
2018-04-18 22:25:44 +00:00
|
|
|
(CBA_missionTime - _startTime) > _lifeTime
|