Timer Window has no "Time" and never disappears

Jolly chap*

New Member
Reaction score
34
Hi. I'm in a spot of trouble right now with this hero countdown timer window trigger. So the problem is this: the timer window appears for the appropriate player but that's just it. The window appears but there's no time.

There's also another problem with this, as the window is never removed. :nuts:

Is there anyway to fix these problems? I'm not very adept at timer windows and these kinds of things.

This trigger is the one that commences the timer.
Code:
Revive
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Countdown Timer - Start Dead_Hero_Timer[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in (Real((Level of (Dying unit)))) seconds
        Countdown Timer - Create a timer window for (Last started timer) with title Revive in:
        Set Dead_Hero_Window[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
        Countdown Timer - Hide (Last created timer window)
        Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))

This is one of the triggers to hide the timers for the players.
Code:
Death Blue
    Events
        Time - Dead_Hero_Timer[2] expires
    Conditions
    Actions
        Countdown Timer - Hide Dead_Hero_Window[2]

Thanks in advance and +rep to those who help as well. :D
 

Razed

New Member
Reaction score
44
Perhaps use 'For All of Integer A (1 to 12) -- Countdown Timer - Hide Dead_Hero_Window[Integer A]' Instead of using 2 (assuming you are Player 1).

Just hand written
 

Jolly chap*

New Member
Reaction score
34
Actually, when the Hero dies, the timer window is shown only for the owner of the dying unit. But if you're the owner of the dying unit, the timer window never disappears ... and there's no countdown timer in the window at all as well. -_- I don't know what to do anymore. :(
 

Razed

New Member
Reaction score
44
Instead of preplacing your Event in the second trigger you could create an Trigger Action at the end of your first trigger with:

Code:
Triggers - Create an event for (Death Blue) with Events
        Time - Dead_Hero_Timer[(Player number of (Owner of (Dying unit)))] expires
 

Jolly chap*

New Member
Reaction score
34
@AceHart: Does the array size matter for this? I'll try though.
@Razed: I will try your solution too. :)
 

Jolly chap*

New Member
Reaction score
34
I got it working anyway. Thanks for the help though. Here's what I did.

Code:
Revive
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Countdown Timer - Start Dead_Hero_Timer[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in (Real((Level of (Dying unit)))) seconds
        Countdown Timer - Create a timer window for (Last started timer) with title Revive in:
        Countdown Timer - Hide (Last created timer window)
        Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))
        Set Dead_Hero_Window[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
        Wait (Real((Level of (Dying unit)))) seconds
        Set Temp_Location = (Position of (Dying unit))
        Countdown Timer - Destroy Dead_Hero_Window[(Player number of (Owner of (Dying unit)))]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
            Then - Actions
                Hero - Instantly revive (Dying unit) at (Center of Safe 1 <gen>), Hide revival graphics
                Special Effect - Create a special effect attached to the origin of (Dying unit) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
                Special Effect - Destroy (Last created special effect)
                Wait 0.01 seconds
                Camera - Pan camera for (Owner of (Dying unit)) to Temp_Location over 0.00 seconds
            Else - Actions
                Hero - Instantly revive (Dying unit) at (Center of Safe 2 <gen>), Hide revival graphics
                Special Effect - Create a special effect attached to the origin of (Dying unit) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
                Special Effect - Destroy (Last created special effect)
                Wait 0.01 seconds
                Camera - Pan camera for (Owner of (Dying unit)) to Temp_Location over 0.00 seconds
        Custom script:   call RemoveLocation(udg_Temp_Location)

Just one trigger makes a difference, huh?
 

Razed

New Member
Reaction score
44
Just a quick notice... with your current trigger the Heroes will be revived instantly after death (no more timer). Are you sure that this is what you want?
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Just a quick notice... with your current trigger the Heroes will be revived instantly after death (no more timer). Are you sure that this is what you want?

Are you looking at his trigger right? If Then Else is placed after his wait, the the hero will be revived after the wait which ='s the timers count down.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top