• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

[Trigger] Player Colors in Texts

Status
Not open for further replies.
Level 20
Joined
Oct 21, 2006
Messages
3,231
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