• 0

    posted a message on Loop problem that I don't understand.

    @BasharTeg: Go

    True. What I am trying to do is find out if the player has completed each difficulty level (there are 6) with a certain unit, let's say Marine. The bank are loaded and the encryption/decryption works fine as the values in the first example directly translate to the variables in the second example. The only thing is, is that the loop doesn't seem to realize when the statement is true, which is odd, because when I type it out (first example) it works fine.

    I was just trying to find out if there is an error in my loop that I am not seeing. The loop (should) works like this:

    Loop through the difficulty levels and through the types of units (all have been assigned numbers for ease of tracking). So it runs like this: Unit 1 - Difficulty 1 - true/false. Unit 1 - Difficulty 2 - true/false etc...

    In the first example, znevar is Marine and the letter in front of that is for the difficulty level that I combine together with Combine String. The values are like that in the bank file, but the loop somehow doesn't go into the true part.

    If you could just look at the loop and see if there are any errors that I am not seeing, that would be great. :)

    Faust

    Posted in: Triggers
  • 0

    posted a message on Loop problem that I don't understand.

    Hi guys,

    I have the following in a save trigger:

        Events
        Local Variables
            Diff Beat Count = 0 <Integer>
            Diff Level = 6 <Integer (Constant)>
            Unit Typ = 12 <Integer (Constant)>
            i = 0 <Integer>
            n = 0 <Integer>
        Conditions
        Actions
            Player Group - Pick each player in (Active Players) and do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            And
                                Conditions
                                    (Bank Player_Bank[(Picked player)] has "rznevar" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "zznevar" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "uznevar" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "aznevar" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "urznevar" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "pznevar" in section "cynlre") == True
                        Then
                            Variable - Set Algorythm_Rank[(Picked player)][12] = 1
                            Bank - Store integer Algorythm_Rank[(Picked player)][12] as Bank Rank Encryption[12] of section "cynlre" in bank Player_Bank[(Picked player)]
                            Bank - Save bank Player_Bank[(Picked player)]
                        Else
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            And
                                Conditions
                                    (Bank Player_Bank[(Picked player)] has "rznehqre" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "zznehqre" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "uznehqre" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "aznehqre" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "urznehqre" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "pznehqre" in section "cynlre") == True
                        Then
                            Variable - Set Algorythm_Rank[(Picked player)][11] = 1
                            Bank - Store integer Algorythm_Rank[(Picked player)][11] as Bank Rank Encryption[11] of section "cynlre" in bank Player_Bank[(Picked player)]
                            Bank - Save bank Player_Bank[(Picked player)]
                        Else
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            And
                                Conditions
                                    (Bank Player_Bank[(Picked player)] has "rsveong" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "zsveong" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "usveong" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "asveong" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "ursveong" in section "cynlre") == True
                                    (Bank Player_Bank[(Picked player)] has "psveong" in section "cynlre") == True
                        Then
                            Variable - Set Algorythm_Rank[(Picked player)][10] = 1
                            Bank - Store integer Algorythm_Rank[(Picked player)][10] as Bank Rank Encryption[10] of section "cynlre" in bank Player_Bank[(Picked player)]
                            Bank - Save bank Player_Bank[(Picked player)]
                        Else
    

    Note: There are only 4 players at most. This: "Algorythm_Rank[(Picked player)][12] = 1" refers to the 12th unit type and not 12th player

    This works just fine, but is very inefficient. I had this in a loop with arrays but it wasn't saving. See here:

        Events
        Local Variables
            Diff Beat Count = 0 <Integer>
            Diff Level = 6 <Integer (Constant)>
            Unit Typ = 12 <Integer (Constant)>
            i = 0 <Integer>
            n = 0 <Integer>
        Conditions
        Actions
            Player Group - Pick each player in (Active Players) and do (Actions)
                Actions
                    General - For each integer n from 1 to Unit Typ with increment 1, do (Actions)
                        Actions
                            General - For each integer i from 1 to Diff Level with increment 1, do (Actions)
                                Actions
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            (Bank Player_Bank[(Picked player)] has Bank Terran Unit Encryption Difficulty and Unit[i][n] in section "cynlre") == True
                                        Then
                                            Variable - Modify Diff Beat Count: + 1
                                            General - If (Conditions) then do (Actions) else do (Actions)
                                                If
                                                    Diff Beat Count == Diff Level
                                                Then
                                                    Variable - Set Algorythm_Rank[(Picked player)][n] = 1
                                                    Bank - Store integer Algorythm_Rank[(Picked player)][n] as Bank Rank Encryption[n] of section "cynlre" in bank Player_Bank[(Picked player)]
                                                    Bank - Save bank Player_Bank[(Picked player)]
                                                Else
                                        Else
    

    I can't figure out why this isn't working. Any tips on something I may have missed? The values exist in the player bank, but somehow it doesn't work.

    Thanks!!

    Faust

    Posted in: Triggers
  • 0

    posted a message on Multiple page custom Achievement dialog

    @Helral: Go

    Thanks again Helral! I am reading all about them now and see myself doind a major overhaul on my code. I have already reprogrammed everything into loops and variables and have saved so much space, not to mention how much easier it is to debug.

    Thanks for all of your help!!

    Posted in: Triggers
  • 0

    posted a message on Multiple page custom Achievement dialog

    @Helral: Go

    Helral: Thank you very much! This is really helping and I almost get it. Before I ask yet another question, here is the updated code:

    Variables:

            Achievements Button Dialog = No Dialog <Dialog>
            Achievements Button Dialog Button = No Dialog Item <Dialog Item>
            Display Achievements Close Button Size = 50 <Integer (Constant)>
            Display Achievements Close Button Offset = 30 <Integer (Constant)>
            Display Achievements Close Achievements Button = No Dialog Item <Dialog Item>
            Display Achievements Dialog Button Offset = 30 <Integer (Constant)>
            Display Achievements Dialog Button Offset Y = -10 <Integer (Constant)>
            Display Achievements Dialog Button Size X = 50 <Integer (Constant)>
            Display Achievements Dialog Button Size Y = 50 <Integer (Constant)>
            Display Achievements Dialog Buttons = No Dialog Item <Dialog Item[3]>
            Display Achievements Dialog Labels = No Dialog Item <Dialog Item[4]>
            Display Achievements Dialog = No Dialog <Dialog>
            Display Achievements First Page = 1 <Integer (Constant)>
            Display Achievements Max Pages = 4 <Integer (Constant)>
            Display Achievements Current Page = Display Achievements First Page <Integer>
            Display Achievements Image = No Dialog Item <Dialog Item[4][7][6]>
            Page = 1 <Integer[4]>
            Page 2 = 2 <Integer (Constant)>
            Display Achievements Zergling = 1 <Integer (Constant)>
            Display Achievements Roach = 2 <Integer (Constant)>
            Column = 0 <Integer[6]>
            Columns = 6 <Integer (Constant)>
    

    The first trigger:

    Achievement Button Dialog
        Events
            Game - Map initialization
        Local Variables
            i = 0 <Integer>
        Conditions
        Actions
            General - For each integer i from 1 to Display Achievements Max Pages with increment 1, do (Actions)
                Actions
                    Variable - Set Page[i] = i
            General - For each integer i from 1 to Columns with increment 1, do (Actions)
                Actions
                    Variable - Set Column[i] = i
            Dialog - Create a Modal dialog of size (1200, 900) at (0, 0) relative to Center of screen
            Variable - Set Display Achievements Dialog = (Last created dialog)
            Dialog - Hide Display Achievements Dialog for (Player group((Triggering player)))
            Dialog - Create a button for dialog Display Achievements Dialog with the dimensions (Display Achievements Dialog Button Size X, Display Achievements Dialog Button Size Y) anchored to Bottom Right with an offset of ((Display Achievements Dialog Button Offset + Display Achievements Dialog Button Size X), Display Achievements Dialog Button Offset) setting the tooltip to "Previous" with button text "<<" and the hover image set to ""
            Variable - Set Display Achievements Dialog Buttons[1] = (Last created dialog item)
            Dialog - Create a button for dialog Display Achievements Dialog with the dimensions (Display Achievements Dialog Button Size X, Display Achievements Dialog Button Size Y) anchored to Bottom Right with an offset of (Display Achievements Dialog Button Offset, Display Achievements Dialog Button Offset) setting the tooltip to "Next" with button text ">>" and the hover image set to ""
            Variable - Set Display Achievements Dialog Buttons[2] = (Last created dialog item)
            Dialog - Create a button for dialog Display Achievements Dialog with the dimensions (Display Achievements Close Button Size, Display Achievements Close Button Size) anchored to Top Right with an offset of (Display Achievements Close Button Offset, Display Achievements Close Button Offset) setting the tooltip to "Close Achievements" with button text "X" and the hover image set to ""
            Variable - Set Display Achievements Dialog Buttons[3] = (Last created dialog item)
            ------- I used Integer loop here to speed things up, creating however many dialogs are set to MaxPages.
            General - For each integer i from 1 to Display Achievements Max Pages with increment 1, do (Actions)
                Actions
                    Dialog - Create a label for dialog Display Achievements Dialog with the dimensions (300, 50) anchored to Center with an offset of (60, 0) with the text ("Dialog Item Text " + (Text(i))) color set to White text writeout set to False with a writeout duration of 1.0
                    Variable - Set Display Achievements Dialog Labels[i] = (Last created dialog item)
                    Dialog - Hide Display Achievements Dialog Labels[i] for (Active Players)
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            i == 1
                        Then
                            Dialog - Create an image for dialog Display Achievements Dialog with the dimensions (76, 76) anchored to Top Left with an offset of (50, 50) setting the tooltip to "" using the image Assets\Textures\btn-unit-zerg-zergling.dds as a Normal type with tiled set to True tint color White and blend mode Normal
                            Variable - Set Display Achievements Image[Page[1]][Display Achievements Zergling][Column[1]] = (Last created dialog item)
                            Dialog - Hide (Last created dialog item) for (All players)
                            Dialog - Create an image for dialog Display Achievements Dialog with the dimensions (76, 76) anchored to Top Left with an offset of (126, 50) setting the tooltip to "" using the image Assets\Textures\btn-unit-zerg-roach.dds as a Normal type with tiled set to True tint color White and blend mode Normal
                            Variable - Set Display Achievements Image[Page[1]][Display Achievements Zergling][Column[2]] = (Last created dialog item)
                            Dialog - Hide (Last created dialog item) for (All players)
                        Else
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            i == 2
                        Then
                            Dialog - Create an image for dialog Display Achievements Dialog with the dimensions (76, 76) anchored to Top Left with an offset of (50, 50) setting the tooltip to "" using the image Assets\Textures\btn-unit-zerg-roach.dds as a Normal type with tiled set to True tint color White and blend mode Normal
                            Variable - Set Display Achievements Image[Page 2][Display Achievements Roach][Column[1]] = (Last created dialog item)
                            Dialog - Hide (Last created dialog item) for (All players)
                            Dialog - Create an image for dialog Display Achievements Dialog with the dimensions (76, 76) anchored to Top Left with an offset of (126, 50) setting the tooltip to "" using the image Assets\Textures\btn-unit-zerg-roach.dds as a Normal type with tiled set to True tint color White and blend mode Normal
                            Variable - Set Display Achievements Image[Page 2][Display Achievements Roach][Column[2]] = (Last created dialog item)
                            Dialog - Hide (Last created dialog item) for (All players)
                        Else
                    ------- Make sure to Hide the Dialog Item.
            Dialog - Create a Modal dialog of size (225, 65) at (0, 335) relative to Bottom Right of screen
            Variable - Set Achievements Button Dialog = (Last created dialog)
            Dialog - Create a button for dialog Achievements Button Dialog with the dimensions (220, 60) anchored to Center with an offset of (0, 0) setting the tooltip to "Open Achievement window" with button text "Achievements" and the hover image set to ""
            Variable - Set Achievements Button Dialog Button = (Last created dialog item)
            Dialog - Show Achievements Button Dialog for (Active Players)
    

    The second trigger:

    Display Achievements
        Events
            Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
        Local Variables
        Conditions
            (Used dialog item) == Achievements Button Dialog Button
        Actions
            Dialog - Hide Achievements Button Dialog for (Player group((Triggering player)))
            Dialog - Show Display Achievements Dialog for (Player group((Triggering player)))
            Dialog - Show Display Achievements Dialog Labels[Display Achievements First Page] for (Player group((Triggering player)))
    

    The third and last trigger:

    DialogClicked
        Events
            Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
        Local Variables
            Clicked Dialog Button = (Used dialog item) <Dialog Item>
        Conditions
        Actions
            ------- Checks to see if they clicked the LEFT, Previous button.
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Clicked Dialog Button == Display Achievements Dialog Buttons[1]
                Then
                    Dialog - Hide Display Achievements Dialog Labels[Display Achievements Current Page] for (Player group((Triggering player)))
                    Variable - Set Display Achievements Current Page = (Display Achievements Current Page - 1)
                    ------- This IF THEN checks to see if it needs to loop the Current Page to the End.
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Display Achievements Current Page < Display Achievements First Page
                        Then
                            Variable - Set Display Achievements Current Page = Display Achievements Max Pages
                            Dialog - Hide Display Achievements Image[Page[1]][Display Achievements Zergling][Column[1]] for (Player group((Triggering player)))
                            Dialog - Hide Display Achievements Image[Page[1]][Display Achievements Zergling][Column[2]] for (Player group((Triggering player)))
                        Else
                    Dialog - Show Display Achievements Dialog Labels[Display Achievements Current Page] for (Player group((Triggering player)))
                Else
            ------- Checks to see if they clicked the RIGHT, Next button.
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Clicked Dialog Button == Display Achievements Dialog Buttons[2]
                Then
                    Dialog - Hide Display Achievements Dialog Labels[Display Achievements Current Page] for (Player group((Triggering player)))
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Display Achievements Current Page == 1
                        Then
                            Dialog - Hide Display Achievements Image[Page[1]][Display Achievements Zergling][Column[1]] for (Player group((Triggering player)))
                            Dialog - Hide Display Achievements Image[Page[1]][Display Achievements Zergling][Column[2]] for (Player group((Triggering player)))
                        Else
                    Variable - Set Display Achievements Current Page = (Display Achievements Current Page + 1)
                    ------- This IF THEN checks to see if it needs to loop the Current Page to the Beginning.
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Display Achievements Current Page > Display Achievements Max Pages
                        Then
                            Variable - Set Display Achievements Current Page = Display Achievements First Page
                        Else
                    Dialog - Show Display Achievements Dialog Labels[Display Achievements Current Page] for (Player group((Triggering player)))
                Else
            ------- Checks to see if they clicked the CLOSE button.
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Clicked Dialog Button == Display Achievements Dialog Buttons[3]
                Then
                    Dialog - Hide Display Achievements Dialog Labels[Display Achievements Current Page] for (Player group((Triggering player)))
                    Dialog - Hide Display Achievements Dialog for (Player group((Triggering player)))
                    Dialog - Show Achievements Button Dialog for (Player group((Triggering player)))
                Else
    

    Just a quick comment first. The column, page and display achievement xxxxx variables are just so that it is easier to read the code.

    Now on to the questions. I have a line in the first trigger: "Dialog - Hide Display Achievements Dialog Labels[i] for (Active Players)". If I use (Player Group (Triggering Player)) then when I click the achievement button, I get all of the labels at once on top of each other. If I just click through, then it is fine after it goes through all 4 pages. I have no idea why that is, but when I use (Active Players) it works fine.

    Next question. I create all of the image files in the first trigger. Do I then need to do a show/hide with an IF THEN statement to show or hide them all depending on what "Display Achievements Current Page" is equal to, or is there an easier way?

    Thanks a million. I am almost there.

    Faust

    P.S. Would this be "easier" with Action Definitions?

    Posted in: Triggers
  • 0

    posted a message on Need Help with Dialogs?

    @CrazyTwigman: Go

    The best dialog tutorial I've found was here. Very informative, but I don't know if that's what you're looking for.

    Faust

    Posted in: Triggers
  • 0

    posted a message on Multiple page custom Achievement dialog

    @Faust7777: Go

    Ok, I now have it working fine. Whew! :-) What I am wondering now, is how to get the images that I show for the achievements to only show on that page.

    For example:

    User opens achievements window and see all of his achievements on page 1. When he clicks to page 2, the achievements for page1 are hidden and his page 2 achievements are shown. Every player has the same achievements.

    This is driving me crazy!

    Here is the code I have so far:

    The variables:

            Achevements Button Dialog = No Dialog <Dialog>
            Achevements Button Dialog Button = No Dialog Item <Dialog Item>
            Display Achievements Close Button Size = 50 <Integer (Constant)>
            Display Achievements Close Button Offset = 30 <Integer (Constant)>
            Display Achievements Close Achievements Button = No Dialog Item <Dialog Item>
            Display Achievements Dialog Button Offset = 30 <Integer (Constant)>
            Display Achievements Dialog Button Offset Y = -10 <Integer (Constant)>
            Display Achievements Dialog Button Size X = 50 <Integer (Constant)>
            Display Achievements Dialog Button Size Y = 50 <Integer (Constant)>
            Display Achievements Dialog Buttons = No Dialog Item <Dialog Item[3]>
            Display Achievements Dialog Labels = No Dialog Item <Dialog Item[7]>
            Display Achievements Dialog = No Dialog <Dialog>
            Display Achievements First Page = 1 <Integer (Constant)>
            Display Achievements Max Pages = 7 <Integer (Constant)>
            Display Achievements Current Page = Display Achievements First Page <Integer>
            Display Achievements Image Zergling = No Dialog Item <Dialog Item[2]>
    

    My achievement button to actually show the achievements:

    Achievement Button Dialog
        Events
            Game - Map initialization
        Local Variables
        Conditions
        Actions
            Dialog - Create a Modal dialog of size (225, 65) at (0, 335) relative to Bottom Right of screen
            Variable - Set Achevements Button Dialog = (Last created dialog)
            Dialog - Create a button for dialog Achevements Button Dialog with the dimensions (220, 60) anchored to Center with an offset of (0, 0) setting the tooltip to "Open Achievement window" with button text "Achievements" and the hover image set to ""
            Variable - Set Achevements Button Dialog Button = (Last created dialog item)
            Dialog - Show Achevements Button Dialog for (Active Players)
    

    The trigger for the actual achievement dialog and this is the part I don't get. I have 2 images that will show. As you will see they will show on all pages. I just need them to show on page 1 though. When I go to page 2, I want different images to show, etc...

    Display Achievements
        Events
            Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
        Local Variables
            I = 0 <Integer>
        Conditions
            (Used dialog item) == Achevements Button Dialog Button
        Actions
            ------- We need to create all the dialog items and hide them.
    ------- Dialog = Main Dialog Box
    ------- Dialog Buttons = Array of the two buttons [Next and Previous]
    ------- Dialog Labelss = Array of all the Labels for the Dialog.
            Dialog - Hide Achevements Button Dialog for (All players)
            Dialog - Create a Modal dialog of size (1200, 900) at (0, 0) relative to Center of screen
            Variable - Set Display Achievements Dialog = (Last created dialog)
            Dialog - Hide Display Achievements Dialog for (All players)
            Dialog - Create a button for dialog Display Achievements Dialog with the dimensions (Display Achievements Dialog Button Size X, Display Achievements Dialog Button Size Y) anchored to Bottom Right with an offset of ((Display Achievements Dialog Button Offset + Display Achievements Dialog Button Size X), Display Achievements Dialog Button Offset) setting the tooltip to "Previous" with button text "<<" and the hover image set to ""
            Variable - Set Display Achievements Dialog Buttons[1] = (Last created dialog item)
            Dialog - Create a button for dialog Display Achievements Dialog with the dimensions (Display Achievements Dialog Button Size X, Display Achievements Dialog Button Size Y) anchored to Bottom Right with an offset of (Display Achievements Dialog Button Offset, Display Achievements Dialog Button Offset) setting the tooltip to "Next" with button text ">>" and the hover image set to ""
            Variable - Set Display Achievements Dialog Buttons[2] = (Last created dialog item)
            Dialog - Create a button for dialog Display Achievements Dialog with the dimensions (Display Achievements Close Button Size, Display Achievements Close Button Size) anchored to Top Right with an offset of (Display Achievements Close Button Offset, Display Achievements Close Button Offset) setting the tooltip to "Close Achievements" with button text "X" and the hover image set to ""
            Variable - Set Display Achievements Dialog Buttons[3] = (Last created dialog item)
            ------- I used Integer loop here to speed things up, creating however many dialogs are set to MaxPages.
            General - For each integer I from 1 to Display Achievements Max Pages with increment 1, do (Actions)
                Actions
                    Dialog - Create a label for dialog Display Achievements Dialog with the dimensions (300, 50) anchored to Center with an offset of (60, 0) with the text ("Dialog Item Text " + (Text(I))) color set to White text writeout set to False with a writeout duration of 1.0
                    Variable - Set Display Achievements Dialog Labels[I] = (Last created dialog item)
                    Dialog - Create an image for dialog (Last created dialog) with the dimensions (76, 76) anchored to Top Left with an offset of (50, 50) setting the tooltip to "" using the image Assets\Textures\btn-unit-zerg-zergling.dds as a Normal type with tiled set to True tint color White and blend mode Normal
                    Variable - Set Display Achievements Image Zergling[1] = (Last created dialog item)
                    Dialog - Create an image for dialog (Last created dialog) with the dimensions (76, 76) anchored to Top Left with an offset of (126, 50) setting the tooltip to "" using the image Assets\Textures\btn-unit-zerg-zergling.dds as a Normal type with tiled set to True tint color White and blend mode Normal
                    Variable - Set Display Achievements Image Zergling[2] = (Last created dialog item)
                    ------- Make sure to Hide the Dialog Item.
                    Dialog - Hide Display Achievements Dialog Labels[I] for (All players)
            ------- Now we setup and show the Dialog to the player.
            Dialog - Show Display Achievements Dialog for (Player group((Triggering player)))
            Dialog - Show Display Achievements Dialog Labels[Display Achievements First Page] for (Player group((Triggering player)))
    

    And finally the dialog click trigger for changing which page you are seeing

    DialogClicked
        Events
            Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
        Local Variables
            Clicked Dialog Button = (Used dialog item) <Dialog Item>
        Conditions
        Actions
            ------- Checks to see if they clicked the LEFT, Previous button.
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Clicked Dialog Button == Display Achievements Dialog Buttons[1]
                Then
                    Dialog - Hide Display Achievements Dialog Labels[Display Achievements Current Page] for (All players)
                    Variable - Set Display Achievements Current Page = (Display Achievements Current Page - 1)
                    ------- This IF THEN checks to see if it needs to loop the Current Page to the End.
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Display Achievements Current Page < Display Achievements First Page
                        Then
                            Variable - Set Display Achievements Current Page = Display Achievements Max Pages
                        Else
                    Dialog - Show Display Achievements Dialog Labels[Display Achievements Current Page] for (All players)
                Else
            ------- Checks to see if they clicked the RIGHT, Next button.
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Clicked Dialog Button == Display Achievements Dialog Buttons[2]
                Then
                    Dialog - Hide Display Achievements Dialog Labels[Display Achievements Current Page] for (All players)
                    Variable - Set Display Achievements Current Page = (Display Achievements Current Page + 1)
                    ------- This IF THEN checks to see if it needs to loop the Current Page to the Beginning.
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Display Achievements Current Page > Display Achievements Max Pages
                        Then
                            Variable - Set Display Achievements Current Page = Display Achievements First Page
                        Else
                    Dialog - Show Display Achievements Dialog Labels[Display Achievements Current Page] for (All players)
                Else
            ------- Checks to see if they clicked the CLOSE button.
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Clicked Dialog Button == Display Achievements Dialog Buttons[3]
                Then
                    Dialog - Hide Display Achievements Dialog Labels[Display Achievements Current Page] for (Player group((Triggering player)))
                    Dialog - Hide Display Achievements Dialog for (Player group((Triggering player)))
                    Dialog - Show Achevements Button Dialog for (Player group((Triggering player)))
                Else
    

    Thank you Dustin374 for posting your map and I just modified what you posted to what I needed.

    Faust

    Posted in: Triggers
  • 0

    posted a message on Need Help with Dialogs?

    @Pshyched: Go

    Hi Psyched! Thanks for posting this and I hope the offer still stands. I made a thread about a custom achievement dialog and received some great help, but I still need a tip or two. The thread can be found here. Any help you can provide would be greatly appreciated!

    Thanks!

    Faust.

    Posted in: Triggers
  • 0

    posted a message on Multiple page custom Achievement dialog

    @Faust7777: Go

    Ok, so this is what I was trying to do and it works for me when I am testing. The question is, will it work for 4 players and each player can use it without affecting the other players?

    //

    edit: I noticed that the buttons are no longer hiding the previous screens. Also, I am getting the famous param/value errors due to localization. I think I can fix that on my own though.

    Posted in: Triggers
  • 0

    posted a message on Multiple page custom Achievement dialog

    @StragusMapster: Go

    Actually, the achievements are the same for each player. I basically show a red image if the specific user doesn't have the achievement and a normal image if he/she does. Each player has the same dialog, but whether or not the image is red or normal depends on each user's own achievements. I hope that was understandable. :)

    What Dustin sent may be what I am looking for but I still have to mess with it to make sure. Like I wrote in the post above, there are a lot of All Players where I think Triggering Player should be used...but I may be wrong. If you could have a look at the map he posted, that would help a great deal.

    Again, to reiterate, I need a the same dialog to show for each of the four players individually. For example, if player one and player two are both looking at the dialog at the same time, they should be able to change pages and close the dialog without affecting the other player.

    Thanks!!

    Faust

    Posted in: Triggers
  • 0

    posted a message on Multiple page custom Achievement dialog
    Quote from Dustin374: Go

    I've attached a map I did that demonstrtes how to achieve what you're trying to do.

    Thanks Dustin! I did however notice that you show the dialog items to all players. Shouldn't that be Triggering Player?

    Also, to make the dialog appear after clicking an Achievement button, I would just show for triggering player right? And after clicking a Close button, hide for triggering player? Am I getting this? ^^

    Posted in: Triggers
  • 0

    posted a message on Multiple page custom Achievement dialog

    Hi guys. I have learned so much from this site and wish to thank you all for posting your knowledge!!

    I have been trying to create a 4 page ( or just a scrolling dialog would be fine too. basically I want to be able to add new achievements without too much work ) custom Achievement dialog for my game. It works fine ( although my programming leaves much to be desired ) for me when I test it, but when multiple players are in the game, it goes wacky. For example: If I open the dialog, and then another player opens the dialog, only he can scroll through the pages. The achievements earned are loaded and saved correctly. I am just having a problem with the player group (player) or even triggering player.

    I was hoping that someone could possibly do a tutorial on something like this before I go insane. I think I just programmed it wrong as I have zero loops and I think this is necessary ( there are a lot of achievements ) to be able to have them all in one trigger.

    What I was trying to do:

    There is an Achievements button that is shown for up to 4 players. When any player clicks on the Achievements button, it hides and shows the Achievements dialog with all Achievements that player has earned. The player should be able to switch between pages (or if this can be done with a scroll bar, even better) and be able to close each page without affecting another player's Achievement dialog.

    Relatively simple I think, and I have most of it working. I just think I went about it all wrong.

    Please help me save my sanity and write a tutorial for this. My code is a mess. I have way too many variables and triggers after watching numerous other tutorials on similar dialogs.

    Thanks for reading.

    Faust

    P.S. I can post the code I have if needed, but I would rather not as I think it is just a huge mess.

    Posted in: Triggers
  • To post a comment, please or register a new account.