ALiVEOS / ALiVE.OS

ALiVE Open Source GPL v2
http://alivemod.com/
Other
157 stars 80 forks source link

Mechanized/Armored units don't move after materializing #720

Closed MaxShadow09 closed 3 years ago

MaxShadow09 commented 4 years ago

Prerequisites

Description

Every time I request mechanized/armored units from the Player Combat Logistics module, I can see the virtual profiles moving towards the drop point. However, as soon as I get close and they materialize, they stop moving. I see it spawns a vehicle and some infantry, then it moves the infantry into the vehicle, and then it just stands there, doing nothing. The vehicle has fuel. If I open Zeus, I can see the vehicle has a move waypoint assigned, but the AI doesn't want to follow it. If I give them another move order, they obey. Reaching the destination makes ALiVE think they fulfilled the combat logistics request.

I'm using the ALiVE development version (Steam Workshop)

Steps to Reproduce

  1. Open editor
  2. Place the required ALiVE modules
  3. Place an AI Commander for BLUFOR, one MIL PLACEMENT (Civ), one MIL PLACEMENT (Mil), one LOGISTICS, one COMBAT LOGISTICS.
  4. Start the map in SP or MP. It makes no difference.
  5. Open the Combat Logistics terminal, and request a group of mechanized infantry anywhere on the map. Other settings I used: Convoy, Join player group on arrival.
  6. Get close enough to the virtual profile to make it materialize.

Expected behavior: The unit spawns, moving towards the drop point.

Actual behavior: The unit spawns, with a move waypoint, but doesn't move.

20200701211125_1

testAlive.Altis.zip

Arma3_x64_2020-07-01_21-47-51.zip

MaxShadow09 commented 4 years ago

The fact that the AI follows any order given after it successfully spawned makes me think that maybe they are not following the original order because it was given before the driver was inside the vehicle. Maybe this could be fixed by reissuing the same order after the entire crew is inside the vehicle?

MaxShadow09 commented 4 years ago

I think I've found the problem. It doesn't happen only with Combat Logistics, but any mechanized/armored unit in the game.

The problem seems to be related to the order in which move waypoints are created. If they are created BEFORE the entire crew has spawned and is inside the vehicle, then they will get stuck. If the waypoints are created AFTER the entire crew is ready, they will follow the waypoints correctly.

Adding a small delay (maybe 5-10 seconds) between spawning the units and creating the waypoints should solve this issue completely.