Hello i have a trigger that adds gold by amount of maxium mana of building that has abillity called: "Gold Income" to player.
Everything is fine except one. Gold is increased immediately when worker being construction.
Is there a way to add condition that will check if building is already constructed?
Sorry for mistakes in this trigger i manually translated it to english.
Everything is fine except one. Gold is increased immediately when worker being construction.
Is there a way to add condition that will check if building is already constructed?
Sorry for mistakes in this trigger i manually translated it to english.
-
Income
-
Events
- time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
players group - Pick every player in playerGroup and do (Actions)
-
Loop - Actions
- Set tempUnitGroup = (Units owned by (Picked player) matching (((Matching unit) is Building) equal YES))
-
units group - Pick every unit in tempUnitGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Gold Income for (Picked unit)) larger than 0
- ((Picked unit) is alive) equal YES
-
Then - Actions
- Set TempInt = (Integer((Maximum mana of (Picked unit))))
- Set TempLoc = (Position of (Picked unit))
- Player - Add TempInt to (Picked player) Actual gold amount
- Text - Create floating text that reads (+ + (String(TempInt))) at TempLoc with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 0.00%), and 30.00% transparency
- Floating Text - Change (Last created floating text): turn off permanence
- Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
- Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
- Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
- Custom script: call RemoveLocation(udg_TempLoc)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call DestroyGroup(udg_tempUnitGroup)
-
Loop - Actions
-
players group - Pick every player in playerGroup and do (Actions)
-
Events
Last edited: