Creating a timed dialog box

Zaraf

New Member
Reaction score
22
I want to have dialog boxes for red player, that if he doesn't click on it within 10 seconds, it defaults to one of the options. I've tried various things, but they don't seem to work :( Anyone know how I can do this? :) Thanks!
 

Galdiuz

Creator of Photon Command
Reaction score
98
This is the trigger i use for my map
Code:
Difficulty Dialog
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Dialog - Change the title of Difficulty_Dialog to |c0000cdf9Pick Diff...
        Dialog - Create a dialog button for Difficulty_Dialog labelled |cff0099FFVery Easy...
        Set Difficulty_Button[1] = (Last created dialog Button)
        Dialog - Create a dialog button for Difficulty_Dialog labelled |cff00FF00Easy (35 ...
        Set Difficulty_Button[2] = (Last created dialog Button)
        Dialog - Create a dialog button for Difficulty_Dialog labelled |cffFFFF00Normal (2...
        Set Difficulty_Button[3] = (Last created dialog Button)
        Dialog - Create a dialog button for Difficulty_Dialog labelled |cffFF9900Hard (10 ...
        Set Difficulty_Button[4] = (Last created dialog Button)
        Dialog - Create a dialog button for Difficulty_Dialog labelled |cffFF0000Very Hard...
        Set Difficulty_Button[5] = (Last created dialog Button)
        For each (Integer A) from 1 to 9, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Player((Integer A))) slot status) Equal to Is playing
                    Then - Actions
                        Dialog - Show Difficulty_Dialog for (Player((Integer A)))
                        Wait 30.00 Seconds
                        Dialog - Hide Difficulty_Dialog for (Player((Integer A)))
                        Skip remaining actions
                    Else - Actions
This is used for setting the lives you have, and if no button is pressed, the value isn't changed. (It's 25 from the start)

You could make so that when a dialogbutton is pressed, a boolean variable becomes false, and if it's false after the 30 second wait, hide the dialog and then do whatever you want to do.
 

Zaraf

New Member
Reaction score
22
Hmmm...while this might be able to work for me, it would be quite messy....displaying multiple messages and stuff like that. Is there a way to check condition wise if a dialog button has been pressed or not? So that the script runs ONLY if the dialog button has NOT been pressed?
 

Galdiuz

Creator of Photon Command
Reaction score
98
You could create a boolean and set it to true, and then when a dialog button is pressed you set it to false. That way you can check if a button has been pressed.
 
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