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

When player leaves, display name?

Status
Not open for further replies.
Level 10
Joined
Jun 7, 2008
Messages
420
Thanks. I came up with this after soem trying (not to complain but wish you had told me something about string 1 + string 2)

Leaver
Events
Player - Player 2 (Blue) leaves the game
Player - Player 3 (Teal) leaves the game
Player - Player 4 (Purple) leaves the game
Player - Player 5 (Yellow) leaves the game
Player - Player 6 (Orange) leaves the game
Player - Player 11 (Dark Green) leaves the game
Conditions
Actions
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Triggering player)) + has left the game to go touch little boys and experiment on his baby sister.)

Don't get what your color codes will do or how to do it tho.
 
Level 8
Joined
Nov 9, 2008
Messages
502
It is relativey simple:

You need to save make a string array the size of you max players. Find the colour hexadecimal code for the respective player and put the first half of it to that index of the array.

e.g.
PlayerColours[1] = |c00FF0000
PlayerColours[2] = |c000000FF
e.t.c...

SO once you have this what you can do in your actions when you are displaying the text you would put something like...

  • Actions
    • Game - Display to (All players) the text: ((PlayerColour[PlayerNumberOf(Triggering Player)] + (Name of (Triggering player))) + |r has left this game!)
So that the text will refer to the colour hexadecimal that corresponds to the player number of triggering player in the PlayerColour[] array.
 
Level 10
Joined
Jun 7, 2008
Messages
420
Ah ok so for a simple one without colors its allright?
Erm toofless could you please give me a slightly more detailed guide on how to do that, or a sample where I can just copy/paste the trigger? Have no idea what you mean lol sorry I tried.
 
Last edited:
Level 9
Joined
May 30, 2008
Messages
430
where the text is u must select an arithmetic or something like that (the one that allow u to combine strings) then first string paste the hexa code (|c000000FF) and in the second place player name of leaving player. it shouldn't be hard but still u have to experiment for like 10 minutes to make it fir best for your map
 
Level 12
Joined
May 30, 2009
Messages
829
Have 12 string arrays containing the color code without the |r, and when it triggers, the array number in the action should be something like "Player Number of Triggering Player."

So then it displays the color of the player! Neat. But you also have to remember to have |r after "Name of (Triggering Player)" if you're going to have a message like:

Player has left the game! which would be [String Array Here]PlayerName|r has left the game!

P.S. Stop double posting and getting neg repped.

Me: This... blah blah blah.

then

Me: But then... blah blah.

So basically you shouldn't have another post belonging to you under another post belonging to you. Use the "Edit" button available next to your post.
 
Status
Not open for further replies.
Top