-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add override capability to fnc_taskAttack #356
Add override capability to fnc_taskAttack #356
Conversation
@@ -31,4 +31,6 @@ params ["_group","_position", ["_radius",0]]; | |||
_group = _group call CBA_fnc_getGroup; | |||
if !(local _group) exitWith {}; // Don't create waypoints on each machine | |||
|
|||
[_group] call CBA_fnc_clearWaypoints; // Clear existing waypoints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment should explain why a piece of code does what it does. Ie a very brief summary of what you wrote in the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little confused. Is that not what I did at the end with " // Clear existing waypoints" ? Should it be on top instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Clear existing waypoints
tells the reader what the line does, not why it is being done. (and it feels a bit redundant, since the name of the function being called hints at that).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Thanks for the clarification!
This should be optional so as to not change how the function behaves for existing uses of it. (Keep backwards compatibility) |
Late to the party, but it should be noted that any AI function used after taskDefend probably won't work 100% as expected due to the use of Now that CBA is supporting 1.62 I'll change that to |
When playing around with the attack, defend, and patrol functions I noticed that if the group was already set to either patrol or defend that their behavior would change but not move or change course. Probably not needed often, but still nice to have the capability of redirecting the group.