trial implementation

This commit is contained in:
2024-02-13 20:50:09 -08:00
parent 5114ae334f
commit e55c9a0751
5 changed files with 38 additions and 2 deletions

View File

@@ -7,11 +7,20 @@ player addEventHandler["Respawn",
params ["_unit", "_corpse"];
private _killer = _corpse getVariable ["ace_medical_causeOfDeath", "#scripted"];
if (_killer == "respawn_button") then {
private _timeWentUnconscious = _unit getVariable [QGVARMAIN(lastTimeKnockedOut), -1];
private _durationSpentUnconscious = diag_tickTime - _timeWentUnconscious;
[
LEVEL_INFO,
QUOTE(COMPONENT),
"RESPAWNED WHILE UNCONSCIOUS",
[_unit] call EFUNC(common,addPlayerInfoToArray)
[_unit, [[
"durationSpentUnconscious",
(if (_timeWentUnconscious > - 1) then {
_durationSpentUnconscious
} else {
-1
})
]]] call EFUNC(common,addPlayerInfoToArray)
] remoteExec [QEFUNC(common,log), 2];
// format["%1 was unconscious then clicked the respawn button", name _unit] remoteExec["systemChat", 0];
};