• 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.
  • Vote for the theme of Hive's HD Modeling Contest #7! Click here to vote! - Please only vote if you plan on participating❗️

Player name text code?

Status
Not open for further replies.
Level 2
Joined
Feb 4, 2008
Messages
7
In my map players have custom set names by triggers, however id like to still know the players user names. Ive seen this done in other maps by having a section in there quests that lists the players Wc3 user names. I was wondering how i would go about doing this, would it be something like color codes or what?

Again keep in mind this is not a trigger but in a Quest.

Thanks
 
Level 2
Joined
Feb 4, 2008
Messages
7
I don't quite understand what your saying, ive never really understood variable's.

If you could give me maybe an example or elaborate?

Keep in mind i want to use this for a section in quests to show players wc3 usernames while there in game names are something already set by triggers.
 
Level 2
Joined
Jun 25, 2009
Messages
19
Do this:

  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set PlayerNames[(Player number of (Picked player))] = (Name of (Picked player))
          • Set QuestText = ((Name of (Picked player)) + |n)
      • Quest - Create a Required quest titled Player Names with the description QuestText, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
 
Level 14
Joined
Mar 4, 2009
Messages
1,156
I don't quite understand what your saying, ive never really understood variable's.

If you could give me maybe an example or elaborate?

Keep in mind i want to use this for a section in quests to show players wc3 usernames while there in game names are something already set by triggers.

when you set a variable it will not be changed until you change it again

so if you set variable (string) called PLAYER = (name of player 1 red)
at map initialization

and than if you want to see that variable
EVENT - (your event
ACTION-Game Text:pLAYER

it will show how player 1 name was at map initialization
(because it was the last time you have set it)
 
Level 5
Joined
Jan 5, 2008
Messages
145
heres a trigger for some help

  • Change Name
    • Events
      • Player - Player 1 (Red) types a chat message containing -name as A substring
    • Conditions
    • Actions
      • Player - Set name of Player 1 (Red) to (Substring((Entered chat string), 7, (Length of (Entered chat string))))
      • Game - Display to (All players) the text: (The New Name Of Player 1 Is + (Name of Player 1 (Red)))
type -name and whatever after that is the new players name.
for quests just do player name of player 1 like this. This is just an example

  • Quest Reminder
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Game - Display to (All players) the text: ((Name of Player 1 (Red)) + ( Has The Quest + XXX))
XXX Being the quest name which you can set as a variable. if you need to understand variables go and read a tutorial or just keep messing with it till you understand it.

Hope that helped :grin:
 
Status
Not open for further replies.
Top