Warcraft III resources & community, 2003–2006 · archived

Trigger that allows players to change their names?

8 posts
#1

Trigger that allows players to change their names?

I thought for fun I can put a change name function in my map but I dont understand substrings. Does anyone know how to make a trigger in the format of -name x to change one's name? Thanks.
#2
There is a function that lets you pick out from letter X to letter Y in an entered string (message of text), allowing you to remove the "-rename" part in the string required to activate the trigger
#3
How do I take the player's desired name, turn it into a variable and turn the variable into the player's name.
#4
you may also make is in 2 triggers:

1 trigger:
player 1 say: -name
say:now enter you name
activate trigger 2

2 trigger:
player 1 say: name

set player1 name:entered chat string
#5
:arrow: Event:
Player - Player 1 (Red) types a chat message containing -name as A substring

:arrow: Actions:
Player - Set name of Player 1 (Red) to (Substring((Entered chat string), 7, (Length of (Entered chat string))))
#6
Em, that would allow quite an abusive trigger. It's good to cap the string length, to stop people from saying "-rename omfg dia is da 1337 rox0r2 13371337133713371337133713371337," which would totally slay gameplay
#7
I got it to work using -=Emergenzy=-'s trigger and Eusira's suggestion. Thanks everyone.
#8
But the easiest way of this is just to have the People choose their name when they create an Account... :wink: