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

Change name of player

Status
Not open for further replies.
Level 7
Joined
Jul 25, 2008
Messages
292
I would like to make a trigger that basicaly works like this

If player has *name*

then change players name to *I-<3-JUSTING-BIEBER"

one of my friends uses a realy annoying in-game name on a map we play, I wanna mess with him and make the map automaticaly change his name :p
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Run the trigger when needed.

  • Untitled Trigger 006
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Name of (Player((Integer A)))) Equal to name
            • Then - Actions
              • Player - Set name of (Player((Integer A))) to new name
            • Else - Actions
 
Level 11
Joined
Aug 1, 2009
Messages
714
Lol...It's easy.
Under the players Tag dude

Edit: My Triggers
  • ChangeName
    • Events
      • Player - Player 1 (Red) types a chat message containing -changename as A substring
      • Player - Player 2 (Blue) types a chat message containing -changename as A substring
      • Player - Player 3 (Teal) types a chat message containing -changename as A substring
      • Player - Player 4 (Purple) types a chat message containing -changename as A substring
      • Player - Player 5 (Yellow) types a chat message containing -changename as A substring
      • Player - Player 6 (Orange) types a chat message containing -changename as A substring
      • Player - Player 7 (Green) types a chat message containing -changename as A substring
      • Player - Player 8 (Pink) types a chat message containing -changename as A substring
    • Conditions
    • Actions
      • Game - Display to (All players) for 5.00 seconds the text: ((String_Player_Color[(Player number of (Triggering player))] + String_Player_ChangeName[(Player number of (Triggering player))]) + (|r has change his name into + (Substring((Entered chat string), 13, (Length of (Entered chat string))))))
      • Set String_Player_ChangeName[(Player number of (Triggering player))] = (Substring((Entered chat string), 13, (Length of (Entered chat string))))
      • Player - Set name of (Triggering player) to String_Player_ChangeName[(Player number of (Triggering player))]
 
Level 11
Joined
Aug 1, 2009
Messages
714
@cboy
I think the "Game - Text Message" should be at the most bottom ?
And you should save the previous and current Player Name for it to show properly

A got a virable called RealPlayersNames which is save on Map Initialization.
The reason I make Game - Text Message first is because that
  • Game - Display to (All players) for 5.00 seconds the text: ((String_Player_Color[(Player number of (Triggering player))] + String_Player_ChangeName[(Player number of (Triggering player))]) + (|r has change his name into + (Substring((Entered chat string), 13, (Length of (Entered chat string))))))
Can tell the previous name of the TRIGGERING player has change his name into that string.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
And you expect me to know that you had saved the variable in the Map INIT where a test map is nowhere to be seen ?
LoL, provide some test map... then you can say the "A got a virable called RealPlayersNames which is save on Map Initialization."

Also, you used this, "...has change his name into + (Substring((Entered chat string), 13, (Length of (Entered chat string))))))"
How can the trigger "shows" the changed name of that player when the variable and action is done below it ?
It is like you take a bath before you open the door.
 
Status
Not open for further replies.
Top