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

Chat string to ping unit

Status
Not open for further replies.
Level 5
Joined
Jan 4, 2006
Messages
139
How can I make a chat string for anyone who types in a command as an exact match, to finda certain unit that they own.
ie. I could put my harvesting unit as a worker (showing the idle worker button) but it will clog up acctual workers, so I want to instead have a chat command (-h or -harvester) to ping all of the players harvesters on the map.
Thanks in advance :)
 
Level 5
Joined
Nov 17, 2005
Messages
165
Something like this maybe:

  • PingHarvesters
    • Events
      • Player - Player 1 (Red) types a chat message containing -h as An exact match
      • Player - Player 1 (Red) types a chat message containing -harvester as An exact match
      • Etc...
    • Conditions
    • Actions
      • If ((Number of living Harvester units owned by (Triggering player)) Greater than or equal to 1) then do (Unit Group - Pick every unit in (Units owned by (Triggering player) of type Harvester) and do (Cinematic - Ping minimap for (Player group((Triggering player))) at (Position of (Picked unit)) for 1.00 seconds, using a Simple ping of color (100.00%, 100.00%, 100 else do (Game - Display to (Player group((Triggering player))) the text: No harvesters found!)
 
Last edited:

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
I would do like this:
[trigger:1:620d677d2c]Untitled Trigger 001
Events
Player - Player 1 (Red) types a chat message containing -harvester as An exact match
Conditions
Actions
Unit Group - Pick every unit in (Units owned by (Triggering player) of type Peasant) and do (Actions)
Loop - Actions
Cinematic - Ping minimap for (Player group((Triggering player))) at (Position of (Picked unit)) for 1.00 seconds
[/trigger:1:620d677d2c]
 
Status
Not open for further replies.
Top