Page MenuHomeFeedback Tracker

AI stuck after disableAI "FSM" and enableAI "FSM"
Acknowledged, WishlistPublic

Description

The AI stuck after disable FMS and enable FSM {F26151}

Details

Legacy ID
584299349
Severity
None
Resolution
Open
Reproducibility
Always
Category
AI Control / Commanding
Steps To Reproduce

Download Test-Mission

1: Editor -> Load -> Play
2: after spawning let the AI Move to the MARKER
3: Wait until both AI-Units are DOWN.
4: Eliminate the three OPFOR Units (you are in GodMode)
5: Open Debug Console
6: Enter: p2 setVariable ["r3_unitIsDown", 0];
7: Enter: p3 setVariable ["r3_unitIsDown", 0];

Now you can see the units will do nothing. If not, reload and try a second time.

FIX:

8: Open initPlayerLocal.sqf
9: remove: disableAI "FSM" and enableAI "FSM"
10: try again.

With the FSM command the AI Stucked 4 of 5 trys
Without the FSM command the AI got not stucked 3 trys

Additional Information

I updated this post, because its not a problem by the formLeader i first intended.

Event Timeline

R34P3R edited Steps To Reproduce. (Show Details)Apr 20 2015, 3:39 AM
R34P3R edited Additional Information. (Show Details)
R34P3R set Category to AI Control / Commanding.
R34P3R set Reproducibility to Always.
R34P3R set Severity to None.
R34P3R set Resolution to Open.
R34P3R set Legacy ID to 584299349.May 8 2016, 11:58 AM
R34P3R edited a custom field.
Bohemia added a subscriber: R34P3R.Apr 20 2015, 3:39 AM

Hey and thank you for the report!

Could you please create and attach a repro mission for it?

I wasn't able to reproduce it. Tried sending a group of units from my squad away (by giving that order, the first one in this group automatically becomes a formLeader of the group) and the group was always able to regroup on me (by Return to formation command the formLeader switches back to the squad leader).

Hey oukej, i tryed to reproduce this and found the issue in my revive script where i called: _unit doFollow (leader _group); It seems that the unit will now get a new formLeader. I removed this line now.

ruebe added a subscriber: ruebe.May 8 2016, 11:58 AM
ruebe added a comment.Apr 20 2015, 1:00 PM

...hang on, not so fast! ;)

I'm currently (as of new/latest devel) also experiencing stuck AI-leader. And I'm pretty sure I've issued a:

  (units _group) commandFollow (leader _group);

...(preceeded by a commandStop) at some point earlier to my AI leader that is getting "stuck" (he doesn't follow/respect his current, and not finished yet, MOVE waypoint any longer and just stands there, with the rest of the squad...).

For now I've assumed that the problem is probably on my side, but I'll check if I can come up with a quick and simple repro-mission to get the leader stuck in this way.

oukej added a comment.Apr 20 2015, 1:15 PM

Hanging on :)

an idea - could you have switched groups of the units between the orders?

Yeah.. i need to remove my Medic from the group, otherwise he will not moving in firefight. After revive i let him join back my group and used the dofollow command.

Its also bad that: if you rejoin the unit to the group, he will not get the Behaviour and CombatMode from the group. So you need to set it by yourself.

ruebe added a comment.Apr 20 2015, 5:20 PM

Just to let you guys know: I've just tried to reproduce my stuck leader (as described above), but haven't managed to..., so I guess I did indeed something stupid, and things are working fine; at least from what I can tell so far.

Carry on! :)

i still got stucked AI units... im trying to reproduce this night.

Ok, i think i got it.

Seems to be a problem with: disableAI "FSM" and enableAI "FSM"

@oukej

i uploaded a test-mission for you.

how to:

1: Editor -> Load -> Play
2: after spawning let the AI Move to the MARKER
3: Wait until both AI-Units are DOWN.
4: Eliminate the three OPFOR Units (you are in GodMode)
5: Open Debug Console
6: Enter: p2 setVariable ["r3_unitIsDown", 0];
7: Enter: p3 setVariable ["r3_unitIsDown", 0];

Now you can see the units will do nothing. If not, reload and try a second time.

FIX:

8: Open initPlayerLocal.sqf
9: remove: disableAI "FSM" and enableAI "FSM"
10: try again.

With the FSM command the AI Stucked 4 of 5 trys
Without the FSM command the AI got not stucked 3 trys

Post updated.

oukej added a comment.Apr 23 2015, 1:24 PM

Thanks for the repro

Roach added a subscriber: Roach.May 8 2016, 11:58 AM
Roach added a comment.Oct 27 2015, 9:34 AM

I got some similar problem. I'm using the same command to get units to assault and charge a position instead of just going prone and taking their time. It works well sometimes, and sometimes the units will actually get stuck in prone position and not follow their waypoints, only moving to engage the enemy and once the enemy is dead, they get stuck again.