- Joined
- Jan 1, 2013
- Messages
- 9
unneccesary debug in RevRevive.
RevInit
Events
Map initialization
Conditions
Actions
Hashtable - Create a hashtable
Set Hash = (Last created hashtable)
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Custom script: if udg_RTIM[bj_forLoopAIndex] == null then
Custom script: set udg_RTIM[bj_forLoopAIndex] = CreateTimer()
Custom script: endif
Trigger - Add to RevRevive <gen> the event (Time - RTIM[(Integer A)] expires)
RevHeroDie
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Set i1 = (Player number of (Triggering player))
Set RHER[i1] = (Triggering unit)
Countdown Timer - Start RTIM[i1] as a One-shot timer that will expire in 3.00 seconds
Custom script: if udg_RWIN[bj_forLoopAIndex] == null then
Countdown Timer - Create a timer window for RTIM[i1] with title (Proper name of (Triggering unit))
Set RWIN[i1] = (Last created timer window)
Countdown Timer - Hide RWIN[i1]
Custom script: endif
Countdown Timer - Show RWIN[i1] for (Triggering player)
Custom script: call SaveInteger(udg_Hash, GetHandleId(udg_RTIM[udg_i1]), 0, udg_i1)
RevRevive
Events
Conditions
Actions
Custom script: set udg_i1 = LoadInteger(udg_Hash, GetHandleId(GetExpiredTimer()), 0)
Game - Display to Player Group - Player 1 (Red) for 2.00 seconds the text: (String(i1))
Set TempLoc = (Random point in Region 000 <gen>)
Hero - Instantly revive RHER[i1] at TempLoc, Show revival graphics
Countdown Timer - Hide RWIN[i1]
Custom script: call RemoveLocation(udg_TempLoc)
http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/
leaks over and over again
Revive
Events
Unit - A unit Dies
Conditions
((Triggering unit) belongs to an ally of Player 1 (Red)) Equal to True
((Triggering unit) is A Hero) Equal to True
Actions
Countdown Timer - Start Revive1 as a One-shot timer that will expire in ((Real((Hero level of (Triggering unit)))) x 3.00) seconds
Countdown Timer - Create a timer window for Revive1 with title Hero Revival:
Countdown Timer - Show (Last created timer window) for (Owner of (Triggering unit))
Wait (Remaining time for Revive1) seconds
Hero - Instantly revive (Triggering unit) at (Center of Bot Hero <gen>), Hide revival graphics
Camera - Pan camera for (Owner of (Triggering unit)) to (Position of (Triggering unit)) over 0.00 seconds
Countdown Timer - Destroy (Last created timer window)
-------------------------------------------------------------------------
here's the changes iv'e made when i deleted the three lines everything is all good now tnx for the help
yes your'e right even i tried using individual variables or triggers the leak is still there
i am trying to solve this, i think the problem is multiple heroes death uses only one timer
which means the:
Countdown Timer - Show (Last created timer window) for (Owner of (Triggering unit))
triggers all players
example:
two players die at once the timer will create two timers and show to the owner of dying unit which means both of them can see the timer and there is only one:
Countdown Timer - Destroy (Last created timer window)
which only removes one timer and the other stays