ACE3/addons/medical_status/functions/fnc_getPainPerceived.sqf

21 lines
378 B
Plaintext
Raw Normal View History

/*
* Author: Ruthberg
2017-04-27 16:53:49 +00:00
* Get the perceived pain level of a unit.
*
* Arguments:
* 0: The Unit <OBJECT>
*
2017-04-27 16:53:49 +00:00
* Return Value:
* Pain level (0 .. 1) <NUMBER>
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
2018-05-08 09:16:12 +00:00
private _pain = GET_PAIN_TOTAL(_unit);
private _painSuppress = _unit getVariable [QGVAR(painSuppress), 0];
(0 max (_pain - _painSuppress) min 1)