• 🏆 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!

Timer and Dialog box Trigger

Status
Not open for further replies.
Level 7
Joined
Dec 13, 2013
Messages
151
Hello! I am making a multiplayer altered melee map and I would like to have it so that in the beginning (when the match first starts) a Timer begins that says "The match will begin in 30 seconds." In addition, during that time I would also like to have it so a dialog box appears for each player where they can choose what race they want to play. After choosing, they are unable to do anything until the match starts. Then once the match has started all players (including computers) can proceed with the match.

I know how to do the dialog box part but I am unsure about how to do the timer as well as stopping all actions during that time. Could anyone help me with this?
 
Level 13
Joined
May 10, 2009
Messages
868
You need two variables - a timer and a timer window. Start the timer, then create a window referencing that timer variable. As soon as the timer expires, you destroy the window and do the rest (close/hide dialog and decice what will happen to the players that didn't choose anything, etc)

  • StartTimer
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start Timer as a One-shot timer that will expire in 30.00 seconds
      • Countdown Timer - Create a timer window for Timer with title The match will begi...
      • Set TWindow = (Last created timer window)
      • -------- Show dialog and do some other stuff --------
  • TimeUp
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • -------- Remove the timer window --------
      • Countdown Timer - Destroy TWindow
      • -------- Do your things here --------
 
Level 7
Joined
Dec 13, 2013
Messages
151
Oh nice! Is there a way I can name the timer so that it will say something like "Match begins in..." ? Also do you know how I can make it so players and computers are unable to do anything for the first 30 seconds (other than players choosing their race selection at the dialog box)?

Edit: I just realized you posted how to put a title in the triggers you posted. Sorry I haven't slept yet XD
 
Last edited:

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
The title in Create Timer window can be set to "match begins in ...", though I think the timer windows is quite small so you should keep it short.
To disable user control use:
  • Cinematic - Disable user control for (All players)
To disable computer control you can pause their units for example.
 
Status
Not open for further replies.
Top