🏆 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!
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.