Timed Dialog problem!

Menelaus

New Member
Reaction score
9
Ok I have a dialog for a td and u choose the difficulty and it works fine except for one part. I want it to be hidden after 30 secs and start the game w/ 25 lives (in case red isnt there or takes too long). wait 30 secs doesnt work, and neither does a timer or seperate triggers. Is there any way to do it????
 

Menelaus

New Member
Reaction score
9
Oh yeah sry duh....

Trigger: lives dialog
Code:
   Events-
 Elapsed game time is 0.10 secs
   Condits-
   Actions-
 dialog-Clear lives_dialog
 dialog-Change the title of lives_dialog
 dialog-create dialog button for lives dialog labelled 1
 set lives_dialog_button[1] = last created dialog button
 dialog-create dialog button for lives dialog labelled 5
 set lives_dialog_button[2] = last created dialog button
 dialog-create dialog button for lives dialog labelled 10
 set lives_dialog_button[3] = last created dialog button
 dialog-create dialog button for lives dialog labelled 20
 set lives_dialog_button[4] = last created dialog button
 dialog-create dialog button for lives dialog labelled 50
 set lives_dialog_button[5] = last created dialog button
 dialog-create dialog button for lives dialog labelled 1000
 set lives_dialog_button[6] = last created dialog button
 dialog-show lives_dialog for primary_player (a variable i defined as: if red wasnt there, then blue, if blue wasnt there, then teal, etc.)
 Game-display to all players for 29.90 secs the text: Player name has 30......
 Wait 30 secs
 dialog- hide  lives_dialog for primary_player
 If all condits are true, then do (actions) else do (actions)
    IF Conditions-Footman 15 is alive equal to true
    THEN Actions- Kill footman 15
                        set lives = 25
                        Game display to all players the text: Player name took 30...
    ELSE Actions- Do nothing

**Footman 15 is the event for the next set of triggers
TRIGGER: button clicked
Code:
   Events- Dialog- A button is clicked for lives_dialog
   Condits-
   Actions- For each integer a from 1 to 6 then do actions else do actions
          Loop-Actions
                 If, then else
                 IF Condits- Clicked dialog button equal to lives_dialog_button[integer a]
                 THEN Actions- set lives = setup lives[integer a]
                  Game- display to Players_in_game the text: lives_message[integer a]
                  Leaderboard-change the value for hostile_creeps in kills_board to lives
                  Unit-Kill Footman 15
                  ELSE-

TRIGGER: lives setup
Code:
Events-map init
 Condits-
 Actions- Set setup_lives[1] = 1
 Set setup_lives[2] = 5
 Set setup_lives[3] = 10
 Set setup_lives[4] = 20
 Set setup_lives[5] = 50
 Set setup_lives[6] = 1000
 Set lives_message[1] = blah blah blah
 Set lives_message[2] = blah blah blah  
 Set lives_message[3] = blah blah blah     
 Set lives_message[4] = blah blah blah
 Set lives_message[5] = blah blah blah
 Set lives_message[6] = blah blah blah
 
O

OneEight7eve

Guest
lol? did you type that you know you can right click > copy as text

id rather see exact trigger cause urs is so much
 

Menelaus

New Member
Reaction score
9
...

wow thats helpful!!!!!
ok


Code:
dialog lives
    Events
        Time - Elapsed game time is 0.10 seconds
    Conditions
    Actions
        Dialog - Clear lives_dialog
        Dialog - Change the title of lives_dialog to Select the number o...
        Dialog - Create a dialog button for lives_dialog labelled 1 |cffff0000 (Exper...
        Set lives_dialog_button[1] = (Last created dialog Button)
        Dialog - Create a dialog button for lives_dialog labelled 5 |cffff4500 (Pro)|...
        Set lives_dialog_button[2] = (Last created dialog Button)
        Dialog - Create a dialog button for lives_dialog labelled 10 |cffffff00 (Expe...
        Set lives_dialog_button[3] = (Last created dialog Button)
        Dialog - Create a dialog button for lives_dialog labelled 20 |cff00ff2f (Play...
        Set lives_dialog_button[4] = (Last created dialog Button)
        Dialog - Create a dialog button for lives_dialog labelled 50 |cff00ff00 (Newc...
        Set lives_dialog_button[5] = (Last created dialog Button)
        Dialog - Create a dialog button for lives_dialog labelled 1000 |cffffffff (NO...
        Set lives_dialog_button[6] = (Last created dialog Button)
        Dialog - Show lives_dialog for primary_player
        Game - Display to (All players) for 29.90 seconds the text: ((Name of primary_player) +  has 30 seconds to pick the number of lives.)
        Wait 30.00 seconds
        Dialog - Hide lives_dialog for primary_player
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Footman 0015 <gen> is alive) Equal to True
            Then - Actions
                Unit - Kill Footman 0015 <gen>
                Set lives = 25
                Game - Display to (All players) the text: ((Name of primary_player) +  didn't choose his lives fast enough... You have 25 lives.)
            Else - Actions
                Do nothing

Code:
lives clicked button
    Events
        Dialog - A dialog button is clicked for lives_dialog
    Conditions
    Actions
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Clicked dialog button) Equal to lives_dialog_button[(Integer A)]
                    Then - Actions
                        Set lives = setuplives[(Integer A)]
                        Game - Display to players_in_game the text: lives_message[(Integer A)]
                        Leaderboard - Change the value for hostile_creeps in kills_board to lives
                        Unit - Kill Footman 0015 <gen>
                    Else - Actions
Code:
lives dialog setup
    Events
        Map initialization
    Conditions
    Actions
        Set setuplives[1] = 1
        Set setuplives[2] = 5
        Set setuplives[3] = 10
        Set setuplives[4] = 20
        Set setuplives[5] = 50
        Set setuplives[6] = 1000
        Set lives_message[1] = (You better be experts! + ((Name of Player 1 (Red)) +  has set the lives to just one.))
        Set lives_message[2] = (((Name of Player 1 (Red)) +  thinks you are pretty good (pros).  Only five lives may be lost.) +  )
        Set lives_message[3] = (((Name of Player 1 (Red)) +  has set the number of lives to ten.  ) + He or she thinks you are experienced players.)
        Set lives_message[4] = (((Name of Player 1 (Red)) +  assumes you've played a couple of TDs before or have a good sense for the game.  ) + He or she has set the lives to twenty.)
        Set lives_message[5] = (You probably revealed the fact that some of you are newcomers. + ((Name of Player 1 (Red)) +  has set the lives to fifty.))
        Set lives_message[6] = (Either the host is an asshole or you guys suck. + ((Name of Player 1 (Red)) +  has set the lives to one thousand.  If you're good, you might want to consider leaving...))

well that only took 3 mins..... but still thx
 
O

OneEight7eve

Guest
Time - Elapsed game time is 30.00 seconds ?? would that jus work . sorry for takin so long 4got about u
 

OneBadPsycho

10100111001
Reaction score
93
Code:
DialogWait
    Events
        Time - Elapsed game time is 30.00 seconds
    Conditions
    Actions
        Dialog - Hide (Dialog) for Player 1 (Red)

Wouldnt that work?
 

OVRKLL

New Member
Reaction score
3
So timers freeze when a dialog appears? Or what's the lesson to learn here?
 

Menelaus

New Member
Reaction score
9
So does that mean that my original code will work on bnet but just not on single player?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top