• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

Countdown timer issue

Status
Not open for further replies.
Level 15
Joined
Oct 29, 2012
Messages
1,474
Here it is, it's a very simple trigger , I don't know why this timer window doesn't show the counting down.
  • Revive Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Unit Group - Add (Dying unit) to RevivableHeroes
      • Set TempReal = (((Real((Level of (Dying unit)))) x 1.50) + 5.00)
      • Countdown Timer - Start ReviveTimers[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in TempReal seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title (Name of (Owner of (Dying unit)))
      • Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))
      • Set RevivableTimersWindows[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
 
Here it is, it's a very simple trigger , I don't know why this timer window doesn't show the counting down.
Setting it to 12 in the variable editor will work.
Alternatively do this. But you would need to destroy the old timer when it is done when using the below method.
  • Revive Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Unit Group - Add (Dying unit) to RevivableHeroes
      • Set TempReal = (((Real((Level of (Dying unit)))) x 1.50) + 5.00)
      • Countdown Timer - Start ReviveTimers[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in TempReal seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title (Name of (Owner of (Dying unit)))
      • Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))
      • Set RevivableTimersWindows[(Player number of (Owner of (Dying unit)))] = (Last created timer window)

Countdown Timers must be made at map init or with custom script. Try this.
  • Revive Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Unit Group - Add (Dying unit) to RevivableHeroes
      • Set TempReal = (((Real((Level of (Dying unit)))) x 1.50) + 5.00)
      • Set TempInteger = (Player number of (Owner of (Dying unit)))
      • Custom script: set udg_ReviveTimers[udg_TempInteger] = CreateTimer()
      • Countdown Timer - Start ReviveTimers[udg_TempInteger] as a One-shot timer that will expire in TempReal seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title (Name of (Owner of (Dying unit)))
      • Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))
      • Set RevivableTimersWindows[udg_TempInteger] = (Last created timer window)
 
Level 28
Joined
Sep 26, 2009
Messages
2,548
Or you can increase the "size" value in variable editor - the "size" affects how many timers are initialized as well (tho it's better to use custom script and create timer when you need it, instead of limiting yourself to pre-set value in variable editor)
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
Or you can increase the "size" value in variable editor - the "size" affects how many timers are initialized as well (tho it's better to use custom script and create timer when you need it, instead of limiting yourself to pre-set value in variable editor)

How is that ?

EDIT : I increased its size and the time isn't showing yet

EDIT 2 : After I changed the arrayed timer with another one which is not arrayed, it seems to show fine, what would be the problem because I need an arrayed timer :/
 
Or you can increase the "size" value in variable editor - the "size" affects how many timers are initialized as well (tho it's better to use custom script and create timer when you need it, instead of limiting yourself to pre-set value in variable editor)

I already said this in my above post.

How is that ?

EDIT : I increased its size and the time isn't showing yet

EDIT 2 : After I changed the arrayed timer with another one which is not arrayed, it seems to show fine, what would be the problem because I need an arrayed timer :/

What did you increase the arrayed variable to ? It needs to be increased to as many as you are using. For this 12 will be fine.
 
How much would its leak affect on the gameplay ?
And yes I destroy them since I use them once

Same as every other leak.

Also you do not need to destroy them if you reuse them. That means that you can't use the custom script I showed you. Do not destroy them and do not use the custom script to create them and set the array to 12 in the variable editor if you are reusing them.
 
Status
Not open for further replies.
Top