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

Hero Revive system w/ timer v0.2

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This map Show your hero revive timer.

Remove leaks

Keywords:
timer,revive,hero,system,death,dead,hero,dota,pack
Contents

Hero Revive with Timer (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 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...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

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.
 
Level 11
Joined
Jun 28, 2011
Messages
540
Tip: Post your trigger in [trigger][/trigger] tags next time.

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

Sorry bud. :s

I'm going to throw a few tutorials your way:
http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
http://www.hiveworkshop.com/forums/...quick-tutorial-common-triggering-tips-190802/
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/mui-triggers-waits-218354/
http://www.hiveworkshop.com/forums/...s-279/how-create-spells-gui-beginning-201867/
http://www.hiveworkshop.com/forums/...s-279/how-get-your-gui-spell-approved-207625/
 
Top