Wargus / wargus

Importer and scripts for Warcraft II: Tides of Darkness, the expansion Beyond the Dark Portal, and Aleonas Tales
GNU General Public License v2.0
357 stars 55 forks source link

AI can't attack because the transport ship doesn't come back to the base. #353

Closed SimoneStarace closed 3 years ago

SimoneStarace commented 3 years ago

Bug Description I'm making my own custom maps in Wargus with custom A.I and triggers. One problem I had with my custom A.I is the attack with transports ships. Basically the A.I attacks with some soldiers and a transport ship. When the enemy attacks and I defeat their soldiers, the transport ship remains near the coast and doesn't come back to the base or shipyard.

How to Reproduce this bug Steps to reproduce the behavior:

  1. Just write the following code inside your custom A.I Script
    -- First attack
    function() return AiSleep(8500) end,
    function() return AiForce(1, {AiSoldier(), 2, AiTransporter(), 1}) end,
    function() return AiWaitForce(1) end,
    function() return AiAttackWithForce(1) end,
    -- Second attack
    function() return AiSleep(9000) end,
    function() return AiForce(1, {AiSoldier(), 3, AiTransporter(), 1}) end,
    function() return AiWaitForce(1) end,
    function() return AiAttackWithForce(1) end,

Expected behavior I simply want the transport ship to come back to get the next group of units. It doesn't matter if it remains to the coast of my base or comes back to the base what I want is in the next wave of units it should go back and pick up the next group.

Screenshots and Logs Here is an example of what it happens:

  1. The enemy attacked.
  2. I defeated their soldiers
  3. A new attack force is ready to attack
  4. They cannot attack because the previous ship is still near the coast of my base.
  5. Result of the previous steps plus destroying the ship Transport.gif
  6. The enemy build the new transport ship ONLY after I destroyed the current transport stucked near my base.

Desktop:

Erenussocrates commented 3 years ago

I vouch for this. This had been a recurring problem in the game for sometime now and makes some of the classic missions even easier than they should be.

timfel commented 3 years ago

Duplicate of https://github.com/Wargus/wargus/issues/183