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

[Trigger] Player Colors in Texts

Status
Not open for further replies.
Level 20
Joined
Oct 21, 2006
Messages
3,230
Do I have to make a new trigger for every player?

EDIT:
  • Tower Dies
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
      • Unit - A unit owned by Player 7 (Green) Dies
    • Conditions
      • ((Dying unit) is A structure) Equal to True
    • Actions
      • Game - Display to (All players) the text: (((Name of (Dying unit)) + have been destroyed by ) + ((Name of (Owner of (Killing unit))) + .))
This is my trigger. What I need to do for it?
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
Do I have to make a new trigger for every player?


Create a arrayed string variable, now make it like this

  • Set String[1] = |cffff0000 (red)
  • Set String[2] = |cff0000ff (blue)
Create strings like this for each player you have playing.

Now, in your trigger change the action to something like this
  • Game - Display to (All players) the text: (((String[number of [owner of (Killing unit)]]) + (Name of (Owner of (Killing unit)))) + (|r has killed + (String[number of [owner of (Triggering unit)]] + (Name of (Owner of (Triggering unit))))))
 
Level 4
Joined
Nov 22, 2004
Messages
85
Color codes for all players
Player 1: ff0303
Player 2: 0042ff
Player 3: 1ce6b9
Player 4: 540081
Player 5: fffc01
Player 6: fe8a0e
Player 7: 20c000
Player 8: e55bb0
Player 9: 959697
Player 10: 7ebff1
Player 11: 106246
Player 12: 4e2a04

Just remember the |c and the |r
^^
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Thats why I love GetPlayerColorString functions PurgeAndFire111

and check some variable tutorials
 
Status
Not open for further replies.
Top