Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Is there a way to make a building that gives you plus 5 gold every 10 seconds (and give a little plus gold thing about it each time it makes the money)?
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Farm) and (((Matching unit) is alive) Equal to True))) and do (Actions)
Loop - Actions
Player - Add 10 to (Owner of (Picked unit)) Current gold
Floating Text - Create floating text that reads |cffffcc00+10|r above (Picked unit) with Z offset 0.00, using font size 10.00, color...
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable 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.50 seconds
^Adiktuz, you need to filter out dead units
One could also use a dynamic group instead of creating/destroying new ones.
Because I heard that units have their own "death bug", is it ?
Will not disappear instantly after dies, and therefore you should filter dead building away
Because I heard that units have their own "death bug", is it ?
Will not disappear instantly after dies, and therefore you should filter dead building away
Set variable base value to 10 then below all trigger actions increase it's value by some amount (1 for example, x = x + 1), don't forget to use that variable in trigger [Player - Add x to (Owner of (Picked unit)) Current gold]
This way you will add gold to player in this way:
1st time = 10 gold
2nd time = 11 gold
3rd time = 12 gold
...
You can use real numbers, or any other math functions to do things like this:
1st 5 times = 10 gold
another 5 times (or 6 times) = 11 gold
and so on
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.