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

[Trigger] How to make killed by player messages?

Status
Not open for further replies.
Level 2
Joined
Aug 19, 2012
Messages
16
e.g if player 2 kills player 1,
how do i make text come up saying "Player 1 has just killed player 2".
if it's not too much trouble i'd also like one where it says the hero name has killed hero name like - "Tauren Chieftan has just killed Paladin"

Thanks in advance Hive :D
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Event: Generic unit event - unit dies
Condition: Boolean - dying unit is a hero equal to true
Action: Game - display message - concatenate strings
When you select concatenate strings, you'll see two red strings that you can change. Since the message (the first style) will come in three parts (player 1 + " has just killed " + player 2), you'll have to set one of those strings into another concatenate strings.
Along the function list in the string choose you'll see all the relevant things you need - player name (name of (owner of killing unit)), unit name (name of (killing unit)).
 
Level 2
Joined
Aug 19, 2012
Messages
16
Event: Generic unit event - unit dies
Condition: Boolean - dying unit is a hero equal to true
Action: Game - display message - concatenate strings
When you select concatenate strings, you'll see two red strings that you can change. Since the message (the first style) will come in three parts (player 1 + " has just killed " + player 2), you'll have to set one of those strings into another concatenate strings.
Along the function list in the string choose you'll see all the relevant things you need - player name (name of (owner of killing unit)), unit name (name of (killing unit)).

i already just figured it out 5 mins ago, i just came back to post that i dont need help anymore, but thanks! +rep :)
 
Level 4
Joined
Aug 5, 2011
Messages
99
  • Melee Initialization
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( just killed + ((Name of (Owner of (Triggering unit))) + ('s + (Proper name of (Triggering unit))))))
added the map if u wanne copynpaste ^^

edit: Dam too late :p
 

Attachments

  • test.w3x
    16.9 KB · Views: 93
Level 2
Joined
Aug 19, 2012
Messages
16
  • Melee Initialization
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( just killed + ((Name of (Owner of (Triggering unit))) + ('s + (Proper name of (Triggering unit))))))
added the map if u wanne copynpaste ^^

edit: Dam too late :p

+Rep for taking the time to help me :D
 
Level 4
Joined
Aug 26, 2012
Messages
123
To be more general... :
  • Events
    • Unit - A unit Dies
  • Conditions
  • Actions
    • Game - Display to (All players) the text ((Name of (Owner of (Killing unit))) + "'s " + (Name of (Killing unit) + " has just killed " + (Name of (Owner of (Dying unit))) + "'s " + (Name of (dying unit)))
Use proper name to write hero's name (e.g. Halak the Lifebringer), or use name of (unit) to write hero's type (e.g. Paladin)...
(Well, maybe late, but just adding...)
 
Status
Not open for further replies.
Top