2015-02-06 12:47:17 +00:00
|
|
|
/*
|
|
|
|
* Author: KoffeinFlummi
|
|
|
|
* Initializes unit variables.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* ReturnValue:
|
|
|
|
* nil
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-02-28 10:47:35 +00:00
|
|
|
private ["_unit", "_allUsedMedication", "_logs"];
|
2015-02-06 12:47:17 +00:00
|
|
|
|
|
|
|
_unit = _this select 0;
|
|
|
|
|
|
|
|
_unit setVariable [QGVAR(pain), 0, true];
|
|
|
|
_unit setVariable [QGVAR(morphine), 0, true];
|
2015-02-10 22:13:14 +00:00
|
|
|
_unit setVariable [QGVAR(bloodVolume), 100, true];
|
2015-02-28 10:41:27 +00:00
|
|
|
|
|
|
|
// tourniquets
|
|
|
|
_unit setvariable [QGVAR(tourniquets), [0,0,0,0,0,0], true];
|
|
|
|
|
|
|
|
// wounds and injuries
|
|
|
|
_unit setvariable [QGVAR(openWounds), [], true];
|
2015-04-05 17:26:33 +00:00
|
|
|
_unit setvariable [QGVAR(bandagedWounds), [], true];
|
2015-02-28 10:41:27 +00:00
|
|
|
_unit setVariable [QGVAR(internalWounds), [], true];
|
|
|
|
|
|
|
|
// vitals
|
|
|
|
_unit setVariable [QGVAR(heartRate), 80];
|
|
|
|
_unit setvariable [QGVAR(heartRateAdjustments), []];
|
2015-02-28 17:46:44 +00:00
|
|
|
_unit setvariable [QGVAR(bloodPressure), [80, 120]];
|
2015-02-28 10:41:27 +00:00
|
|
|
_unit setVariable [QGVAR(peripheralResistance), 100];
|
|
|
|
|
|
|
|
// fractures
|
|
|
|
_unit setVariable [QGVAR(fractures), []];
|
|
|
|
|
|
|
|
// triage card and logs
|
|
|
|
_unit setvariable [QGVAR(triageLevel), 0, true];
|
|
|
|
_unit setvariable [QGVAR(triageCard), [], true];
|
|
|
|
|
|
|
|
// IVs
|
|
|
|
_unit setVariable [QGVAR(salineIVVolume), 0];
|
|
|
|
_unit setVariable [QGVAR(plasmaIVVolume), 0];
|
|
|
|
_unit setVariable [QGVAR(bloodIVVolume), 0];
|
|
|
|
|
|
|
|
// damage storage
|
|
|
|
_unit setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
|
|
|
|
|
|
|
|
// airway
|
2015-04-03 16:59:22 +00:00
|
|
|
_unit setvariable [QGVAR(airwayStatus), 100, true];
|
2015-02-28 10:41:27 +00:00
|
|
|
_unit setVariable [QGVAR(airwayOccluded), false, true];
|
2015-03-05 17:40:55 +00:00
|
|
|
_unit setvariable [QGVAR(airwayCollapsed), false, true];
|
2015-02-28 10:41:27 +00:00
|
|
|
|
|
|
|
// generic medical admin
|
|
|
|
_unit setvariable [QGVAR(addedToUnitLoop), false, true];
|
2015-03-05 17:40:55 +00:00
|
|
|
_unit setvariable [QGVAR(inCardiacArrest), false, true];
|
2015-03-26 20:47:08 +00:00
|
|
|
_unit setVariable ["ACE_isUnconscious", false, true];
|
2015-03-05 17:40:55 +00:00
|
|
|
_unit setvariable [QGVAR(hasLostBlood), false, true];
|
2015-02-28 10:41:27 +00:00
|
|
|
_unit setvariable [QGVAR(isBleeding), false, true];
|
|
|
|
_unit setvariable [QGVAR(hasPain), false, true];
|
2015-04-03 21:56:32 +00:00
|
|
|
_unit setvariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives), true];
|
2015-02-28 10:41:27 +00:00
|
|
|
|
|
|
|
// medication
|
2015-02-28 10:48:11 +00:00
|
|
|
_allUsedMedication = _unit getVariable [QGVAR(allUsedMedication), []];
|
2015-02-28 10:41:27 +00:00
|
|
|
{
|
|
|
|
_unit setvariable [_x select 0, nil];
|
2015-02-28 19:46:36 +00:00
|
|
|
} foreach _allUsedMedication;
|
2015-02-28 10:48:11 +00:00
|
|
|
_unit setVariable [QGVAR(allUsedMedication), []];
|
2015-02-28 10:47:35 +00:00
|
|
|
|
|
|
|
_logs = _unit getvariable [QGVAR(allLogs), []];
|
|
|
|
{
|
2015-02-28 18:28:05 +00:00
|
|
|
_unit setvariable [_x, nil, true];
|
2015-02-28 19:46:36 +00:00
|
|
|
} foreach _logs;
|
2015-02-28 10:47:35 +00:00
|
|
|
_unit setvariable [QGVAR(allLogs), [], true];
|
2015-03-21 20:59:08 +00:00
|
|
|
|
|
|
|
// items
|
|
|
|
[{
|
|
|
|
_this call FUNC(itemCheck);
|
|
|
|
}, [_unit], 0.5, 0.1] call EFUNC(common,waitAndExecute);
|