Also, I have a unit that spawns. i want to revive that unit if they click the dialog item to do so. However since the event is dialog item is clicked, I cant use triggering unit to revive the unit. So how do I revive it? I also solved the dialog not showing up problem so dont worry about that.
Sounds like you need to store the unit as a global variable for your problem. Then you can refer to the unit whenever you want. I think what most people are doing nowadays though is just never letting the hero die, just hiding it until it respawns, or in your case, they click on said dialog. Can do that pretty easily with a modified kerrigan never die behavior.
Well, to be more specific, the variable is just plain deleted after whatever function/trigger it was in is done running. It is recreated every time you run said function/trigger, but can only be used there unless you pass it at some point inside your function/trigger to a different function/global variable. So long story short, just use a fricking global variable, lol.
Yea i knew that I just couldnt explain it in understandable manners since english isnt my main language :P
Anyways, local variables are useful when you need to run the same trigger many times at the same time.
Every instance of the trigger will create its own local variables. Therefore avoiding any conflict.
"Variable - Set respawn unit[(Triggering player)] = (Last created unit)"
You didn't create a unit, so this variable is still empty. You need to set the hero to the variable in the same trigger it is created in
EDIT: Also, that event... Will not work in multiplayer and totally mess things up. What is it supposed to achieve? Right now it will only fire for player number (players on team 1)
In other words, if you have 3 players on team 1, that event will only fire if player 3 presses the button.
If you want to restrict the use of the trigger to one team only, check whether the triggering player is in player group (Players on team x)
EDIT 2: Also, player numbers aren't the same as lobby location, so player 3 doesn't even have to be on team 1.
oh, well what i was trying to achieve is when a player's hero dies, i want to make a dialog appear to either revive the hero or pick a new hero (which they use a probe for) and i put the team 1 thing there because if the hero is on a player of team 1, then the hero will spawn in a different place then the one on team 2.
"Last Created Unit" refers to the last "Creat Unit" action, and nothing else. If you want the unit that caused the event, you have to use "Created Unit" (When you select a function/action, there is text in the box below. Read when you are using such functions, it will make things clearer)
also, "And" is the default state for conditions, so if you just list many conditions, they ALL have to be true, whether you use And or not. If you want only 1 condition to be true, use "Or" and list them all there. If you do that, THEN you use "And" if you want a few conditions to count as in 1 the "Or" list.