• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] 2 questions about dialogs/timers

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
First. I would like to get a countdown timer inside a dialog window. I know this is possible, but i do not know how to do it.

Second. I have a dialog system that is shown for a certain two players. Once it is shown, nothing happens until you select a dialog (these buttons work). This is what I have so far:
  • Events
    • Time - timer expires
  • Conditions
  • Actions
    • Unit - Pause all units
    • Player Group - Pick every player in LightPlayers and do (Camera - Pan camera for (Picked player) to (Center of Camera <gen>) over 2.00 seconds)
    • Player Group - Pick every player in LightPlayers and do (Camera - Set the camera bounds for (Picked player) to Area <gen>)
    • Unit - Set life of theduelunitdark to 100.00%
    • Unit - Set life of theduelunitlight to 100.00%
    • Unit - Set mana of theduelunitlight to 100.00%
    • Unit - Set mana of theduelunitdark to 100.00%
    • Unit - Remove All buffs from theduelunitdark
    • Unit - Remove All buffs from theduelunitlight
    • Wait 2.00 seconds
    • Dialog - Show Duelists for (Owner of theduelunitlight)
    • Dialog - Show Duelists for (Owner of theduelunitdark)
    • Countdown Timer - Start Duel_Timer as a One-shot timer that will expire in 10.00 seconds
    • Wait 8.00 seconds
    • Dialog - Clear Duelists
Another problem arises there that this is a repeating event. Everytime that timer ends, this event occurs. The problem (the problem being, the dialog freezes and nothing is shown, except for an empty dialog box.)occurs after the first time this event fires.

Any suggestions?
 
Level 8
Joined
Aug 4, 2006
Messages
357
if i am understanding you correctly, you want to have the current time of a countdown timer in a window that the 2 players can see. you do not want a dialog window for this. dialogs are windows that pop up and keep you from doing anything until you click on one of its buttons. if you show a dialog that you have cleared all the buttons from, it will basically stop your game from progressing until you hit alt-f4.

what you want is a countdown timer window:
  • Events
    • Time - timer expires
  • Conditions
  • Actions
    • Unit - Pause all units
    • Player Group - Pick every player in LightPlayers and do (Camera - Pan camera for (Picked player) to (Center of Camera <gen>) over 2.00 seconds)
    • Player Group - Pick every player in LightPlayers and do (Camera - Set the camera bounds for (Picked player) to Area <gen>)
    • Unit - Set life of theduelunitdark to 100.00%
    • Unit - Set life of theduelunitlight to 100.00%
    • Unit - Set mana of theduelunitlight to 100.00%
    • Unit - Set mana of theduelunitdark to 100.00%
    • Unit - Remove All buffs from theduelunitdark
    • Unit - Remove All buffs from theduelunitlight
    • Countdown Timer - Start Duel_Timer as a One-shot timer that will expire in 10.00 seconds
    • Countdown Timer - Create a timer window for Duel_Timer with title Countdown Timer
    • Set timerWindow = (Last created timer window)
    • Countdown Timer - Show timerWindow
    • Wait 2.00 seconds
    • Dialog - Show Duelists for (Owner of theduelunitlight)
    • Dialog - Show Duelists for (Owner of theduelunitdark)
    • Wait 8.00 seconds
    • Countdown Timer - Destroy timerWindow
i'm not sure what your "Duelists" dialog buttons are, but you should probably clear the dialog in response to one of the buttons being clicked, not at the end of this trigger.
also, if the event of this trigger actually reads "Time - timer expires", this means that the trigger will run whenever a timer called "timer" expires. since the timer you used in this trigger is called "Duel_Timer", the event should not repeat.

i hope this helps! :thumbs_up:
 
Level 9
Joined
Jun 7, 2008
Messages
440
Ya thats all fine and dandy. But what im saying is. The countdown timer that expires in 10 seconds, i want to be displayed INSIDE the dialog "duelists". Once the "Duel-Timer" expires the game progresses the same as it should. Basically This event is a duel part of the map. And the point of "duelists" is to see if the heros want to fight. There are a few selections on it where if you select something different, then an alternate route occurs - this works fine.

As to your second part. I have a few triggers that follow this one. But to get to the point. At the end of each trigger (each trigger is one of the alternates i was talking about) it will start the "timer - timer" again. It HAS to be restarted as it is the point of the game.
 
Status
Not open for further replies.
Top