• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[AI] AI building problem

Status
Not open for further replies.
Level 19
Joined
Sep 4, 2007
Messages
2,826
Hello! The AI system here is supposed to make each time a worker is trained to build shelters at Shelter61, Shelter62 and Shelter63.
The problem is that after the first AI worker has built an building the second trained unit doesn't continue nor the third one. How matter I try to change the trigger they keep building the first one and stop... Any help please?
I'm only testing this trigger on 1 player at the moment and it seems to work fine till the AI computers begins to build.
  • Build Shelters2
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Owner of (Trained unit)) controller) Equal to Computer
          • ((Trained unit) is A peon-type unit) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AIBuildValue[(Player number of (Owner of (Trained unit)))] Equal to 1
        • Then - Actions
          • Set AIBuildingPlacement[AIBuildValue[(Player number of (Owner of (Trained unit)))]] = Shelter61 <gen>
          • Set AIBuildingQueue[AIBuildValue[(Player number of (Owner of (Trained unit)))]] = |Cffff0000Shelter
          • Unit - Order (Trained unit) to build a AIBuildingQueue[(Player number of (Owner of (Trained unit)))] at (Center of AIBuildingPlacement[AIBuildValue[(Player number of (Owner of (Trained unit)))]])
          • Set AIBuildValue[(Player number of (Owner of (Trained unit)))] = (AIBuildValue[(Player number of (Owner of (Trained unit)))] + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AIBuildValue[(Player number of (Owner of (Trained unit)))] Equal to 2
        • Then - Actions
          • Set AIBuildingPlacement[AIBuildValue[(Player number of (Owner of (Trained unit)))]] = Shelter62 <gen>
          • Set AIBuildingQueue[AIBuildValue[(Player number of (Owner of (Trained unit)))]] = |Cffff0000Shelter
          • Unit - Order (Trained unit) to build a AIBuildingQueue[(Player number of (Owner of (Trained unit)))] at (Center of AIBuildingPlacement[AIBuildValue[(Player number of (Owner of (Trained unit)))]])
          • Set AIBuildValue[(Player number of (Owner of (Trained unit)))] = (AIBuildValue[(Player number of (Owner of (Trained unit)))] + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AIBuildValue[(Player number of (Owner of (Trained unit)))] Equal to 2
        • Then - Actions
          • Set AIBuildingPlacement[AIBuildValue[(Player number of (Owner of (Trained unit)))]] = Shelter63 <gen>
          • Set AIBuildingQueue[AIBuildValue[(Player number of (Owner of (Trained unit)))]] = |Cffff0000Shelter
          • Unit - Order (Trained unit) to build a AIBuildingQueue[(Player number of (Owner of (Trained unit)))] at (Center of AIBuildingPlacement[AIBuildValue[(Player number of (Owner of (Trained unit)))]])
          • Set AIBuildValue[(Player number of (Owner of (Trained unit)))] = (AIBuildValue[(Player number of (Owner of (Trained unit)))] + 1)
        • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top