Warcraft III resources & community, 2003–2006 · archived

Need Someone That Is VERY SMART!

3 posts
#1

Need Someone That Is VERY SMART!

ok here is my delema! i want a unit to gain 5 gold every sec it is within an aura. i have tried a few things.
Test
Events
Time - Every 1.00 seconds of game time
Conditions
((Triggering unit) has buff Warm) Equal to True
Actions
Player - Add 5 to (Owner of (Triggering unit)) Current gold

but it has failed.
there are more then one unit on the field and the building that is putting off the aura is owned by someone but is not under the effect i have changed (Triggering unit) to a thousand differant things. got any ideas or feedback plz help!
#2
Every Second:
Pick every unit:
If unit has the warm buff:
Give owner of unit 5 gold

This is a really stupid thing to do, because you'll be checking loads of units every second, so it'll lag.
#3
To don't cause ag and to do it without fail you need to do 2 triggers. 1 for when the unit learns the ability and 1 to every 1 second. Use:

A unit learns an ability
Learned hero skill equal to ...
Set BOOLEAN = TRUE
Set UNIT = Learning Hero
Turn On (trigger that will give the gold every second)

->The other trigger is:

Every 1 second of game time
If BOOLEAN equal to true
Add 5 gold to owner of UNIT current gold.


Just It, think that it works perfectly. :wink: