• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Very simple question

Status
Not open for further replies.
Level 6
Joined
Dec 27, 2006
Messages
100
Okay so here's the deal: When a hero dies, this message pops up. The problem is whenever a player name is mentioned, I can't get their name to be the correct color, it is always just white.


Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + ('s |cffCD2626hero has been killed by|r + (Player_Colors[(Player number of (Owner of (Killing unit)))] + ((Name of (Owner of (Killing unit))) + |r))))
 
Level 16
Joined
Jun 25, 2008
Messages
1,043
  • Set strings
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- PCV= Player Color Value --------
      • -------- String array Variable --------
      • Set PCV[1] = (|c00FF0000 + ((Name of (Player(1))) + |r))
      • Set PCV[2] = (|c000000FF + ((Name of (Player(2))) + |r))
      • Set PCV[3] = (|c0000FFFF + ((Name of (Player(3))) + |r))
      • Set PCV[4] = (|c00800080 + ((Name of (Player(4))) + |r))
      • Set PCV[5] = (|c00FFFF00 + ((Name of (Player(5))) + |r))
      • Set PCV[6] = (|c00FF8000 + ((Name of (Player(6))) + |r))
      • Set PCV[7] = (|c0000B000 + ((Name of (Player(7))) + |r))
      • Set PCV[8] = (|c00FF71B8 + ((Name of (Player(8))) + |r))
      • Set PCV[9] = (|c00868686 + ((Name of (Player(9))) + |r))
      • Set PCV[10] = (|c007EBFF1 + ((Name of (Player(10))) + |r))
      • Set PCV[11] = (|c00106246 + ((Name of (Player(11))) + |r))
      • Set PCV[12] = (|c004E2A04 + ((Name of (Player(12))) + |r))
Not 100% sure that the colours are EXACT, but they are very similar to the ingame colours

  • Show message
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Game - Display to (All players) for 10.00 seconds the text: (PCV[(Player number of (Owner of (Dying unit)))] + ( has been killed by + PCV[(Player number of (Owner of (Killing unit)))]))
 
Level 6
Joined
Dec 27, 2006
Messages
100
  • Define Colors
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Player_Colors[1] = |c00ff0000
      • Set Player_Colors[2] = |c000000ff
      • Set Player_Colors[3] = |c0000ffff
      • Set Player_Colors[4] = |c00800080
      • Set Player_Colors[5] = |c00ffff00
      • Set Player_Colors[6] = |c00ff8000
      • Set Player_Colors[7] = |c0000ff00
      • Set Player_Colors[8] = |c00ff00ff
That's what the values for player colors are btw.
 
Status
Not open for further replies.
Top