mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added more status functions
This commit is contained in:
parent
56818ac780
commit
ac126aea28
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Adds a heart rate adjustment that will take effect over time.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Unit <OBJECT>
|
||||
* 1: Heart rate change <NUMBER>
|
||||
* 2: Time in system for the adjustment to reach its peak <NUMBER>
|
||||
* 3: Duration the adjustment will have an effect <NUMVER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_unit", "_change", "_timeToMaxEffect", "_maxTimeInSystem"];
|
||||
|
||||
private _adjustments = _unit getVariable [QGVAR(heartRateAdjustments), []];
|
||||
// The last number indicates the time the adjustment is already in the system
|
||||
_adjustments pushBack [_change, _timeToMaxEffect, _maxTimeInSystem, 0];
|
||||
_unit setVariable [QGVAR(heartRateAdjustments), _heartRateAdjustments];
|
14
addons/medical_status/functions/fnc_getHeartRate.sqf
Normal file
14
addons/medical_status/functions/fnc_getHeartRate.sqf
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Get the heart rate of a unit.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Heart Rate <NUMBER>
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_unit"];
|
||||
|
||||
_unit getVariable [QGVAR(heartRate), DEFAULT_HEART_RATE]
|
@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Get the total pain level of a unit.
|
||||
* Get the perceived pain level of a unit.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Unit <OBJECT>
|
||||
*
|
||||
* ReturnValue:
|
||||
* Return Value:
|
||||
* Pain level (0 .. 1) <NUMBER>
|
||||
*
|
||||
* Public: No
|
14
addons/medical_status/functions/fnc_getPainTotal.sqf
Normal file
14
addons/medical_status/functions/fnc_getPainTotal.sqf
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Get the total pain level of a unit.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Pain level (0 .. 1) <NUMBER>
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_unit"];
|
||||
|
||||
_unit getVariable [QGVAR(pain), 0]
|
14
addons/medical_status/functions/fnc_isUnconscious.sqf
Normal file
14
addons/medical_status/functions/fnc_isUnconscious.sqf
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Check if the unit is unconscious.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Is unconscious <BOOL>
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_unit"];
|
||||
|
||||
_unit getVariable [QGVAR(isUnconscious), false]
|
15
addons/medical_status/functions/fnc_setHeartRate.sqf
Normal file
15
addons/medical_status/functions/fnc_setHeartRate.sqf
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Sets the heart rate of a unit.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Unit <OBJECT>
|
||||
* 1: Heart rate <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_unit", "_heartRate"];
|
||||
|
||||
_unit setVariable [QGVAR(heartRate), _heartRate];
|
15
addons/medical_status/functions/fnc_setPainTotal.sqf
Normal file
15
addons/medical_status/functions/fnc_setPainTotal.sqf
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Sets the total pain level of a unit.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Unit <OBJECT>
|
||||
* 1: Pain level (0..1) <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_unit", "_pain"];
|
||||
|
||||
_unit setVariable [QGVAR(pain), 0 max _pain min 1];
|
Loading…
Reference in New Issue
Block a user