First idea of the trigger (yep, one trigger should do)
Trigger Events Unit - A unit Dies Conditions ((Dying unit) is A Hero) Equal To True Actions Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + (has been killed by + (Name of (Owner of (Killing unit))))) Wait ((Real((Hero level of (Dying unit)))) x 3.00) seconds Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), showing revival graphics
Hope you're able to rebuild it, b/c I don't have time to explain everything. Dunno if the trigger could mix-up with multiple players, didn't test it. But I don't think so.
Ok for the trigger when you died u use like this: Events: A unitdies COnditions: Dying unit is a hero equal to true. Actions: We will use If/then/else-Multiple Functions: If(All conditions are true)then do(Then ACtions) else do (actions) If-COnditions Hero Level of Dying Units equal to 1(for example) Then actions: Wait 3 seconds Instantly revive dying units at the-region you want- show revival grapshics Else Actions Do nothing You will do the same thing for all levels and u will change level of dying units and the time to wait to revive. Thats it , i hope u understanded
~~~Darky~~~ Uh sorry to be such a dunce/noob, and I know you said you don't have time to explain, but I seriously don't see half of those triggers.
Trigger Events Unit - A unit Dies Conditions ((Dying unit) is A Hero) Equal To True Actions Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + (has been killed by + (Name of (Owner of (Killing unit))))) Wait ((Real((Hero level of (Dying unit)))) x 3.00) seconds Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), showing revival graphics
Green - I understand/have. Yellow - Not sure about;I only see half of this trigger. Red - Seriously lost, cannot find anywhere...
About the Display Text one, I got the first half, but the part about, "((Name of (Owner of (Dying unit))) + (has been killed by + (Name of (Owner of (Killing unit)))))" I didn't try it out, but do I just copy and paste that into what the text displays? o_O
Damn and for Excite... I don't get this part of the trigger... "If-COnditions Hero Level of Dying Units equal to 1(for example) Then actions: Wait 3 seconds Instantly revive dying units at the-region you want- show revival grapshics "
First to this one: Wait ((Real((Hero level of (Dying unit)))) x 3.00) seconds
It's simply a wait-action. For the time, first you select the function Arithmetic (should already be selected). You change the + to a x and then one of the 1.00 to 3.00. Select the other 1.00 and search for a function called like "Convert - Convert Integer To Real". For the value, you simply select "Hero - Hero Level"
Done!
Now to the yellow one:
What you need is the function "Concatenate Strings" There you have sth like "String1 + String2". For string1, you select the function "Player - Player Name" and as player, you select "Owner of Unit". For String2, you once again select "Concatenate Strings" so you have one more "String1 + String2"-thingie. Here for String1 you simply type " has been killed by " (care for the space I made in front of "has" and after "by"). For String2, you once again build that name-function, but instead of "Dying Unit" you select "Killing Unit" this time.
Nice! Nice! Nice! I found all the trigger stuff. Thanks for explaining it more.
One more quick thing, if I wanted a player to loose gold when he is killed, should I just add in a trigger that takes gold away from the (Owner of the (Dying Unit))? And another one to give gold to the player who killed?
FookinIdiot Hm...I have a few things I really want to incorperate into my map...they're in DotA but I have NO clue how to do them, I'm so confused.
First I kinda want the thing where when a hero dies, it actually says on the screen
" John has been killed by Larry..."
Only thing I can get it to do is " Yellow has been slain..."
Leopard: this is the algorithm, but sory, i can't write it in map trigger template. I hope it really explaining.
events: a unit dies
condition: check - if killing unit is enemy against killed unit - if killed unit is a hero
actions: Do - Display text to AllPlayers "Name of (Owner of Killed Unit)" has been killed by "Name of (Owner of Killing Unit)"
Note: Triggering unit = Killed Unit
===== Second. I'd REALLY (That is, I would be in eternal debt) be greatful if someone helped me do a trigger where when you die, depending on your hero's level, you respawn in a certain amount of time. Like in DotA: Level 1 - 3 sec Level 2 - 6 sec Level 3 - 9 sec Level 4 - 12 sec Level 5 - 15 sec Level 6 - 18 sec Level 7 - 21 sec Level 8 - 24 sec Level 9 - 27 sec Level 10 - 30 sec Level 11 - 33 sec Level 12 - 36 sec Level 13 - 39 sec Level 14 - 42 sec Level 15 - 45 sec Level 16 - 48 sec Level 17 - 51 sec Level 18 - 54 sec Level 19 - 57 sec Level 20 - 60 sec Level 21 - 63 sec Level 22 - 66 sec Level 23 - 69 sec Level 24 - 72 sec Level 25 - 75 sec
Leopard: You shouldn't make a trigger with 25 "if case" to make this one. It really costs much.
The thing you should do is making trigger so that the hero will revive in "multiple of 3" second
so that, events: a unit dies
condition: triggering unit is a hero
actions: - Set Variable -Unit Array Tipe that consist of 12 element, since there are 12 players max- with triggering unit. - start timer (3 x Level of triggering unit). The timer must be in array variable of 12 element too, with index is the player number
Now you just make a trigger with events if the timer expires, and revive the hero in Unit Array with same index.
Sorry my english is bad, hope you understand my explanation.
(Apologies for all this spam...I wanted to make sure you guys knew what I was talking about)
Hm, the only problem is that the heroes seem to be reviving based on just their level, not three times their level. So if I have a level 7 hero, I revive in 7 seconds, instead of 21. I might not have done it right...does it matter which number I changed to a 3?
And one more thing, is there a way to get the color of the players' names who killed, have been killed, to match with their color in game? Instead of it all being white.
Sorry if you don't understand what I'm saying, I'm in a rush, please help out.
Okay for the revive time is layed it out by going through the steps to get where you wanna go
Actions
Wait (1.00 + 1.00) seconds
Wait (3.00 x 1.00) seconds
Wait (3.00 x Convert Integer to Real) seconds
Wait (3.00 x (Real((Level of (Dying unit))))) seconds
That is how it changes as you add each additional piece, and to prevent problems with multiple units reviving like the other guy said use an array variable, since if you just go dying unit the whole way through if another unit die while he is reviving he will never come back. So as he dies make it store the unit in an array that would be filled(the number that dictates which piece of the array) by putting in the player number of the owner of the dying unit. Thats the best way. for my map i just did 10 seperate little triggers, it may be bulky but I'm guarranteed it will alays work
Ok... I read all the posts but my account is bugged and it wouldn't let me log in till now...
OK here the the triggers...
(getting your messages when heroes die)
Event Unit dies
(so whenever a unit dies)
Condition Dying unit is a hero equal to true
(so the dying unit has to be a hero for this to work)
Action YOU WILL HAVE TO GO INTO 3 STRINGS string 1 = name of owner of killing unit string 2 = (space)has been killed by(space) string 3 = name of owner of dying unit
you find these triggers by going to the following string 1 - firstly go to the tab that should say constant strings, change that to player name so it should look like this:
Name of triggering player
Click on the triggering player and change it to the owner of unit tab
so it should look like this:
Name of owner of triggering unit
click on the triggering unit part and change it to dying unit
STRING 2 - just type it in (dont forget to put spaces in)
String 3 - same as string 1 except change dying unit with killing unit
IF YOU CANT FIND WHERE THE "STRINGS" ARE THEY LOOK LIKE THIS:
when you open the game - text message tab it will look like this:
Display to all players the text: Text Click on the last text (one in red) and it will look like this:
String 1 + String 2
Click on string 1 and it should look the same in the one you just created do the same again and you have created your 3 tabs now just do what i said above and you should be able to make that trigger....
OK NOW FOR THE REVIVAL TRIGGER
Event Unit dies (explained above)
Condition Dying unit is a hero equal to true (explained above)
Action OK... this is more tricky
firstly go to the wait one..
Click on the "2 seconds"
Change it to arithmetic (first one)
It should look like this:
1.00 + 1.00
Click on the first "1.00" and do the following
go down to the "Convert Integer to Real"
So it should look like this:
Real(point value of footmen)
click on the "point value of footman and then change it to "Hero - Hero level
So it will look like this:
Hero level of triggering unit
change the triggering unit tab to dying unit then press enter 3 times so that you are back to the arithmetic bit. should look like this now:
Real(Hero level of dying unit) + 1 change the pluss to a times by clicking on it and change the 1 to a 3 by clicking on it
SO IT SHOULD LOOK LIKE THIS:
Wait (Real(Hero level of dying unit) x 3) seconds
Now make another action:
revive dying unit instantly at center of (the region you want)
THATS IT, Took a while to write... I hope you understand it. If you have any other questions or cant find something just pm me...
FookinIdiotHm, the only problem is that the heroes seem to be reviving based on just their level, not three times their level. So if I have a level 7 hero, I revive in 7 seconds, instead of 21. I might not have done it right...does it matter which number I changed to a 3?
hmm you just need to start timer equal to (level of hero * <integer as a multiplier>)
And one more thing, is there a way to get the color of the players' names who killed, have been killed, to match with their color in game? Instead of it all being white.
Sorry if you don't understand what I'm saying, I'm in a rush, please help out.
You can use HTML code in this case. first you must know the HTML code for color each player (12 color max).
The one easiest way to get them, you just need graphics manipulation application such as adobe photoshop. then open the color palette. You can see the HTML code for each color that you pick in the bottom right corner field, like "#FFFFFF". That is you must pick 12 color and note all those code. Notice that you can pick color by defining R, G, B value, and warcraft player color has simple RGB value, such as R:255 G:0 b:0 for full red, and
each value only simple divide of 255, like 1, 1/2, or 1/4.
After you write those down, you need to store it in array of string, again contents 12 elements. store it like this:
|xxxxxx (CMIIW)
(If i wrong, just check ability tab on object editor, and see the coloring of ability shortcut. it looks like |xxxxxx + <string> + |r )
xxxxxx is the HTML code (ignore the # sign)
and then you just concate the string when the hero die with