• 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.

Forgot how to make custom names

Status
Not open for further replies.
Level 4
Joined
Apr 7, 2009
Messages
108
well i use to know how to make it so you can set your own names, but i forgot
i got down the event part with the substring, but what do you do with actions?

I have tried
  • Player - Set name of (Triggering player) to (Matched chat string)
and
  • Player - Set name of (Triggering player) to (Entered chat string)
but those didn't work, i looked around and couldn't find anything that rang the bell :hohum:
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Works just fine for me:

  • Untitled Trigger 009
    • Events
      • Player - Player 1 (Red) types a chat message containing name as A substring
    • Conditions
    • Actions
      • Player - Set name of (Triggering player) to (Entered chat string)
      • -------- --------OR-------- --------
      • Set TempString = (Substring((Entered chat string), 6, (Length of (Entered chat string))))
      • Player - Set name of Player 1 (Red) to TempString
Weird. I syour trigger on? I've had that a couple of times. Wondering why nothing happens, while the trigger isn't even on :D
 
Level 4
Joined
Apr 7, 2009
Messages
108
my event is
  • Player - Player 1 (Red) types a chat message containing -cn as A substring
and when i have entered chat string, if i typed in "-cn bob" my name wouldn't be just bob, it would be "-cn bob"
and if i have matching chat string, my name would be "-cn "

then ur second solution, i never understood what that ment
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
OK, use

  • Untitled Trigger 009
    • Events
      • Player - Player 1 (Red) types a chat message containing -cn as A substring
    • Conditions
    • Actions
      • Set TempString = (Substring((Entered chat string), 5, (Length of (Entered chat string))))
      • Player - Set name of Player 1 (Red) to TempString
It assumes that you begin your name change with -cn, inputting a name happens by typing -cn newName. It then pics letters from 5th to the last character, so it cuts out that "-cn ".

Use "triggering player" if it is for multiplayer game, and add events for other players.
 
Level 4
Joined
Apr 7, 2009
Messages
108
Oh now i get it! the first says what u want, then next number is what number you want you to keep at, in this case, once the fifth letter is typed in it starts there ending at the last letter you tped it

ty :D +rep fo u

so this is what it should look like for me?
  • Custom Name
    • Events
      • Player - Player 1 (Red) types a chat message containing -cn as A substring
      • Player - Player 2 (Blue) types a chat message containing -cn as A substring
      • Player - Player 3 (Teal) types a chat message containing -cn as A substring
      • Player - Player 4 (Purple) types a chat message containing -cn as A substring
      • Player - Player 5 (Yellow) types a chat message containing -cn as A substring
      • Player - Player 6 (Orange) types a chat message containing -cn as A substring
      • Player - Player 7 (Green) types a chat message containing -cn as A substring
      • Player - Player 8 (Pink) types a chat message containing -cn as A substring
      • Player - Player 9 (Gray) types a chat message containing -cn as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -cn as A substring
    • Conditions
    • Actions
      • Set PlayerNewName[(Player number of (Triggering player))] = (Substring((Entered chat string), 5, (Length of (Entered chat string))))
      • Player - Set name of (Triggering player) to PlayerNewName[(Player number of (Triggering player))]
 
Level 6
Joined
Feb 26, 2008
Messages
171
You can also play with loops to make a maximum lenght of the name, else people will make a name with 30-40 caracters long O.O!!! Which is not a name anymore... Ask me if you need the loop system, which is quit easy to do ^^
 
Status
Not open for further replies.
Top