Skip to content

AI can't fire mortars when ammo handling is enabled #6173

@Cyruz143

Description

@Cyruz143

Arma 3 Version: 1.80 (stable)
CBA Version: 3.6.0 (stable)
ACE3 Version: 3.12.1 (stable)

Mods:

- CBA_A3
- ace

Description:

  • In the CBA settings having force force ace_mk6mortar_useAmmoHandling = true; breaks AI using mortars.

Steps to reproduce:

test_mortar_fnc = {
    params ["_unit","_target"]
    private _mortar = vehicle _unit;

    if (_target inRangeOfArtillery [[_unit], "8Rnd_82mm_Mo_shells"] ) then {
        _mortar setVehicleAmmoDef 1;
        _mortar setVehicleAmmo 1;
        _unit doArtilleryFire [_target, "8Rnd_82mm_Mo_shells", 3];
        diag_log format ["MORTARS -- %1 firing at %2", _unit, _target];
        systemChat format ["MORTARS -- %1 firing at %2", _unit, _target];
        uiSleep 15;
    } else {
        diag_log format ["MORTARS -- %2 out of range of %1", _unit, _target];
        systemChat format ["MORTARS -- %2 out of range of %1", _unit, _target];
        uiSleep 15;
    };
};

[mortarGunner, getMarkerPos "testTarget"] spawn test_mortar_fnc;

Drop that in init.sqf, place a vanilla unit named mortarGunner on a vanilla mortar and put a marker down called testTarget.

Where did the issue occur?

  • Editor (Singleplayer)

CBA Settings:

Was previously set to force force ace_mk6mortar_useAmmoHandling = true;

RPT log file:

  • Doesn't log anything other than the logging I've provided in the test function.

Workaround

  • Changed CBA setting to force ace_mk6mortar_useAmmoHandling = true; and in the mission file itself I created a cba_settings.sqf with force ace_mk6mortar_useAmmoHandling = false;. Although this means players can't use the feature when AI need to use mortars so it's not great.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions