1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. The results are out! Check them out.
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
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,427
    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:
    620
    Resources:
    5
    Maps:
    3
    Spells:
    2
    Resources:
    5
    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