• 🏆 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!

Player Color in Chat Message

Status
Not open for further replies.
Level 2
Joined
Aug 12, 2007
Messages
13
Hey guys.. i got another (simple) question for you.

I got some trigger which look like this:

  • Game - Display to (All players) for 25.00 seconds the text: ((|c00ff8000 + ((Name of (Owner of (Killing unit))) + |r )) + (|c00808000just killed|r + (|c00ff8000 + ((Name of (Owner of (Dying unit))) + (|r. + ( He lost |c00ff0000 + ((String(herogoldtemp)) + |r gold!)))))))
Its a Playername which i dont know before (owner of unit and stuff like that) but i want it, so that the color of the playername is the same as the color the player is!

So if player 1 kills a unit and triggers this trigger, it should say: Player1 just killed a unit.

Is there a way to do this WITHOUT making if-conditions for everyplayer?
 
Level 2
Joined
Aug 12, 2007
Messages
13
Thanks for the link!

This inspired me to just make some if's at the loading of the map which will place the color codes (like in the jass) into an variable (arrays of course) for every player and then just say he has to add the variable[array = player number] as a string to the beginning...

I know you didnt tell me that, but thanks to you, i get the idea :D Will post as soon as its finished.
 
Status
Not open for further replies.
Top