Skip to content

Commit

Permalink
Vehicle Damage - Add API to prevent AI from dismounting from immobile…
Browse files Browse the repository at this point in the history
… vehicles (acemod#9990)

* Add API to prevent AI from dismounting from immobile vehicles

* Update vehicledamage-framework.md
  • Loading branch information
johnb432 authored and blake8090 committed Aug 18, 2024
1 parent a6a2cf5 commit 9de9280
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/vehicle_damage/functions/fnc_abandon.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
params ["_vehicle"];
TRACE_2("abandon",_vehicle,(crew _vehicle) select {alive _x});

if (_vehicle getVariable [QGVAR(allowCrewInImmobile), false]) exitWith {}; // check for API

[{
params ["_vehicle"];
_vehicle allowCrewInImmobile false;
Expand Down
8 changes: 8 additions & 0 deletions docs/wiki/framework/vehicledamage-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,11 @@ Default ARMA config value. We assume that the warheads are vanilla strings, so o
- `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).

## 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];
```

0 comments on commit 9de9280

Please sign in to comment.