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

[JASS] Timerdialog doesn't show up

Status
Not open for further replies.
Level 17
Joined
Sep 8, 2007
Messages
994
Title says it. Here's the code, don't know what's wrong:
JASS:
globals
     private constant real SELECTION_TIME = 5.
     private timer t
     private timerdialog td
endglobals

function StartHeroSelection takes nothing returns nothing
      set t = NewTimer()
      set td = CreateTimerDialog(t)
      call TimerDialogSetTitle(td, "Time to choose ")
      call TimerDialogDisplay(td, true)
      call TimerStart(t, SELECTION_TIME, false, function onCountdown)
endfunction

The function will be called, same for the onCountdown function. Already checked that. The timerdialog's handleId is not 0 as well. Any idea?
 
Level 17
Joined
Sep 8, 2007
Messages
994
Maybe it needs buttons in order to get displayed?

It's not a dialog with buttons, but the frame with a caption made for a timer. I know, it is confusing that it's called timerdialog, it should be something like timerwindow ...

Can you display it at "map initialization" ?
I thnik you must delay it.

looks like you're right. Can't be used at map init. Thank you.
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Jass is so random anyway.

Well, i'm still not sure if you can create them at map init, but just not display it (i never cared to test it).
It would make sense if it's the case.

Because well it's hard to display something during map init, right ?
 
Status
Not open for further replies.
Top