ACE3/addons/medical_status/functions/fnc_getPainPerceived.sqf
2017-04-27 19:02:23 +02:00

21 lines
391 B
Plaintext

/*
* Author: Ruthberg
* Get the perceived pain level of a unit.
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* Pain level (0 .. 1) <NUMBER>
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
private _pain = _unit getVariable [QGVAR(pain), 0];
private _painSuppress = _unit getVariable [QGVAR(painSuppress), 0];
(0 max (_pain - _painSuppress) min 1)