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

Colorizing Text

Status
Not open for further replies.
Level 11
Joined
Dec 11, 2007
Messages
888
first you need the color codes for each player (red for player 1, blue for player 2...) then put each code in a string variable. so when you display a message do something like this: Display to all players the message: Player5Color + Name of player5+|r has left the game.
 
  • Like
Reactions: Kam
This is what I currently use:

Code:
Slot Check
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        -------- Check for players leaving game --------
        Trigger - Run Player01 Leaves Game <gen> (checking conditions)
        Trigger - Run Player02 Leaves Game <gen> (checking conditions)
        Trigger - Run Player05 Leaves Game <gen> (checking conditions)
        Trigger - Run Player04 Leaves Game <gen> (checking conditions)
        Trigger - Run Player06 Leaves Game <gen> (checking conditions)
        Trigger - Run Player07 Leaves Game <gen> (checking conditions)

Code:
Player01 Leaves Game
    Events
    Conditions
        (Player 1 (Red) slot status) Equal to Has left the game
        ((This trigger) is on) Equal to True
    Actions
        Game - Display to (All players) the text: ((Name of Player 1 (Red)) +  |cffff0000has dishonored the Horde.|r)
        Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Unit - Make (Picked unit) Rescuable by (All allies of Player 1 (Red)))
        Sound - Play Warning <gen>
        Trigger - Turn off (This trigger)

I'm not seeing how I could colorize the Name of Player 1 (Red) part.
 
Level 5
Joined
May 21, 2006
Messages
174
Create more Concatenate Strings, one infront of (Name of Player 1 (Red)) to decide color and one after for |r, then the rest of the text that you want as normally.

So bascially, where you currently have (Name of Player 1 (Red)) select Concatenate Strings instead.
 
  • Like
Reactions: Kam
Status
Not open for further replies.
Top