Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical - Prevent uncon AI from talking #9776

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions addons/medical_status/functions/fnc_setUnconsciousState.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,19 @@ if (_active) then {
// Do "Unlock controls" user action, co-pilot will then have to do the "Take Controls" actions
_unit action ["UnlockVehicleControl", vehicle _unit];
};

// Disable AI talking (yes, this needs to be explicit)
if (!isPlayer _unit && {_unit checkAIFeature "RADIOPROTOCOL"}) then {
_unit disableAI "RADIOPROTOCOL";
_unit setVariable [QGVAR(reenableRadioProtocol), true, true];
};
} else {
// Unit has woken up, no longer need to track this
_unit setVariable [QEGVAR(medical,lastWakeUpCheck), nil];

if (_unit getVariable [QGVAR(reenableRadioProtocol), false]) then {
_unit enableAI "RADIOPROTOCOL";
};
};

// This event doesn't correspond to unconscious in statemachine
Expand Down
Loading