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

[Trigger] Just an chat Trigger to SetName by command

Status
Not open for further replies.
Level 8
Joined
Mar 24, 2011
Messages
353
Remember the "cheats" like: greedisgood X

Greedisgood = Command
X = amount
(?)

I need an command / code similar but is for Unit Name...
Ex: -SetName_Talon

The selected Unit change her name for Talon, understand?

Or i do -SetName_OldBear
The selected Unit change her name for OldBear o thats any other think thats i (or map player) want to rename the unit :/

how i can do this? Thanks.
 
Level 20
Joined
Feb 27, 2019
Messages
593
Youll need to use substring in the event. If the substring is abcde and you want to display letters b-d then set it to 2, 4 and it will display bcd

  • Substring
    • Events
      • Player - Player 1 (Red) types a chat message containing -SetName_ as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 9)) Equal to -SetName_
    • Actions
      • Game - Display to (All players) the text: (Substring((Entered chat string), 10, 26))
 
Level 8
Joined
Mar 24, 2011
Messages
353
Youll need to use substring in the event. If the substring is abcde and you want to display letters b-d then set it to 2, 4 and it will display bcd

  • Substring
    • Events
      • Player - Player 1 (Red) types a chat message containing -SetName_ as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 9)) Equal to -SetName_
    • Actions
      • Game - Display to (All players) the text: (Substring((Entered chat string), 10, 26))
Omg, Very thanks :grin:
 
Status
Not open for further replies.
Top