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

Setname -name Change

Status
Not open for further replies.
Level 7
Joined
May 18, 2010
Messages
264
Hello again
Tryed to search in Tutorials with no luck

-> how to make his name change
  • Name
    • Events
      • Player - Player 1 (Red) types a chat message containing -name as A substring
      • Player - Player 2 (Blue) types a chat message containing -name as A substring
      • Player - Player 3 (Teal) types a chat message containing -name as A substring
      • Player - Player 4 (Purple) types a chat message containing -name as A substring
      • Player - Player 5 (Yellow) types a chat message containing -name as A substring
      • Player - Player 6 (Orange) types a chat message containing -name as A substring
      • Player - Player 7 (Green) types a chat message containing -name as A substring
      • Player - Player 8 (Pink) types a chat message containing -name as A substring
      • Player - Player 9 (Gray) types a chat message containing -name as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -name as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -name as A substring
      • Player - Player 12 (Brown) types a chat message containing -name as A substring
    • Conditions
    • Actions
      • Player - Set name of (Triggering player) to Bla<>#A
???
 
Level 7
Joined
May 18, 2010
Messages
264
Use substring to gt rid of the "-name " part at the start of the entered chat string and use the rest for the player name.
  • Name
    • Events
      • Player - Player 1 (Red) types a chat message containing -name as A substring
      • Player - Player 2 (Blue) types a chat message containing -name as A substring
      • Player - Player 3 (Teal) types a chat message containing -name as A substring
      • Player - Player 4 (Purple) types a chat message containing -name as A substring
      • Player - Player 5 (Yellow) types a chat message containing -name as A substring
      • Player - Player 6 (Orange) types a chat message containing -name as A substring
      • Player - Player 7 (Green) types a chat message containing -name as A substring
      • Player - Player 8 (Pink) types a chat message containing -name as A substring
      • Player - Player 9 (Gray) types a chat message containing -name as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -name as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -name as A substring
      • Player - Player 12 (Brown) types a chat message containing -name as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 6)) Equal to (==) -name
    • Actions
      • Player - Set name of (Triggering player) to (Substring((Entered chat string), 7, 27))

So simple THX
 
Status
Not open for further replies.
Top