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

Dialog Help

Status
Not open for further replies.
Level 3
Joined
Aug 22, 2010
Messages
34
Edit: NEVER MIND, FIXED IT. Forgot I put the condition #votes = # players and not #votes >= # of players, as I had not yet fixed the vote tally to work for players 2 - 4 it was always setting the # of votes to 4. This thread is done.

Can't get this to work. It's supposed to display a dialog to every player playing with a "Skip" and "Watch" button. When clicked, the dialog should vanish, and if the # of votes = # of players (determined in another trigger), verdict runs and sees if the # of yes votes = # of players. However, all that happens is when either button is clicked the dialogs vanish and verdict does not run. (I checked, # of players is calc'd correctly when testing. It gets set to 1) I haven't finished copying everything for Tutorial Vote, however it shouldn't matter as I'm the only one in the game when testing.

  • Events
    • Game - Map initialization
  • Local Variables
    • LoopA = 0 <Integer>
  • Conditions
  • Actions
    • ------- Dialog
    • General - For each integer LoopA from 1 to 4 with increment 1, do (Actions)
      • Actions
        • General - If (Conditions) then do (Actions) else do (Actions)
          • If
            • (Status of player LoopA) == Playing
          • Then
            • Variable - Set PlayerAlive[LoopA] = true
            • Variable - Set #Players = (#Players + 1)
            • Dialog - Create a Modal dialog of size (250, 110) at (0, 0) relative to Center of screen
            • Variable - Set Tutorial Dialog[LoopA] = (Last created dialog)
            • Dialog - Create a button for dialog Tutorial Dialog[LoopA] with the dimensions (150, 50) anchored to Center with an offset of (0, -30) setting the tooltip to "" with button text "Skip" and the hover image set to ""
            • Variable - Set VoteButton[((LoopA * 2) - 1)] = (Last created dialog item)
            • Dialog - Create a button for dialog Tutorial Dialog[LoopA] with the dimensions (150, 50) anchored to Center with an offset of (0, 0) setting the tooltip to "" with button text "Watch" and the hover image set to ""
            • Variable - Set VoteButton[(LoopA * 2)] = (Last created dialog item)
            • Dialog - Show Tutorial Dialog[LoopA] for (Player group(LoopA))
          • Else
  • Tutorial Vote
    • Events
      • Dialog - Any Dialog Item is used by Player 1 with event type Clicked
      • Dialog - Any Dialog Item is used by Player 2 with event type Clicked
      • Dialog - Any Dialog Item is used by Player 3 with event type Clicked
      • Dialog - Any Dialog Item is used by Player 4 with event type Clicked
    • Local Variables
    • Conditions
    • Actions
      • Variable - Set #Votes = (#Votes + 1)
      • Dialog - Hide Tutorial Dialog[(Triggering player)] for (Player group((Triggering player)))
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • Or
            • Conditions
              • (Used dialog item) == VoteButton[1]
              • (Used dialog item) == VoteButton[3]
              • (Used dialog item) == VoteButton[5]
              • (Used dialog item) == VoteButton[7]
        • Then
          • Variable - Set #Votes Yes = (#Votes Yes + 1)
        • Else
          • UI - Display "YOU VOTE WATCH" for (Player group((Triggering player))) to Subtitle area
  • Verdict
    • Events
      • Timer - Every 1.0 seconds of Game Time
    • Local Variables
    • Conditions
      • #Votes == #Players
    • Actions
      • Trigger - Turn (Current trigger) Off
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • #Votes Yes == #Players
        • Then
          • UI - Display "Tutorial Will be skipped" for (All players) to Directive area
          • Timer - Start WaveTimer as a One Shot timer that will expire in 25.0 Game Time seconds
          • Timer - Create a timer window for (Last started timer), with the title "First wave in...", using Remaining time (initially Visible)
          • Variable - Set TimerWindow = (Last created timer window)
          • Timer - Show TimerWindow for (All players)
          • Variable - Set WaveNumber = 1
        • Else
          • UI - Display "Tutorial Will not be skipped" for (All players) to Directive area
          • ------- Camera Pan
          • Player Group - Pick each player in (All players) and do (Actions)
            • Actions
              • Camera - Pan the camera for player (Picked player) to (Center of CenterKillRegion) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do use smart panning
 
Last edited:
Status
Not open for further replies.
Top