Weird building upgrades?

chukky-jr

Member
Reaction score
15
Screen1.jpg

hi guys! anyone knows what causes building upgrades to 'finished' prematurely like the picture? the upgrade is done through triggers, here is the corresponding trigger.

Trigger:
  • TealAIMechanicsUpgrade0
    • Events
      • Player - Player 3 (Teal)'s Current lumber becomes Greater than or equal to 22.00
      • Player - Player 3 (Teal)'s Current gold becomes Greater than or equal to 22.00
    • Conditions
      • (Player 3 (Teal) controller) Equal to Computer
      • (Number of living Learning Unit units owned by Player 3 (Teal)) Equal to 1
      • (Player 3 (Teal) Current gold) Greater than or equal to 22
      • (Player 3 (Teal) Current lumber) Greater than or equal to 22
    • Actions
      • Set AIUnitGroup = (Units owned by Player 3 (Teal) of type Learning Unit)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in AIUnitGroup and do (Unit - Order (Picked unit) to train/upgrade to a Mechanic School)
      • Custom script: call DestroyGroup(udg_AIUnitGroup)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Floating Text - Create floating text that reads |cff36F5E2Survivor|... above Survivor 0013 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Set Text = (Last created floating text)
          • Floating Text - Change Text: Disable permanence
          • Floating Text - Set the velocity of Text to 30.00 towards 90.00 degrees
          • Floating Text - Change the fading age of Text to 1.50 seconds
          • Floating Text - Change the lifespan of Text to 3.00 seconds
          • Custom script: set udg_Text=null
        • Else - Actions
      • Trigger - Turn off TealAIMechanicsUpgrade0 <gen>
      • Trigger - Turn on TealAIMechanicsUpgrade1 <gen>


Trigger:
  • TealAITurretUpgrade
    • Events
      • Player - Player 3 (Teal)'s Current lumber becomes Greater than or equal to 15.00
      • Player - Player 3 (Teal)'s Current gold becomes Greater than or equal to 15.00
    • Conditions
      • (Player 3 (Teal) controller) Equal to Computer
      • (Number of living Turret Base units owned by Player 3 (Teal)) Greater than or equal to 1
    • Actions
      • Set AIUnitGroup = (Units owned by Player 3 (Teal) of type Turret Base)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in AIUnitGroup and do (Unit - Order (Picked unit) to train/upgrade to a Gun Tower)
      • Custom script: call DestroyGroup(udg_AIUnitGroup)


some things might be relevant :
- it usually happens when the AI number of gold/lumber is more(like more than 200 or 300) than the needed value, (if they have 20 gold and 20 lumber, it works usually fine, but when they have like 200 gold and 20 lumber, that 200 gold turns to 0 and lumber stays fine, but the upgrade fails)
- the upgrade needs 18 gold and 18 lumber.
- the game register the upgrade as complete, while the actual unit still retain the value of unupgraded unit and it becomes unable to do anything.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top