• 🏆 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 won't hide

Status
Not open for further replies.
Level 18
Joined
Aug 23, 2008
Messages
2,319
I've made multiple dialogs and they're all set to dialog variable Dialog[#][#], where the first # is the category and the second the 'ID'. I also made a dialog button to close the dialog window, which are set to dialog item variable Dialog Item[#][#][0], where the first 2 #'s are thesame of the dialog they are in. Now when I close Dialog[1][1] with Dialog Item[1][1][0], there's no problem. It does exactly what it's supposed to do. But when I close Dialog[1][2] with Dialog Item[1][2][0], nothing happens. The creation and showing of both dialogs are completely identical (except for the part where the variables are set), so that can't cause the problem. This trigger closes the dialog when the close button is clicked:

  • Close dialog
    • Events
      • Dialog - Any Dialog Item is Clicked by Player 1
    • Local Variables
    • Conditions
    • Actions
      • General - Pick each integer from 0 to 10, and do (Actions)
        • Actions
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • Or
                • Conditions
                  • (Used dialog item) == Dialog item[1][(Picked integer)][0]
                  • (Used dialog item) == Dialog item[2][(Picked integer)][0]
            • Then
              • Dialog - Hide Dialog[Current category/dialog/item[1]][Current category/dialog/item[2]] for (All players)
              • General - For each integer TempInteger from 0 to Current category/dialog/item[3] with increment 1, do (Actions)
                • Actions
                  • Dialog - Hide Dialog item[Current category/dialog/item[1]][Current category/dialog/item[2]][(Picked integer)] for (All players)
              • General - If (Conditions) then do (Actions) else do (Actions)
                • If
                  • Current category/dialog/item[1] == 2
                • Then
                  • Variable - Set Current category/dialog/item[1] = Previous category/dialog/item[1]
                  • Variable - Set Current category/dialog/item[2] = Previous category/dialog/item[2]
                  • Variable - Set Current category/dialog/item[3] = Previous category/dialog/item[3]
                • Else
                  • Environment - Unpause time of day cycle
                  • Unit - Unpause all units
            • Else
I don't know what's wrong with it. the Current/Previous (blablabla) variables are the IDs of the dialogs and items that are being closed. If somebody knows what I did wrong, I'd be VERY grateful.
 
Last edited:
Level 18
Joined
Aug 23, 2008
Messages
2,319
Problem solved. It was a wrongly entered starting value in a Pick Each Integer command. It caused a condition to pass, that changed the Current c/d/i value, so the Glossary dialog wouldn't be selected. Glad that's fixed with ease :)
 
Status
Not open for further replies.
Top