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

Announcement. A player killed a player, like DotA

Status
Not open for further replies.
Level 4
Joined
Jul 18, 2008
Messages
76
Hi guys, i need some help again.

I need to make a trigger that says this when a hero kills another hero.

<Name of killing player> (<name of his hero>) killed <name of dying player> (<name of his hero>)

every1 should see the message.

I hope u can make it for me, or atleast tell me how to!

Thank you!
 
  • Events
    • Unit - a unit dies
  • Conditions
    • Bool ( Unit is a hero (equal to true))
  • Actions
    • Game - Display to (all players) The text GetPlayerName(GetOwnerofunit(GetKillingUnit()))+ " (" + (GetUnitName(GetKillingUnit())) + ")" + " Has killed " + (GetPlayerName(GetOwnerofunit(GetTriggeringUnit()) + " (" + (GetUnitName(GetTriggeringUnit())) + ")"
Alot of code, i know, but just use alot of "Concentrate strings" and you should be able to do it, make sure you use the spaces in the " (" 's and stuff.
 
Level 4
Joined
Jul 18, 2008
Messages
76
-

Thanks man! Before i start creating that trigger, i must know..

The text in the trigger, is it all written by yourself, like "GetPlayerName(GetOwnerofunit(GetKillingUnit()))+ " (" + (GetUnitName(GetKillingUnit())) + ")"
and so on..

?

Thank u alot for helping me!
 
Level 4
Joined
Jul 18, 2008
Messages
76
thanks for the info, but i dont want a template that many others are using.

My project is already huge and i need everything to be "handmade" :)

Just got a little problem with the more advanced triggers that i couldnt learn by myself.
 
meh, i'm too lazy to show you, if you want, paste this into custom script section

  • Custom script - call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetKillingUnitBJ())) + ( "( " + ( GetUnitName(GetKillingUnitBJ()) + ( " )" + ( " Has killed: " + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + ( " (" + ( GetUnitName(GetTriggerUnit()) + ")")))))))))
Or

  • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + (( + ((Name of (Killing unit)) + ( ) + ( Has killed: + ((Name of (Owner of (Triggering unit))) + ( ( + ((Name of (Triggering unit)) + )))))))))
 
Status
Not open for further replies.
Top