• 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.

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 30
Joined
Aug 29, 2012
Messages
1,383
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