You know the type, a trigger that gives you money each few seconds. I want one like in tree tag, so if I have certain buildings, I get more gold. Like, if I have 3 farms, and each farm gives an extra 2 gold per interval, then I get 6 more gold per interval. Can't find a tutorial on this.
event: every 2 seconds action: pick every unit in (all units of type "rssource hall") an do add (200 Gold) to (owner of (picked unit)) gold add (50 Gold) to (owner of (picked unit)) lumber
here u go ^^ (quite easy version but could lagg if periodic time is too low)
Events
Time - Every (X) Seconds
Conditions
Actions
Pick every unit in (Units of Type (Farm)) and do (Actions)
Actions
Add (X) gold to (Owner of (Picked Unit))
You'll have to modify the (X)'s to your liking, but that's the general idea. If you want it leak free, then do
Events
Time - Every (X) Seconds
Conditions
Actions
Set (VARIABLE_UNIT_GROUP)= (Units of Type (Farm))
Pick every unit in (VARIABLE_UNIT_GROUP) and do (Actions)
Actions
Add (X) gold to (Owner of (Picked Unit))
Custom script: call DestroyGroup(VARIABLE_UNIT_GROUP)
Events
Time - Every (X) Seconds
Conditions
Actions
Pick every unit in (Units of Type (Farm)) and do (Actions)
Actions
Add (X) gold to (Owner of (Picked Unit))
You'll have to modify the (X)'s to your liking, but that's the general idea. If you want it leak free, then do
Events
Time - Every (X) Seconds
Conditions
Actions
Set (VARIABLE_UNIT_GROUP)= (Units of Type (Farm))
Pick every unit in (VARIABLE_UNIT_GROUP) and do (Actions)
Actions
Add (X) gold to (Owner of (Picked Unit))
Custom script: call DestroyGroup(VARIABLE_UNIT_GROUP)
--donut3.5--
ehm... nearly the same as i posted... and if u gonna destroy the variable, can u still use it? rally?
Events
Time - Every (X) Seconds
Conditions
Actions
Pick every unit in (Units of Type (Farm)) and do (Actions)
Actions
Add (X) gold to (Owner of (Picked Unit))
You'll have to modify the (X)'s to your liking, but that's the general idea. If you want it leak free, then do
Events
Time - Every (X) Seconds
Conditions
Actions
Set (VARIABLE_UNIT_GROUP)= (Units of Type (Farm))
Pick every unit in (VARIABLE_UNIT_GROUP) and do (Actions)
Actions
Add (X) gold to (Owner of (Picked Unit))
Custom script: call DestroyGroup(VARIABLE_UNIT_GROUP)
--donut3.5--
ehm... nearly the same as i posted... and if u gonna destroy the variable, can u still use it? rally?
mass trigger leak will kill him ^_^
he will need at least 2(3) triggers 1 for condtructing(add group) 1 for destroying\upgrading (remove from group) 1 for income (use group)
That would be a negatory. You can fit the entire deleak into one trigger by simply mushing the three you stated into one. This way, it sets the group, then runs the trigger, then destroys the group while saving map filesize. Not to mention being less complicated --donut3.5--