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

Creating a trigger stating who killed who.

Status
Not open for further replies.
Level 2
Joined
Jul 14, 2014
Messages
7
I'm fairly new to triggers, and I wanted to once a unit dies, the game writes out Owner of Killing Unit has slain Owner of Dead Unit in chat, but all I can get it to do is writing out the Owner of Killing Unit, and then nothing else.

Any help on what to do here? :)
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
Use Concatenate Strings

  • Who killed who
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Game - Display to (All players) the text: ((Name of (Triggering unit)) + ( has been killed by + (Name of (Killing unit))))
concat.png
 
Last edited:
Level 2
Joined
Jul 14, 2014
Messages
7
Okay, thanks a lot!

Could you help me now on how to add color around the given players names?

  • trigger
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( has slain + ((Name of (Owner of (Dying unit))) + .)))
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
You'll need to use color codes and concatenate them onto the string.

For reference see this: http://www.hiveworkshop.com/forums/...278/warcraft-iii-color-tags-linebreaks-31386/

For a quick library of already made colors try this out.

JASS:
library Colors

globals
    constant string PINK = "|ffc0cb"
    constant string RED = "|cffff0000"
    constant string BLUE = "|cff0000ff"
    constant string ORANGE = "|cffffa500"
    constant string GREEN = "|cff008000"
    constant string GOLD = "|cffffd700"
    constant string CYAN = "|cff00ffff"
    constant string SILVER = "|cffc0c0c0"
    constant string PURPLE = "|cff800080"
    constant string YELLOW = "|cffffff00"
    constant string WHITE = "|c00FFFFFF"
endglobals
endlibrary
 
Status
Not open for further replies.
Top