Dialog/Unit Help and Explanation

N2o)

Retired.
Reaction score
51
I was thinking about doing a Final Fantasy Style Game with different units and w/e. So i made a dialog that could show infinate units and give me a maximum of 6 units per side. well thats the idea. For some reason however if i press next on my dialog to show more units then it goes onto player 2. and i can choose 6 units. If i do not press next and choose my first unit from my first dialog then when i try to choose my 2nd unit the dialog buttons go blank, this is hard to explain so i will show you a screenshot.
http://img166.imageshack.us/img166/3773/dialogzu9.jpg
Here are my codes:
Code:
Melee Initialization
    Events
        Map initialization
    Conditions
    Actions
        Melee Game - Use melee time of day (for all players)
        Set Chooses[0] = Footman
        Set Chooses[1] = Knight
        Set Chooses[2] = Rifleman
        Set Chooses[3] = Mortar Team
        Set Chooses[4] = Flying Machine
        Set Chooses[5] = Gryphon Rider
        Set Chooses[6] = Priest
        Set Chooses[7] = Sorceress
        Set Chooses[8] = Siege Engine
        Set Chooses[9] = Spell Breaker
        Set Chooses[10] = Dragonhawk Rider
        Set Chooses[11] = Paladin
        Set Chooses[12] = Archmage
        Set Chooses[13] = Peasant
        Set Chooses[14] = Archmage
        Set Chooses[15] = Mountain King
        Set Chooses[16] = Blood Mage
        Set Chooses[17] = Peon
        Wait 1.00 seconds
        Trigger - Run Pick <gen> (ignoring conditions)
        Custom script:   call DestroyTrigger (GetTriggeringTrigger())
Code:
Pick
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                UnitNumber Less than 6
            Then - Actions
                Dialog - Clear Dialog
                Dialog - Change the title of Dialog to ((Choose your Unit  + (String((UnitNumber + 1)))) + !)
                For each (Integer A) from 0 to 7, do (Actions)
                    Loop - Actions
                        Dialog - Create a dialog button for Dialog labelled (String(Chooses[((Integer A) + Plusser)]))
                        Set DialogButton[(Integer A)] = (Last created dialog Button)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Plusser Less than 100
                    Then - Actions
                        Dialog - Create a dialog button for Dialog labelled Next
                        Set DialogButton[8] = (Last created dialog Button)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Plusser Greater than 0
                    Then - Actions
                        Dialog - Create a dialog button for Dialog labelled Back
                        Set DialogButton[9] = (Last created dialog Button)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        UnitNumber Greater than 0
                    Then - Actions
                        Dialog - Create a dialog button for Dialog labelled Finish
                        Set DialogButton[10] = (Last created dialog Button)
                    Else - Actions
                Dialog - Show Dialog for Player 1 (Red)
            Else - Actions
                Dialog - Clear Dialog
                Dialog - Create a dialog button for Dialog labelled Finish
                Set DialogButton[10] = (Last created dialog Button)
                Dialog - Show Dialog for Player 1 (Red)
Code:
Picked
    Events
        Dialog - A dialog button is clicked for Dialog
    Conditions
    Actions
        For each (Integer A) from 0 to 7, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Clicked dialog button) Equal to DialogButton[(Integer A)]
                    Then - Actions
                        Set UnitNumber = (UnitNumber + 1)
                        Set MaxUnits[Player] = UnitNumber
                        Unit - Create 1 Chooses[((Integer A) + Plusser)] for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
                        If (Player Equal to 1) then do (Set P1Units[UnitNumber] = (Last created unit)) else do (Set P2Units[UnitNumber] = (Last created unit))
                        Trigger - Run Pick <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 DialogButton[8]
            Then - Actions
                Set Plusser = (Plusser + 8)
                Trigger - Run Pick <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 DialogButton[9]
            Then - Actions
                Set Plusser = (Plusser - 8)
                Trigger - Run Pick <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 DialogButton[10]
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Player Equal to 1
                    Then - Actions
                        Game - Display to (All players) the text: Test
                        Set Player = (Player + 1)
                        Set UnitNumber = 0
                        Trigger - Run Pick <gen> (ignoring conditions)
                    Else - Actions
            Else - Actions
Variables: Chooses - Unit Type Array
UnitNumber - Integer
Player - Integer
Dialog - Dialog
DialogButton - Dialog Button Array
P1Units - Unit Array
P2Units - Unit Array
Can anybody help?
 
General chit-chat
Help Users
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/
  • The Helper The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    Sticking with the desserts for now the latest recipe is Fried Apple Pies - https://www.thehelper.net/threads/recipe-fried-apple-pies.194297/
  • The Helper The Helper:
    Finally finding about some of the bots that are flooding the users online - bytespider apparently is a huge offender here - ignores robots.txt and comes in from a ton of different IPs
  • Monovertex Monovertex:
    @The Helper I'm really not seeing the "Signature" link in the sidebar on that page. Here's a screenshot:
  • The Helper The Helper:
    I have reported it - I was wondering why nobody I have given sigs to over the last few years have used them
  • The Helper The Helper:
    Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.
  • The Helper The Helper:
    Here is a better place to manage this stuff https://www.thehelper.net/account/account-details which I think should be way more visible
  • The Helper The Helper:
    I am hoping that online user count drop is finally that TikTok bot banned

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top