• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How to get the user of a shop?

Status
Not open for further replies.
Hi, All. I have a neutral shop that has [Select Hero] and [Summon Hero].
when a hero casts from the shop [Summon Hero] this moves the target hero in front of the shop with the message "target hero was summoned".
I want the message to be "hero1 summoned hero2", but I don't know how to get which player/hero uses the shop to make him cast [summon hero]

Any ideas how to achieve?
 
That's tricky... Can multiple units use the shop at the same time? I was thinking about creating a small region around your shop and detect whenever a hero enters/leaves this region and store them in a variable or something
That I thought of but dismissed fast because is not guaranteed that the hero will be standing on it.
 
Level 20
Joined
Aug 29, 2012
Messages
847
You could add some condition to your summon ability, that would require having a hero in the region for the effect to trigger?

See, if your ability was instead a fake item that you could buy for free, you could easily get who it is with "Buying unit", but with an ability I can't think of any easy way :/
 
Status
Not open for further replies.
Top