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

Kill Messages

Status
Not open for further replies.
Level 3
Joined
Apr 23, 2011
Messages
46
Hey Guys, just a quick Question, how can i configure a Trigger that displays a message when a Hero killed another.

i want it like that : "Name" Has slain "Name."


Other Infos:
The "Heros" are Units, not heros
It is not an PvP Map
I want the names of the Unit's coloured in their team colours.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
First you need to set player colour variables.
  • Set udg_PlayerColour[1] = ( "|cffff0202" )
  • Set udg_PlayerColour[2] = ( "|cff0041ff" )
  • Set udg_PlayerColour[3] = ( "|cff1be5b8" )
  • Set udg_PlayerColour[4] = ( "|cff530080" )
  • Set udg_PlayerColour[5] = ( "|cffffff00" )
  • Set udg_PlayerColour[6] = ( "|cfffe890d" )
  • Set udg_PlayerColour[7] = ( "|cffff0202" )
  • Set udg_PlayerColour[8] = ( "|cff0041ff" )
  • Set udg_PlayerColour[9] = ( "|cff1be5b8" )
  • Set udg_PlayerColour[10] = ( "|cff530080" )
  • Set udg_PlayerColour[11] = ( "|cffffff00" )
  • Set udg_PlayerColour[12] = ( "|cfffe890d" )
Then you need to make the kill trigger:
  • Event - unit dies
  • Actions:
  • Game - display ((PlayerColour[player number of owner of killing unit] + (unit name of killing unit)) + (" has slain " + (PlayerColour[player number of owner of triggering unit] + (unit name of triggering unit) ))
 
Level 3
Joined
Apr 23, 2011
Messages
46
Thank you very much! +rep

Edit: i dont quite get the Kill trigger, i dont know how to make it, could you explain that one a bit more? like where do i find the components
 
Level 3
Joined
Apr 23, 2011
Messages
46
maybe i have a different editor or something, i dont find any of
that functions, except "Player - Player name" and "Unit - Unit name"
but no colour or player number or anything.

Sorry i bug you
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
attachment.php


This one.
 

Attachments

  • concatenate.jpg
    concatenate.jpg
    35.4 KB · Views: 192
Level 25
Joined
Jul 10, 2006
Messages
3,315
Did you create the variables?
  • Set PlayerColour[1] = ( "|cffff0202" )
    • Set PlayerColour[2] = ( "|cff0041ff" )
    • Set PlayerColour[3] = ( "|cff1be5b8" )
    • Set PlayerColour[4] = ( "|cff530080" )
    • Set PlayerColour[5] = ( "|cffffff00" )
    • Set PlayerColour[6] = ( "|cfffe890d" )
    • Set PlayerColour[7] = ( "|cffff0202" )
    • Set PlayerColour[8] = ( "|cff0041ff" )
    • Set PlayerColour[9] = ( "|cff1be5b8" )
    • Set PlayerColour[10] = ( "|cff530080" )
    • Set PlayerColour[11] = ( "|cffffff00" )
    • Set PlayerColour[12] = ( "|cfffe890d" )
Create a string variable called PlayerColour, and tick the box that says "array", this will make it an array variable that uses [ ] brackets.

When you put these in, it won't be in the Function list, but in the section above - the Variable list. Once you select this one, square brackets will appear behind it, that is where you put player number of owner of killing unit.
 
Status
Not open for further replies.
Top