Warcraft III resources & community, 2003–2006 · archived

Naming Players

5 posts
#1

Naming Players

I'm pretty new to triggering and stuff..was wondering how I might go about making a trigger which allows the player to type in -name suchandsuch..where the trigger reads the suchandsuch and sets it as the players name, need the trigger to adapt to all players, if it is possible with one, or 12 triggers..I've seen maps with this trigger in it. So far, i have a trigger that lets u type in -name suchandsuch, but it takes -name to be part of the name, pretty sure this doesn't require JASS as it is pretty simple and there should be a way to get around it in triggers..plz reply soon, thanks..
#2
Event: Player types a message with "-name" as part of the message

Actions: Set Player Name to (substring 6 to 1000 of entered chat message)
#3
Why not use string length instead of 1000?
#4
Event - Player1 types '-name pliplop' as an SUBSTRING
Conditions - None
Actions:
-Set name of Player1 to (Event response: Entered chat message (Substring 7,30))

30 being the limit of how long the name can be. In this trigger the lenght of the name is max 23 characters. Make the '30' more or less, what ever suits you.
#5
Thanks! :D