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

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 13
Joined
Nov 4, 2006
Messages
1,239
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