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

Attack Module Override enables AI pathing #1243

Closed
wants to merge 2 commits into from

Conversation

AnthonyPoschen
Copy link
Contributor

Issue: when a group is set to defend with a high percentage of "hold" and a trigger activates a sync'd attack module which wants all units on defend to attack a location the behaviour currently is that all units will have the new waypoint and all units with pathing disabled because of "holding" will stand still which presents a inflexible scenario without custom logic elements to enable good timing of releasing "waves" of units as a Zeus.

Proposal: Enable the override parameter to re enable pathing so it can override any blocking previous command given to the unit such as the "defend module's hold". This should make that option act more as expected by overriding previous orders and allow more dynamic options for mission makers.

Issue: when a group is set to defend with a high percentage of "hold" and a trigger activates a sync'd attack module which wants all units on defend to attack a location the behaviour currently is that all units will have the new waypoint and all units with pathing disabled because of "holding" will stand still which presents a inflexible scenario without custom logic elements to enable good timing of releasing "waves" of units as a Zeus.

Proposal: Enable the override parameter to re enable pathing so it can override any blocking previous command given to the unit such as the "defend module's hold". This should make that option act more as expected by overriding previous orders and allow more dynamic options for mission makers.
@commy2
Copy link
Contributor

commy2 commented Oct 19, 2019

when a group is set to defend with a high percentage of "hold" and a trigger activates a sync'd attack module which wants all units on defend to attack a location the behaviour currently is that all units will have the new waypoint and all units with pathing disabled because of "holding" will stand still

To clarify why this fix is specifically about PATH and not MOVE or AUTOTARGET etc, @zanven42 is refering to this line:
https://github.com/CBATeam/CBA_A3/blob/master/addons/ai/fnc_taskDefend.sqf#L110

                    if (random 1 < _hold) then {
                        _unit disableAI "PATH";
                    } else {
                        doStop _unit;
                    };

Basically taskAttack and taskDefend should play nice together.

The Attack module forwards to the task function, but that place probably also needs some fix, because currently it does not use the _override flag:
https://github.com/CBATeam/CBA_A3/blob/master/addons/modules/fnc_moduleAttack.sqf

Question is, should PATH not also be reenabled for taskPatrol, taskSearchArea and taskDefend itself?
https://github.com/CBATeam/CBA_A3/blob/master/addons/ai/fnc_taskDefend.sqf#L55
https://github.com/CBATeam/CBA_A3/blob/master/addons/ai/fnc_taskPatrol.sqf#L51
https://github.com/CBATeam/CBA_A3/blob/master/addons/ai/fnc_taskSearchArea.sqf#L56

Co-Authored-By: commy2 <commy-2@gmx.de>
@AnthonyPoschen
Copy link
Contributor Author

yeah it probably should, i only encountered the issue a few hours before this PR as i am only using the Defend and attack modules intensely for a mission i am making and wanted them to play nice.

Another question is should override be required to take people off defend onto the other tasks. I lean towards not required but to be safe i added it to the override section to maintain backwards expectations.

@commy2
Copy link
Contributor

commy2 commented Oct 23, 2019

I agree. Overwrite should not be required, or at least be the default behavior. The other task functions should re-enable PATH at the points where they clear the waypoints.

@commy2 commy2 added this to the 3.13 milestone Oct 23, 2019
@commy2
Copy link
Contributor

commy2 commented Nov 14, 2019

State? Or you want me to finish it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants