Vehicle Damage - Add API to prevent AI from dismounting from immobile vehicles (#9990)

* Add API to prevent AI from dismounting from immobile vehicles

* Update vehicledamage-framework.md
This commit is contained in:
johnb432 2024-06-01 18:55:56 +02:00 committed by GitHub
parent 99bb6983bb
commit 60eabda47e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -18,6 +18,8 @@
params ["_vehicle"]; params ["_vehicle"];
TRACE_2("abandon",_vehicle,(crew _vehicle) select {alive _x}); TRACE_2("abandon",_vehicle,(crew _vehicle) select {alive _x});
if (_vehicle getVariable [QGVAR(allowCrewInImmobile), false]) exitWith {}; // check for API
[{ [{
params ["_vehicle"]; params ["_vehicle"];
_vehicle allowCrewInImmobile false; _vehicle allowCrewInImmobile false;

View File

@ -126,3 +126,11 @@ Default ARMA config value. We assume that the warheads are vanilla strings, so o
- `TandemHEAT` - `TandemHEAT`
If no `ace_vehicle_damage_incendiary` defined, this value will be used to assume a default based on above table of common values (excluding `Incendiary Bullet` which is 0). If no `ace_vehicle_damage_incendiary` defined, this value will be used to assume a default based on above table of common values (excluding `Incendiary Bullet` which is 0).
## 3. Disabling crew bailing for individual vehicles
Crew bailing when their vehicle is disabled (immobile or can't shoot) can be disabled for a specific vehicle:
```
_vehicle setVariable ["ace_vehicle_damage_allowCrewInImmobile", true, true];
```