• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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
 
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
 
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))]
 
@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.
 
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.
Back
Top