• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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