• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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
828
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