Page MenuHomeFeedback Tracker

Script commands doMove and commandMove cannot reliably move AI units to some building positions
Assigned, WishlistPublic

Description

During gameplay, the player can order subordinate AI units to move to building positions by selecting the unit, then clicking MMB over the desired building position.

Similar behaviour can generally be scripted using the commandMove and doMove commands.

OBS:
There are some building positions that AI can successfully move to when ordered to by the player, but cannot be reached by scripted AI.

EXP:
When ordered by script commands, AI should be able to reach all building positions they can reach successfully when commanded to do so by the player.

Details

Legacy ID
1894250708
Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Scripting
Steps To Reproduce

Added repro mission "27569_AiCantDoMoveInside1.Altis".

The issue seems to be location specific, rather than building model specific as results vary for different instances of the same building.

Repro:

Open mission in 2D mission editor.
Preview mission.
Select unit 2 (F2).
Point mouse at position 7 of the building in front of the player (the right edge of the balcony). See screenshot "CEEB_orderPosition.jpg".
Press Middle mouse button to order unit 2 to move to that position.
Watch the unit successfully reach the position. Note the on screen hint showing the unit's expected destination isEqual to the return of the building pos. When the AI arrives, he reports "ready" or "standing by".
Restart mission (or just order the unit to return to the street next to you).
Use the custom action to order the unit to attempt to commandMove to the position. Again, the unit's expected destination isEqual to the return of the building pos.
Watch the AI unit move to the ground level underneath the actual position, then stop. Note the AI reports "ready" or "standing by" and the return value of moveToFailed remains false.
10 (Optional). Order AI to the intended position again with F2 + MMB. Watch them succeed.

This repro is one of many examples that are found using the "AI_VS_Buildings_R1.Altis" test mission I added to #4553. Script AI fail to reach the destination, but player can successfully order his subordinate units to move to the same position.
I have not investigated using waypoints to achieve the same result.

Additional Information

Event Timeline

ceeeb edited Steps To Reproduce. (Show Details)Jan 26 2016, 3:02 AM
ceeeb edited Additional Information. (Show Details)
ceeeb set Category to Scripting.
ceeeb set Reproducibility to Always.
ceeeb set Severity to None.
ceeeb set Resolution to Open.
ceeeb set Legacy ID to 1894250708.May 8 2016, 1:34 PM

Hello,

thank you for the feedback. Once you have the repro mission, please attach it and let us know, we will look into it.

Thank you

I attached a few examples where the AI cannot reach a few locations, whether they are scripted to or commanded to. The player can reach the locations though.

[BarracksNewPositions.Altis]

Summary: Units cannot move up the stairs to positions on the top floor, but they can move downstairs if they are up at the top to start.

One unit is given a move waypoint placed on the building with location 15 selected. This unit will never reach that location. Command your subordinate to reach that location and he will fail too. Walk upstairs near the unit that is already up there and he will join your group. Watch him move downstairs with no problem.

[UnfinishedBuildingPositions.Altis]

Summary: Units cannot reach any location inside this building.

One group is given a waypoint placed on the building with location 4 selected. They cannot reach this location. The player's subordinate when commanded, can only *occasionally* enter the building.

Added repro mission "27569_AiCantDoMoveInside1.Altis".

The issue seems to be location specific, rather than building model specific as results vary for different instances of the same building.

Repro:

  1. Open mission in 2D mission editor.
  2. Preview mission.
  3. Select unit 2 (F2).
  4. Point mouse at position 7 of the building in front of the player (the right edge of the balcony). See screenshot "CEEB_orderPosition.jpg".
  5. Press Middle mouse button to order unit 2 to move to that position.
  6. Watch the unit successfully reach the position. Note the on screen hint showing the unit's expected destination isEqual to the return of the building pos. When the AI arrives, he reports "ready" or "standing by".
  7. Restart mission (or just order the unit to return to the street next to you).
  8. Use the custom action to order the unit to attempt to commandMove to the position. Again, the unit's expected destination isEqual to the return of the building pos.
  9. Watch the AI unit move to the ground level underneath the actual position, then stop. Note the AI reports "ready" or "standing by" and the return value of moveToFailed remains false.

10 (Optional). Order AI to the intended position again with F2 + MMB. Watch them succeed.

This repro is one of many examples that are found using the "AI_VS_Buildings_R1.Altis" test mission I added to #4553. Script AI fail to reach the destination, but player can successfully order his subordinate units to move to the same position.
I have not investigated using waypoints to achieve the same result.

ceeeb added a comment.Jun 21 2016, 1:09 AM

This issue is significant for Tanoa, where many buildings have raised floors built on wooden stilts.
When attempting to script AI to move to defined building positions, they incorrectly attempt to move to the point on the ground beneath the defined building position.
To do this, they crawl under the building, then stand up. This typically puts AIs upper body inside the house, with legs beneath the floor (clipping though the floor), which can result in AI getting stuck.

I confirm that these things happen randomly, I have not yet found any 'pattern' so to speak, but if it happens it is 100% consistent with the building, you just can't get the AI to move upstairs. is there a problem with the 'entry lod' to the building? As C222b reported, the units navigate like they were trying to access an ATLpos in open ground, ignoring the Z value.

One type of building that seems to be particularly prone to this is:

"Land_Unfinished_Building_01_F"
"Land_Unfinished_Building_02_F"

Which could be a coincedence, but it stuck out to me thus far.

Fixing this would be awesome!

ceeeb updated the task description. (Show Details)Sep 26 2017, 2:26 PM
ceeeb edited Steps To Reproduce. (Show Details)
ceeeb edited Additional Information. (Show Details)
ceeeb set Operating System to Windows 7.
ruebe added a subscriber: ruebe.Mar 26 2018, 12:44 AM

Just wanted to confirm we also see this issue. It results in around half of the units being unable to path find properly. It doesn't seem to be dependent on the distance moved or the building and its position. The impact is random. What I do know is that the AI will not move with repeated calls to doMove, they will if stuck forever be stuck and unable to get to that position from there current position. This has not been fixed in recent releases.

I hope this is fixed before development of Arma 3 is completely stopped.

ohmlet added a subscriber: ohmlet.Mar 20 2019, 1:24 PM

Since version 1.90 all commands related to addWaypoint not working as intended after initial 2-15 iterations. Aditional waypoints are not generated or AI stopping movement before reaching current waypoint or stopping at waypoint.
It is not related to obstacles. It is happening in open field as well.
Tested on missions that used to work well (before update 1.90) - problem exist.
Tested on developement versions 1.9+ - problem exist.
Tested with mods altering AI behaviour as well as on vanila Arma 3 with no mods - problem exists in both cases.
After altered movement to _myUnit moveTo getPos _placeToGo; - problem still exist yet is much more difficult to spot.
I was trying to bypass this problem and after 2 weeks of work I found no solution.

razazel reassigned this task from razazel to Astaroth.Mar 20 2019, 4:20 PM
razazel added a subscriber: razazel.

@ohmlet
Hi,
could you please attach simple repromission with this issue?
Thank you.