Right... I'm trying to make an AI (and failing).
I'm in the situation where the AI build a Plantation (that produces food (that's the new lumber)) before they build a Mine (that produces gold).
Thing is. The first two buildings that any player MUST build first in order to continue playing the game would be a Town Center and then a Mine otherwise they have no gold for anything else. I'm really confused as to why they do it.... I'd really like some help.. XD
Here are my two triggers:
*EDIT"
My AI is needed to be usable by 3 players (max) at once. So I'm not able to be player specific.
I'm in the situation where the AI build a Plantation (that produces food (that's the new lumber)) before they build a Mine (that produces gold).
Thing is. The first two buildings that any player MUST build first in order to continue playing the game would be a Town Center and then a Mine otherwise they have no gold for anything else. I'm really confused as to why they do it.... I'd really like some help.. XD
Here are my two triggers:
-
Build Mine
-
Events
- Time - Every 8.00 seconds of game time
- Conditions
-
Actions
-
Player Group - Pick every player in (All players controlled by a Computer player) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked player) Current gold) Greater than or equal to 1200
-
Then - Actions
- Set Build_Order_Worker_Villager = (Random unit from (Units owned by (Picked player) of type Villager))
- Set Build_Order_Building_Group = (Units owned by (Picked player) matching (((Matching unit) is A structure) Equal to True))
- Set Build_Order_Position = ((Position of (Random unit from Build_Order_Building_Group)) offset by (Random real number between 500.00 and 1000.00) towards (Random real number between 0.00 and 359.99) degrees)
- Set Build_Order_Limit_01 = (Number of units in (Units owned by (Picked player) of type Mine))
- Set Build_Order_Limit_02 = (Number of units in Build_Order_Building_Group)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Build_Order_Limit_01 Equal to 0
-
Then - Actions
- Unit - Order Build_Order_Worker_Villager to build a Mine at Build_Order_Position
- Trigger - Turn on Build Academy <gen>
- Trigger - Turn on Build Arcane Sanctum <gen>
- Trigger - Turn on Build Archery <gen>
- Trigger - Turn on Build Armory <gen>
- Trigger - Turn on Build Barracks <gen>
- Trigger - Turn on Build Castle <gen>
- Trigger - Turn on Build Church <gen>
- Trigger - Turn on Build Farm <gen>
- Trigger - Turn on Build Guard Tower <gen>
- Trigger - Turn on Build Mine <gen>
- Trigger - Turn on Build Plantation <gen>
- Trigger - Turn on Build Stables <gen>
- Trigger - Turn on Build Watch Tower <gen>
- Trigger - Turn on Build Workshop <gen>
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Build_Order_Limit_01 x 6) Less than Build_Order_Limit_02
-
Then - Actions
- Unit - Order Build_Order_Worker_Villager to build a Mine at Build_Order_Position
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Player Group - Pick every player in (All players controlled by a Computer player) and do (Actions)
-
Events
-
Build Plantation
-
Events
- Time - Every 8.00 seconds of game time
- Conditions
-
Actions
- Wait 1.00 seconds
-
Player Group - Pick every player in (All players controlled by a Computer player) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked player) Current gold) Greater than or equal to 350
-
Then - Actions
- Set Build_Order_Worker_Villager = (Random unit from (Units owned by (Picked player) of type Villager))
- Set Build_Order_Building_Group = (Units owned by (Picked player) matching (((Matching unit) is A structure) Equal to True))
- Set Build_Order_Position = ((Position of (Random unit from Build_Order_Building_Group)) offset by (Random real number between 500.00 and 1000.00) towards (Random real number between 0.00 and 359.99) degrees)
- Set Build_Order_Limit_01 = (Number of units in (Units owned by (Picked player) of type Plantation))
- Set Build_Order_Limit_02 = ((Picked player) Food cap)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Build_Order_Limit_01 x 30) Less than Build_Order_Limit_02
-
Then - Actions
- Unit - Order Build_Order_Worker_Villager to build a Plantation at Build_Order_Position
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
*EDIT"
My AI is needed to be usable by 3 players (max) at once. So I'm not able to be player specific.
Last edited: