2017-04-27 16:53:49 +00:00
|
|
|
/*
|
|
|
|
* 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"];
|
|
|
|
|
2018-07-15 11:01:26 +00:00
|
|
|
private _adjustments = _unit getVariable [VAR_HEART_RATE_ADJ,[]];
|
2017-04-27 16:53:49 +00:00
|
|
|
// The last number indicates the time the adjustment is already in the system
|
|
|
|
_adjustments pushBack [_change, _timeToMaxEffect, _maxTimeInSystem, 0];
|
2018-05-11 15:11:01 +00:00
|
|
|
_unit setVariable [VAR_HEART_RATE_ADJ, _adjustments];
|