mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Reorganize AI unconsciousness
This commit is contained in:
parent
f28a806938
commit
965a976daf
@ -54,7 +54,7 @@ class ACE_Settings {
|
||||
typeName = "SCALAR";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(enableUnsconsiousnessAI) {
|
||||
class GVAR(enableUnconsiousnessAI) {
|
||||
value = 1;
|
||||
typeName = "SCALAR";
|
||||
values[] = {"Disabled", "Enabled", "50/50"};
|
||||
|
@ -87,7 +87,7 @@ class CfgVehicles {
|
||||
typeName = "NUMBER";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class enableUnsconsiousnessAI {
|
||||
class enableUnconsiousnessAI {
|
||||
displayName = "AI Unconsciousness";
|
||||
description = "Allow AI to go unconscious";
|
||||
typeName = "NUMBER";
|
||||
@ -97,12 +97,12 @@ class CfgVehicles {
|
||||
value = 0;
|
||||
};
|
||||
class normal {
|
||||
name = "Enabled";
|
||||
name = "50/50";
|
||||
value = 1;
|
||||
default = 1;
|
||||
};
|
||||
class full {
|
||||
name = "50/50";
|
||||
class full {
|
||||
name = "Enabled";
|
||||
value = 2;
|
||||
};
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ if !(_activated) exitWith {};
|
||||
[_logic, QGVAR(enableScreams), "enableScreams"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(playerDamageThreshold), "playerDamageThreshold"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(AIDamageThreshold), "AIDamageThreshold"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(enableUnsconsiousnessAI), "enableUnsconsiousnessAI"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(enableUnconsiousnessAI), "enableUnconsiousnessAI"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(preventInstaDeath), "preventInstaDeath"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(bleedingCoefficient), "bleedingCoefficient"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(painCoefficient), "painCoefficient"] call EFUNC(common,readSettingFromModule);
|
||||
|
@ -46,8 +46,11 @@ if (_unit == ACE_player) then {
|
||||
};
|
||||
|
||||
// if we have unconsciousness for AI disabled, we will kill the unit instead
|
||||
if (!([_unit] call EFUNC(common,IsPlayer)) && (GVAR(enableUnsconsiousnessAI) == 0 || (GVAR(enableUnsconsiousnessAI) == 2 && random(1) <= 0.5))) exitwith {
|
||||
[_unit, true] call FUNC(setDead); // force, to avoid getting into a loop in case revive is enabled.
|
||||
if !([_unit] call EFUNC(common,isPlayer)) then {
|
||||
_enableUncon = _unit getVariable [QGVAR(enableUnconsciousnessAI), GVAR(enableUnconsciousnessAI)];
|
||||
if (_enableUncon == 0 or {_enableUncon == 1 and (random 1) < 0.5}) exitWith {
|
||||
[_unit, true] call FUNC(setDead);
|
||||
};
|
||||
};
|
||||
|
||||
// If a unit has the launcher out, it will sometimes start selecting the primairy weapon while unconscious,
|
||||
|
Loading…
Reference in New Issue
Block a user