It would be so much simpler to just do this:
Trigger:
- Add Gold
- Events
- Time - Every 1.00 seconds of game time
- Conditions
- Actions
- Player Group - Pick every player in (All players) and do (Actions)
- Loop - Actions
- Set TempUnitGroup = (Units owned by (Picked player) of type Tent)
- For each (Integer A) from 1 to (Number of units in TempUnitGroup), do (Actions)
- Loop - Actions
- Player - Add 1 to (Picked player) Current gold
- Custom script: call DestroyGroup(udg_TempUnitGroup)
Why doesn't this work for me?
This generates 10 gold per second (Because I put Integer A from 1 to 10, I'll fix this to1)
BUT it adds 10 gold even though the player doesn't have a tent.