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

Need help making a "renaming" trigger

Status
Not open for further replies.
Level 1
Joined
Jun 14, 2017
Messages
3
Hi, I'm a complete dumb when it's about triggers... And not being successful at learning, so I guess I can try to ask for help
This shouldn't be a big ass trigger, I think it's simple since it shouldn't have many actions.
What I basically need is, when a player, for example, will type -name Hiveworkshop, it will display his nickname (in chat, and if you hover over his units/buildings/stuff) as Hiveworkshop, instead of his original name.
Is it hard to make? If it's not, may I get a screenshot or code of a trigger that will make it work like that?
 
This Trigger allows players to change their own name by a chat command.

  • Set Playername
    • Events
      • Player - Player 1 (Red) types a chat message containing -name as a Part String
      • Player - Player 2 (Blue) types a chat message containing -name as a Part String
      • Player - Player 3 (Blaugrau) types a chat message containing -name as a Part String
      • add further Players, if you want them
    • Bedingungen
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Length of (Entered chat string)) Greater as 6
        • Then - Actions
          • Player - Set name of (Triggering player) to (Substring((Entered chat string), 7, 99))
        • Else - Actions
          • -------- Do Nothing cause only "-name " was written. --------
 
Level 1
Joined
Jun 14, 2017
Messages
3
This Trigger allows players to change their own name by a chat command.
I'm so lame, I can't find where you choose "Lenght of entered chat string) in if conditions.
It just says Entered chat string equals number. How do I set it to length and the condition to greater instead of equal, there's either equal or nonequal.

Edit: nvm, found it, now testing
Editv2: Ty, it worked. Is it possible to make it so it will also change on the leaderbord?
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
just put an update action in the name change trigger

  • Multiboard - Set the text for (Last created multiboard) item in column X, row X to (Name of (Triggering player))
i haven't tried it if it uses the "new" name but if it doesn't then just use the text string again
 
Level 1
Joined
Jun 14, 2017
Messages
3
Thank you guys, got it properly working except for multiboard but whatevs thats not that important :)
 
Status
Not open for further replies.
Top