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

CBA_fnc_taskDefend AI "Dance" #551

Closed
bsoWalker opened this issue Nov 21, 2016 · 13 comments
Closed

CBA_fnc_taskDefend AI "Dance" #551

bsoWalker opened this issue Nov 21, 2016 · 13 comments
Labels
Milestone

Comments

@bsoWalker
Copy link

Arma 3 Version: 1.64 (stable)
CBA Version: 3.1.2 (stable)

Mods:

  • @CBA_A3

Description:
CBA_fnc_taskDefend causing AI to "dance" when fortified in buildings.

https://www.youtube.com/watch?v=H5dgnWkk8Fw&

Steps to reproduce:
using "[this] call CBA_fnc_taskDefend" in group leader init or using the CBA modules

Where did the issue occur?
Happens on SP, Multi and dedicated server. New missions, old missions etc.

RPT log file:
http://pastebin.com/feStzbQb - RPT

@kymckay
Copy link
Contributor

kymckay commented Dec 18, 2016

So, using the zeus defend module in ACE (which calls this function) I tested this code out in our unit's weekly game last night. Could not reproducing the dancing effect, it must be due to some more specific circumstances.

@bsoWalker
Copy link
Author

As per the description this is just using the CBA mod, nothing to do with ACE zeus modules. Issue occurs when using a module synced to the group leader or putting the call in the group leaders init.

I can provide a test mission if required.

@commy2
Copy link
Contributor

commy2 commented Dec 20, 2016

Please do that.

@kymckay
Copy link
Contributor

kymckay commented Dec 20, 2016

Would be helpful (and to clarify, the ace zeus module was just a mechanism of calling the taskDefend function on a group leader during actual gameplay). I can't reproduce it in the editor either as you describe and figured trying it under actual game conditions was worth a shot.

@bsoWalker
Copy link
Author

Understood, I just know the first thing i would get asked if i was testing with ACE would be "what happens when testing without ACE" =]

Just to clarify even on the example mission, this seems to take place about 70% of the time.

I'm pretty sure some others manged to replicate this straight away with the same tests when i was chatting on the ACE Slack a couple weeks ago.

PSB

https://dl.dropboxusercontent.com/u/68881349/cbaDEFEND.Stratis.zip

@kymckay
Copy link
Contributor

kymckay commented Dec 23, 2016

Managed to narrow this down, it only seems to happen when they're in combat mode. Hopefully this isn't just an arma bug of disableAI "PATH" otherwise we might have to switch back to using doStop.

I'll do some testing with removal of the setUnitPos and stuff to see if that fixes it.

@kymckay
Copy link
Contributor

kymckay commented Dec 23, 2016

Yeah so after some testing, I think this is the result of the combination of disableAI "PATH" and setUnitPos "UP".

When the AI know a target is nearby, they try to position themselves accordingly. I think because they can't move to better cover, they try to change their stance to lower their profile and because they can't change their stance they get stuck in this little dance.

Will probably just change remove the use of setUnitPos (as much as finding AI prone inside building rooms isn't the greatest)

@kymckay
Copy link
Contributor

kymckay commented Dec 23, 2016

I'll comment it out with a note, should probably make an issue tracker entry since it seems like unintended behaviour when using those commands.

@abramsba
Copy link

abramsba commented Dec 26, 2016

To add some details to this, I'm also encountering this error but I'm not making use of ACE zeus nor am I making using zeus in my mission. I'm creating the groups dynamically and giving them a waypoint using cba_fnc_taskdefend.

So I start with an array of classes and I create a group from all of the unit classes in the array. I look for a building on the map to use as a center location.

_groups = [
 ["a", "b", "c"],
 ["d", "e", "f"]
];
_random_group = _groups call bis_fnc_selectrandom;
_group = creategroup independent;
{
	_pos = (getpos _building) findemptyposition[10, 100, _x];
	_unit = _group createunit [_x, _pos, [], 0, "NONE"];
} foreach _random_group;
_group setspeedmode "LIMITED";
_group setBehaviour "SAFE";
[_group, (getpos _building), 100, 2, true] call cba_fnc_taskdefend;

I've noticed this happens to units that spawn inside a building position or end up garrisoning in a position that happens to be in a building. They'll continue to raise and lower their weapon infinitely until engaged or you walk directly and closely into their line of sight.

@kymckay
Copy link
Contributor

kymckay commented Dec 26, 2016

Should be fixed in the next version of CBA with: #570

@commy2
Copy link
Contributor

commy2 commented Feb 17, 2017

PR is merged.

@Gonzalez89
Copy link

Gonzalez89 commented Apr 30, 2017

Hello , this might be related to this?!

https://www.youtube.com/watch?v=dnmqTBL8alc

One way to fix this is to make they duck and then go up again.

switchmove "" wont help you here also.

@commy2
Copy link
Contributor

commy2 commented May 1, 2017

Yes, same underlying issue.

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

No branches or pull requests

6 participants