mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add 10% variation to cardiac arrest time
Gaussian distribution favours the average time setting. This introduces some unpredictability to cardiac arrest, but not enough to make users confused. Keeps the settings simple to again reduce confusion and improve overall UX.
This commit is contained in:
parent
24ada4dab3
commit
39582914f7
@ -53,7 +53,7 @@ GVAR(STATE_MACHINE) = (configFile >> "ACE_Medical_StateMachine") call CBA_statem
|
||||
[
|
||||
QGVAR(cardiacArrestTime),
|
||||
"SLIDER",
|
||||
["Cardiac Arrest Time", "Sets how long cardiac arrest will last for (in minutes)."], //@todo
|
||||
["Cardiac Arrest Time", "Sets how long cardiac arrest will last for on average (in minutes)."], //@todo
|
||||
"ACE Medical", // @todo
|
||||
[0, 30, 2, 0],
|
||||
true
|
||||
|
@ -14,5 +14,6 @@
|
||||
params ["_unit"];
|
||||
|
||||
private _startTime = _unit getVariable [QGVAR(cardiacArrestStart), CBA_missionTime];
|
||||
private _lifeTime = _unit getVariable [QGVAR(cardiacArrestTime), GVAR(cardiacArrestTime)];
|
||||
|
||||
(CBA_missionTime - _startTime) > (GVAR(cardiacArrestTime) * 60)
|
||||
(CBA_missionTime - _startTime) > (_lifeTime * 60)
|
||||
|
@ -13,4 +13,8 @@
|
||||
#include "script_component.hpp"
|
||||
params ["_unit"];
|
||||
|
||||
private _time = GVAR(cardiacArrestTime);
|
||||
_time = _time + random [_time*-0.1, 0, _time*0.1];
|
||||
|
||||
_unit setVariable [QGVAR(cardiacArrestTime), _time];
|
||||
_unit setVariable [QGVAR(cardiacArrestStart), CBA_missionTime];
|
||||
|
Loading…
Reference in New Issue
Block a user