• 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 help with unit cast spell when flew to a building

Status
Not open for further replies.
Level 4
Joined
Nov 25, 2008
Messages
76
I'm not quite sure I get this but... you can set a region near that building and work on when medivh enters that region.

Such as:

Event: A unit entered rect01
Cond: Trig unit is medivh
Action: Well you know the action already.
 
Level 4
Joined
Nov 25, 2008
Messages
76
Hmm... There is still a way although I doubt it is efficient. You can store the location of the building in a variable once you build it (for further trigger usage). And then when its built make a trigger that checks units in range of that location (can do this in jass, not sure about gui) and if medivh is in range, cast spell on variable medivh.

*Edit* You can also make dummy spell and give it to the building which would automatically cast it on every unit in range. Then do a trigger check on if the unit is the same as the variable medivh. This would work in the case of multiple buildings on map, I believe.
 
Last edited:
Status
Not open for further replies.
Top