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!
Enemies in this case are Players and when you want to work with multiple Players at once you use a Player Group. Just like when you want to work with multiple Units you would use a Unit Group. I recommend trying to get into the habit of relying on these "Group" actions because you're going to be using them a lot. Unit/Player = a single thing, Unit Group/Player Group = multiple things.
With that in mind, here's one way to do it:
Enemy Gold Command
Events
Player - Player 1 (Red) types a chat message containing -enemy gold as An exact match
Player - Player 2 (Blue) types a chat message containing -enemy gold as An exact match
Conditions
Actions
Set Player_Group_Self = (Player group((Triggering player)))
Set Player_Group_Enemies = (All enemies of (Triggering player))
Player Group - Pick every player in Player_Group_Enemies and do (Actions)
Loop - Actions
Set Current_Gold = ((Picked player) Current gold)
Game - Display to Player_Group_Self for 10.00 seconds the text: ((Name of (Picked player)) + ( current gold: + (String(Current_Gold))))
^ This will only show the text to the Player that typed the chat command. The Custom Scripts help clean up the memory leaks but you don't NEED them for the trigger to work.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.