This is my trigger:
I want the AI to build the desired building, only when it has enough money, not to random every 10 seconds. So I want the AI to choose a type of building and wait for enough money to build it, and carry out the order.
I would like it if someone could edit the trigger as how it should be, I will be able to replicate it then.
Thanks
Trigger:
- AI
- Events
- Time - Every 10.00 seconds of game time
- Conditions
- Actions
- Set Building[1] = Dryad Spawner
- Set Building[2] = Druid Secreter
- Set Building[3] = Treant Harvester
- Set Building[4] = Light Archer Base
- Set Building[5] = Light Infantry Base
- Set Building[6] = Light Cavalry Base
- Set Building[7] = Ultimate Golem
- Set Temp_Group = (Units in Red Zone <gen> matching ((((Owner of (Matching unit)) is an ally of Player 1 (Red)) Equal to True) and (((Owner of (Matching unit)) controller) Equal to Computer)))
- Unit Group - Pick every unit in Temp_Group and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Current order of (Picked unit)) Equal to (Order(<Empty String>))
- Then - Actions
- Set Temp_Point = (Random point in Red Zone <gen>)
- Unit - Order (Picked unit) to build a Building[(Random integer number between 1 and 7)] at Temp_Point
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Events
I want the AI to build the desired building, only when it has enough money, not to random every 10 seconds. So I want the AI to choose a type of building and wait for enough money to build it, and carry out the order.
I would like it if someone could edit the trigger as how it should be, I will be able to replicate it then.
Thanks