Warcraft III resources & community, 2003–2006 · archived

Need Serious Help!

3 posts
#1

Need Serious Help!

here is my dilemna i want my gold to increase when it is in range of a building. the building is not built yet so it is not on the map. here is my code.

test Copy
Events
Unit - A unit comes within 800.00 of Survivor 0011 <gen>
Conditions
Fire Equal to (Unit-type of (Triggering unit))
Actions
Player - Add 5 to Player 1 (Red) Current gold


anything will help and fire is the building! um i am not sure what to do.
#2
Well, for one, "fire" cannot be the triggering unit, since it's static, it cannot move to get into range of something. Its the unit that moves, thus comes into range with fire, which means the unit is the triggering unit.

Now, as far as i can tell, it's impossible to create an "event" check for units not yet on the map. Problem here is that you can't use variables as units in events.
What you could do is this: Create a trigger that checks, say every 1 second (time - periodic event)

The condition would be something like if the unit X is within Y (where y is a location or circle around "fire")
Then give 5g to owner of triggering unit, and turn off (this trigger)
If you want it to be able to be used again after a while, then add (wait x) for howlong you want it to be unavailable, and then add (trigger - turn on (this trigger))

That should work. Goodluck
#3
sounds good and all but i have already thought to try to do that and there is not condition like that! unless i have over looked one but if i have then can some one point me in the right direction?