10:19, 3rd Aug 2012
Magtheridon96: This needs a lot of work.
Instead of the wait, you should use the timer expiration event.
Also, why are you showing and hiding the timer for specific players?
Why not show it to the owner of the triggering unit instead?
By the way, instead of (Dying unit), use (Triggering unit).
It's faster and cleaner.
And instead of constantly repeating function calls like (Triggering unit) and (Last created timer dialog), store those into variables to reuse in the rest of the trigger.
Check this tutorial out to learn more about leaks because it seems that you are not clearing them.
edit
You still have leaks, and you should not be using that wait.
Tip: Post your trigger in [trigger][/trigger] tags next time.
Trigger
Revival Copy
Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True (Race of (Owner of (Dying unit))) Equal to Human
Actions
Game - Display to (All players) the text: (Name of (Owner of (Killing unit))) Game - Display to (All players) the text: |c00F1E22EKilled|r Game - Display to (All players) the text: (Name of (Owner of (Dying unit))) Game - Display to (All players) the text: (Name of (Owner of (Dying unit))) Game - Display to (All players) the text: (String((Real(((Hero level of (Dying unit)) x 4))))) Countdown Timer - Show (Last created timer window) for Player 1 (Red) Countdown Timer - Show (Last created timer window) for Player 2 (Blue) Countdown Timer - Show (Last created timer window) for Player 3 (Teal) Countdown Timer - Hide (Last created timer window) for Player 4 (Purple) Countdown Timer - Hide (Last created timer window) for Player 5 (Yellow) Countdown Timer - Hide (Last created timer window) for Player 6 (Orange) Countdown Timer - Hide (Last created timer window) for Player 7 (Green) Countdown Timer - Hide (Last created timer window) for Player 8 (Pink) Countdown Timer - Hide (Last created timer window) for Player 9 (Gray) Countdown Timer - Hide (Last created timer window) for Player 10 (Light Blue) Countdown Timer - Hide (Last created timer window) for Player 11 (Dark Green) Countdown Timer - Hide (Last created timer window) for Player 12 (Brown) Countdown Timer - Create a timer window for (Last started timer) with title Will Revive in.. Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in ((Real((Hero level of (Dying unit)))) x 4.00) seconds Wait ((Real((Hero level of (Dying unit)))) x 4.00) seconds Countdown Timer - Destroy (Last created timer window) Player Group - Pick every player in (All allies of (Owner of (Killing unit))) and do (Actions)
Loop - Actions
Player - Add 250 to (Picked player) Current gold
Hero - Instantly revive (Dying unit) at (Center of Region 000 <gen>), Show revival graphics Camera - Pan camera for (Owner of (Reviving Hero)) to (Position of (Reviving Hero)) over 0.00 seconds
Alright, with that being said the triggers leak two locations.
Hero - Instantly revive (Dying unit) at (Center of Region 000 <gen>), Show revival graphics Camera - Pan camera for (Owner of (Reviving Hero)) to (Position of (Reviving Hero)) over 0.00 seconds
The countdown timer hide/show could be done with a loop, and the system isn't MUI.
With that being said, there's more efficient and configurable revival systems out there.
You do realise with two triggers you could achieve the same thing but not with a wait in it?
Also this works with only one hero per player, which I guess is to be assumed, however if they do have more than one then it will glitch it, and additionally, the wait is not acurrate.