[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Spells


Reply
 
Thread Tools
The Hive Workshop Spells:
Hero Revive system w/ timer v0.2
Images
Highslide JS
Details
Uploaded:03:38, 3rd Aug 2012
Last Updated:15:04, 19th Sep 2012
Keywords:timer,revive,hero,system,death,dead,hero,dota,pack
Type:System
Category:GUI / Triggers

This map Show your hero revive timer.

Remove leaks
Rating - 0.00 (0 votes)
(Hover and click)
Moderator Comments
Not Rated
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.

This spell is awaiting update.


Download Hero Revive with Timer.wex.w3x
(19.02 KB, 240 Downloads)

Old 08-03-2012, 04:21 AM   #2 (permalink)
Registered User -Derp-
User
 
-Derp-'s Avatar
 
Join Date: Jun 2011
Posts: 165
-Derp- is just really nice (296)-Derp- is just really nice (296)-Derp- is just really nice (296)-Derp- is just really nice (296)-Derp- is just really nice (296)
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.

Sorry bud. :s

I'm going to throw a few tutorials your way:
Things That Leak
Quick Tutorial - Common Triggering Tips
MUI Triggers with Waits
How to: Create Spells in GUI - The Beginning
How to get your GUI spell approved
-Derp- is offline   Reply With Quote
Old 08-03-2012, 04:23 AM   #3 (permalink)
Registered User Tank-Commander
Most spells/systems
 
Tank-Commander's Avatar
 
Join Date: May 2009
Posts: 1,204
Tank-Commander is a glorious beacon of light (449)Tank-Commander is a glorious beacon of light (449)Tank-Commander is a glorious beacon of light (449)Tank-Commander is a glorious beacon of light (449)Tank-Commander is a glorious beacon of light (449)Tank-Commander is a glorious beacon of light (449)
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.
__________________
Tank-Commander is online now   Reply With Quote
Old 08-07-2012, 01:54 PM   #4 (permalink)
Registered User eubz
Whatever
 
eubz's Avatar
 
Join Date: Mar 2011
Posts: 2,598
eubz is a splendid one to behold (852)eubz is a splendid one to behold (852)eubz is a splendid one to behold (852)eubz is a splendid one to behold (852)eubz is a splendid one to behold (852)
Hello, you can also read this to aid you in your quest.
__________________
eubz is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 07:48 PM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle