1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  5. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

millzys Advanced Dialogs 2.0

Submitted by millzy
This bundle is marked as substandard. It may contain bugs, not perform optimally or otherwise be in violation of the submission rules.
This system provides you with a advanced dialog system that allows you to set options. then proceed when done. this example shows a dialog for game modes


Features
-easy to undterstand and import to your map
-easy to customize to your liking

trigger
setup
  • dialog set up
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set Text_hero[1] = |c00FFFF00Hero selection:|r |c0000FF00All pick|r
      • Set Text_hero[2] = |c00FFFF00Hero selection:|r |c00FFA500All Random|r
      • Set Text_Gold[1] = |c00FF6600Starting Gold:|r |c00FFFF00500|r
      • Set Text_Gold[2] = |c00FF6600Starting Gold:|r |c00FFFF001000|r
      • Set Text_Gold[3] = |c00FF6600Starting Gold:|r |c00FFFF001500|r
      • Set Text_exp_rate[1] = |c00FFFF00Experience Rate:|r |c00912CEE100%|r
      • Set Text_exp_rate[2] = |c00FFFF00Experience Rate:|r |c006959CD90%|r
      • Set Text_exp_rate[3] = |c00FFFF00Experience Rate:|r |c00836FFF80%|r
      • Set Text_exp_rate[4] = |c00FFFF00Experience Rate:|r |c00551A8B110%|r
      • -------- --------
      • -------- setting modes to default --------
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Set Dialog_mode_integer[(Integer A)] = 1
      • -------- --------
      • -------- Main Dialog --------
      • Dialog - Change the title of Dialog to Game Options
      • Dialog - Create a dialog button for Dialog labelled Text_hero[1]
      • Set Button_Main[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog labelled Text_Gold[1]
      • Set Button_Main[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog labelled Text_exp_rate[1]
      • Set Button_Main[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog labelled |c0000FF00Done|r
      • Set Button_Main[4] = (Last created dialog Button)
      • Dialog - Show Dialog for Player 1 (Red)
      • -------- --------
      • -------- Sub button 1 = hero selection --------
      • Dialog - Change the title of Dialogs_selections[1] to Hero selection mode...
      • Dialog - Create a dialog button for Dialogs_selections[1] labelled |c0000FF00All pick|...
      • Set Button_Sub1[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialogs_selections[1] labelled |c00FFA500All Rando...
      • Set Button_Sub1[2] = (Last created dialog Button)
      • -------- --------
      • -------- Sub button 2 =Starting gold --------
      • Dialog - Change the title of Dialogs_selections[2] to Gold Selection
      • Dialog - Create a dialog button for Dialogs_selections[2] labelled |c00FFFF00500|r
      • Set Button_Sub2[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialogs_selections[2] labelled |c00FFFF001000|r
      • Set Button_Sub2[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialogs_selections[2] labelled |c00FFFF001500|r
      • Set Button_Sub2[3] = (Last created dialog Button)
      • -------- --------
      • -------- Sub button 3 = exp rates --------
      • Dialog - Change the title of Dialogs_selections[3] to Experiance Rates
      • Dialog - Create a dialog button for Dialogs_selections[3] labelled |c00912CEE100%|r
      • Set Button_Sub3[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialogs_selections[3] labelled |c006959CD90%|r
      • Set Button_Sub3[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialogs_selections[3] labelled |c00836FFF80%|r
      • Set Button_Sub3[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialogs_selections[3] labelled |c00551A8B110%|r
      • Set Button_Sub3[4] = (Last created dialog Button)


selections
  • Dialog selections
    • Events
      • Dialog - A dialog button is clicked for Dialog
      • Dialog - A dialog button is clicked for Dialogs_selections[1]
      • Dialog - A dialog button is clicked for Dialogs_selections[2]
      • Dialog - A dialog button is clicked for Dialogs_selections[3]
    • Conditions
    • Actions
      • -------- if the done button is selected it will run the mode det up --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Button_Main[4]
        • Then - Actions
          • Trigger - Run Mode set up <gen> (checking conditions)
        • Else - Actions
          • -------- if one of the buttons on the main dialog is selected it will open up the sections for that button --------
          • For each (Integer A) from 1 to 3, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to Button_Main[(Integer A)]
                • Then - Actions
                  • Dialog - Show Dialogs_selections[(Integer A)] for Player 1 (Red)
                • Else - Actions
          • -------- if its 1 of the sub button --------
          • For each (Integer A) from 1 to 4, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to Button_Sub1[(Integer A)]
                • Then - Actions
                  • Set Dialog_mode_integer[1] = (Integer A)
                  • Trigger - Run Dialog main update <gen> (ignoring conditions)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Clicked dialog button) Equal to Button_Sub2[(Integer A)]
                    • Then - Actions
                      • Set Dialog_mode_integer[2] = (Integer A)
                      • Trigger - Run Dialog main update <gen> (ignoring conditions)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Clicked dialog button) Equal to Button_Sub3[(Integer A)]
                        • Then - Actions
                          • Set Dialog_mode_integer[3] = (Integer A)
                          • Trigger - Run Dialog main update <gen> (ignoring conditions)
                        • Else - Actions


main update
  • Dialog main update
    • Events
    • Conditions
    • Actions
      • Dialog - Clear Dialog
      • Dialog - Change the title of Dialog to Game options
      • Dialog - Create a dialog button for Dialog labelled Text_hero[Dialog_mode_integer[1]]
      • Set Button_Main[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog labelled Text_Gold[Dialog_mode_integer[2]]
      • Set Button_Main[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog labelled Text_exp_rate[Dialog_mode_integer[3]]
      • Set Button_Main[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog labelled |c0000FF00Done|r
      • Set Button_Main[4] = (Last created dialog Button)
      • Dialog - Show Dialog for Player 1 (Red)


mode set up
  • Mode set up
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Game modes
      • Game - Display to (All players) the text: Text_hero[Dialog_mode_integer[1]]
      • Game - Display to (All players) the text: Text_Gold[Dialog_mode_integer[2]]
      • Game - Display to (All players) the text: Text_exp_rate[Dialog_mode_integer[3]]
      • -------- mode set ups for sub button 1 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dialog_mode_integer[1] Equal to 1
        • Then - Actions
          • -------- Set up allpick hero selection --------
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Dialog_mode_integer[1] Equal to 2
            • Then - Actions
              • -------- Set up all Random hero selection --------
            • Else - Actions
      • -------- mode set ups for sub button 2 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dialog_mode_integer[2] Equal to 1
        • Then - Actions
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Player - Set (Picked player) Current gold to 500
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Dialog_mode_integer[2] Equal to 2
            • Then - Actions
              • Player Group - Pick every player in (All players) and do (Actions)
                • Loop - Actions
                  • Player - Set (Picked player) Current gold to 1000
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Dialog_mode_integer[2] Equal to 3
                • Then - Actions
                  • Player Group - Pick every player in (All players) and do (Actions)
                    • Loop - Actions
                      • Player - Set (Picked player) Current gold to 1500
                • Else - Actions
      • -------- mode set ups for sub button 3 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dialog_mode_integer[3] Equal to 1
        • Then - Actions
          • -------- Set up the exp rate for 100% --------
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Hero - Make (Picked player) Heroes gain 100.00% experience from future kills
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Dialog_mode_integer[3] Equal to 2
            • Then - Actions
              • -------- Set up the exp rate for 90% --------
              • Player Group - Pick every player in (All players) and do (Actions)
                • Loop - Actions
                  • Hero - Make (Picked player) Heroes gain 90.00% experience from future kills
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Dialog_mode_integer[3] Equal to 3
                • Then - Actions
                  • -------- Set up the exp rate for 80% --------
                  • Player Group - Pick every player in (All players) and do (Actions)
                    • Loop - Actions
                      • Hero - Make (Picked player) Heroes gain 80.00% experience from future kills
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Dialog_mode_integer[3] Equal to 4
                    • Then - Actions
                      • -------- Set up the exp rate for 110% --------
                      • Player Group - Pick every player in (All players) and do (Actions)
                        • Loop - Actions
                          • Hero - Make (Picked player) Heroes gain 110.00% experience from future kills
                    • Else - Actions



Changelog
1.0 - first upload
1.1- fixxed up the if then else to make it more sufficiant
1.1b - the update for the if then else some how stoped it from working now back to the original up load
2.0 - properly set if then else to make more sufficient as requested and input some of the template mode options

Credits
thanks to kobas for is tutorial and giving me the idea
thanks to maker for fixxing up a fault in the system

Keywords:
Dialog, Dialogs, options, Game Modes, Game Mode, Selection, Selections
Contents

Just another Warcraft III map (Map)

Reviews
KILLCIDE
This is more like a template and another example of the tutorial made by -Kobas-. Unless you actually turn this into a system where users can call functions and such instead of directly editing the trigger, I'm going to have to send this to substandard.
  1. 12th Dec 2015
    IcemanBo: For too long time as NeedsFix. Rejected.

    Maker, 15th Aug 2011, millzys Advanced Dialogs 1.1b

    Dialog selection isn't efficient enough. You do checks even after the clicked button is found.
     
  2. Jazztastic

    Jazztastic

    Joined:
    Apr 4, 2011
    Messages:
    901
    Resources:
    7
    Spells:
    6
    Tutorials:
    1
    Resources:
    7
    It's spelled "experience", not experiance

    Your second trigger isn't properly posted. It isn't displaying the proper way.

    Otherwise it looks fine. I might dl and test later
     
  3. Genji Lone

    Genji Lone

    Joined:
    Feb 15, 2011
    Messages:
    61
    Resources:
    0
    Resources:
    0
    The way you posted Triggers are like....
     
  4. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,174
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    You're doing too much work when trying to detect the clicked dialog button and also for the dialog modes. Set the if/then/elses inside each other.

    Optionally you could use hashtables and get the handle id of the clicked button to know which button was clicked. You could store the needed data using the button's id as parent key.
     
  5. millzy

    millzy

    Joined:
    Jul 9, 2008
    Messages:
    1,540
    Resources:
    6
    Maps:
    5
    Spells:
    1
    Resources:
    6
    i havent touched hashtables so id rather not

    why put the if/then/else inside each other it does the same thing
     
  6. Jazztastic

    Jazztastic

    Joined:
    Apr 4, 2011
    Messages:
    901
    Resources:
    7
    Spells:
    6
    Tutorials:
    1
    Resources:
    7
  7. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,258
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    It certainly does not. If the first button is clicked, you find that out in the first if-block. But then you uselessly re-evaluate all the remaining buttons to see if you clicked them. If you put each block in its preceding block's "Else - Actions" you can avoid such redundancy.
     
  8. MortAr

    MortAr

    Joined:
    Feb 25, 2009
    Messages:
    1,765
    Resources:
    7
    Icons:
    6
    Packs:
    1
    Resources:
    7
    You could save all buttons in variables and detect which one is clicked and set the variable to the number of that button.
     
  9. millzy

    millzy

    Joined:
    Jul 9, 2008
    Messages:
    1,540
    Resources:
    6
    Maps:
    5
    Spells:
    1
    Resources:
    6
    thats what it does
     
  10. xorkatoss

    xorkatoss

    Joined:
    Jul 12, 2010
    Messages:
    1,584
    Resources:
    7
    Models:
    5
    Maps:
    1
    Spells:
    1
    Resources:
    7
    although it's pretty simple,nice dialog system!! 5/5 :thumbs_up:
     
  11. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,893
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    Ah it seams that someone actually read tutorials :D
    Thanks for credits.
     
  12. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,502
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    This is more like a template and another example of the tutorial made by -Kobas-. Unless you actually turn this into a system where users can call functions and such instead of directly editing the trigger, I'm going to have to send this to substandard.
     
  13. millzy

    millzy

    Joined:
    Jul 9, 2008
    Messages:
    1,540
    Resources:
    6
    Maps:
    5
    Spells:
    1
    Resources:
    6
    @KILLCIDE what do u mean call functions instead of adding what they want to the dialog boxxes????