• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Need Serious Help!

Status
Not open for further replies.
Level 7
Joined
Dec 8, 2005
Messages
319
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.
 
Level 9
Joined
Sep 8, 2004
Messages
633
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
 
Level 7
Joined
Dec 8, 2005
Messages
319
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?
 
Status
Not open for further replies.
Top