Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Player chosen names

Discussion in 'World Editor Help Zone' started by Shimitar, Feb 12, 2010.

  1. Shimitar

    Shimitar

    Joined:
    Dec 21, 2009
    Messages:
    68
    Resources:
    0
    Resources:
    0
    Can someone tell me what triggers are required to allow players to choose their names?

    Example:

    Shimitar: -name Testing
    Testing:
     
  2. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,429
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Something like this:
    • 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 Player 1 (Red) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))
        • Player - Set name of Player 2 (Blue) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))
        • Player - Set name of Player 3 (Teal) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))
        • Player - Set name of Player 4 (Purple) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))
        • Player - Set name of Player 5 (Yellow) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))
        • Player - Set name of Player 6 (Orange) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))
        • Player - Set name of Player 7 (Green) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))
        • Player - Set name of Player 8 (Pink) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))
        • Player - Set name of Player 9 (Gray) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))
        • Player - Set name of Player 10 (Light Blue) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))
        • Player - Set name of Player 11 (Dark Green) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))
        • Player - Set name of Player 12 (Brown) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))


    You could run a loop, yeah. Lol, I forgot to create one though. I just c'n'ped it over and over and just changed the players. =P Well, loops does essentially the same thing.
     
  3. Maximilianx

    Maximilianx

    Joined:
    Oct 14, 2008
    Messages:
    334
    Resources:
    0
    Resources:
    0
    Purge, that would change the name of every player, so if player 4 typed -name Leif Erikson, every players name would change to Leif Erikson. You would only need one action, and it would use Triggering Player as opposed to one action for every player.
     
  4. Damage

    Damage

    Joined:
    Aug 31, 2009
    Messages:
    662
    Resources:
    7
    Maps:
    5
    Spells:
    2
    Resources:
    7
    Like Max said, you want it to be:
    • 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 (Substring((Entered chat string), 6, (Length of (Entered chat string))))
     
  5. Darkness-4ever

    Darkness-4ever

    Joined:
    Nov 4, 2007
    Messages:
    763
    Resources:
    0
    Resources:
    0
    Yes indeed, you must have your Triggering Player or just sep triggers for each player...
    Is Max's name Leif Erikson?
     
  6. Blaxor

    Blaxor

    Joined:
    Sep 6, 2008
    Messages:
    411
    Resources:
    7
    Models:
    1
    Icons:
    6
    Resources:
    7
    @Darkness-4ever
    Max length of name is pretty big :p I used "Blaxor Slayer of Gods" on my friends map and it worked without any signs of problems. If you go bigger and have a multiboard it might be too big but you'll see the whole name in chat etc. as it should.
     
  7. Shimitar

    Shimitar

    Joined:
    Dec 21, 2009
    Messages:
    68
    Resources:
    0
    Resources:
    0
    Thx for the help