ACE3/addons/medical_ai/functions/fnc_isInjured.sqf
BaerMitUmlaut 278e7fa800 Add Medical AI implementation for basic medical (#4311)
* Initial commit medical AI

* Finished non-healing functions

* Initial work on self healin

* AI healing

* Finished medical AI for basic medical

* Finito

* Fix for dead units, medic not being close enough

* Make ace_medical required

* Fixed double systemChat

* Made AI units able to heal players

* Fixed wound treatment

* Fixed medic movement

* Made units heal themselves earlier
2016-09-04 11:25:03 +02:00

23 lines
539 B
Plaintext

/*
* Author: BaerMitUmlaut
* Checks if a unit needs treatment.
*
* Arguments:
* None
*
* Return Value:
* Does unit need treatment <BOOL>
*
* Public: No
*/
#include "script_component.hpp"
if !(alive _this) exitWith {false};
private _bloodLoss = [_this] call EFUNC(medical,getBloodLoss);
private _pain = _this getVariable [QEGVAR(medical,pain), 0];
// Advanced only?
// private _heartRate = _this getVariable [QEGVAR(medical,heartRate), 70];
(_bloodLoss > 0) || {_pain > 0.2} // || {_heartRate > 100} || {_heartRate < 40}