• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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