-
Notifications
You must be signed in to change notification settings - Fork 42
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 group settings for Attack, Reinforce and Dynamic Reinforcement #441
base: master
Are you sure you want to change the base?
Conversation
Adds universal group settings for Attack, Flight and Dynamic reinforcement Disabling 'enableattack' on groups has the benefit of giving us more control of group actions (less running away doing random shit). The cost is that the AI will conduct fewer innate flanking attacks.
@@ -108,6 +108,70 @@ _curCat = LSTRING(Settings_GeneralCat); | |||
1 | |||
] call CBA_fnc_addSetting; | |||
|
|||
addMissionEventHandler ["GroupCreated", { |
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.
This should probably be in the EventHandlers pbo
[ | ||
{ | ||
if (count (units _this) > 0) then { | ||
if (GVAR(autoAddDynamicReinforcement)) then {_this setVariable [QGVAR(enableGroupReinforce), true, true];}; |
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 think we maybe should split this up into a more logical system. why should we, for example, wait when all 3 settings are disabled?
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.
It's a 3-second wait before executing (waitAndExecute
) instead of waiting until all 3 are enabled (waitUntilAndExecute
), but that's still a good point.
@@ -10,7 +10,7 @@ Here four buttons are added: | |||
These functions and buttons could conceivably be moved to their own module. | |||
They might also benefit from added interface and more nuanced functions handling. | |||
That said: within the current scope of the AI mod. They can make a comfortable | |||
home here. Until revisited by more capable personnell. | |||
home here. Until revisited by more capable personell. |
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.
As far as I can find, the former personnell
was closer, should just drop the extra trailing l
. Still, I'd go with people
instead, since seemingly personnel
is people working in a company:
home here. Until revisited by more capable personell. | |
home here. Until revisited by more capable people. |
[ | ||
{ | ||
if (count (units _this) > 0) then { | ||
if (GVAR(autoAddDynamicReinforcement)) then {_this setVariable [QGVAR(enableGroupReinforce), true, true];}; |
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.
It's a 3-second wait before executing (waitAndExecute
) instead of waiting until all 3 are enabled (waitUntilAndExecute
), but that's still a good point.
params ["_group"]; | ||
[ | ||
{ | ||
if (count (units _this) > 0) then { |
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.
if (count (units _this) > 0) then { | |
if (units _this isNotEqualTo []) then { |
|
||
// auto disable allowFleeing on groups | ||
[ | ||
QGVAR(disableFleeingOverride), |
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.
This and the next setting need a XEH initPost eventhandler instead. People spawn in units all the time, which will not get caught by this.
Adds universal group settings for Attack, Flight and Dynamic reinforcement
Disabling 'enableAttack' on groups has the benefit of giving us more control of group actions (less running away doing random shit). The cost is that the AI will conduct fewer unit level flanking attacks.