- Joined
- Sep 4, 2007
- Messages
- 2,826
Doesn't seem like I'm getting help from the AI section so I'll try here.
Hello! I'm currently trying to implement an AI for my version Dawn of New Empires v1.16. 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 like all the previous AI triggers work fine till the AI begins to build the second building.
I might change to offset but that has to wait till I've figured this out.
Hello! I'm currently trying to implement an AI for my version Dawn of New Empires v1.16. 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 like all the previous AI triggers work fine till the AI begins to build the second building.
I might change to offset but that has to wait till I've figured this out.
-
Build Shelters
-
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
-
Conditions
-
And - All (Conditions) are 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 - Conditions
-
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 - Conditions
-
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
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Last edited: