Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    I'm trying to create a randomized dungeon.

    Beginners
    9
    26
    1642
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • OrangePeel
      OrangePeel @CasualTie5 last edited by

      @CasualTie5 thanks. I’ll go do that now.

      1 Reply Last reply Reply Quote 0
      • OrangePeel
        OrangePeel @landein207 last edited by

        @landein207 I tried that, but because it was all the same variable in the end of the loop it ended up being the same still.

        1 Reply Last reply Reply Quote 0
        • PickleCatStars
          PickleCatStars F last edited by

          Post a screenshot of the bit that’s giving you trouble :)

          1 Reply Last reply Reply Quote 0
          • DomDom
            DomDom F last edited by DomDom

            This post is deleted!
            xevdev 1 Reply Last reply Reply Quote 1
            • DomDom
              DomDom F last edited by

              This post is deleted!
              OrangePeel 1 Reply Last reply Reply Quote 1
              • OrangePeel
                OrangePeel @DomDom last edited by

                @DomDom Okay, I'll try it.

                1 Reply Last reply Reply Quote 0
                • xevdev
                  xevdev F @DomDom last edited by

                  @DomDom surely 6 or greater

                  DomDom 1 Reply Last reply Reply Quote 0
                  • DomDom
                    DomDom F @xevdev last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • xevdev
                      xevdev F last edited by

                      No thanks kept clear of sprites and the map. But I believe you.

                      1 Reply Last reply Reply Quote 1
                      • Martin
                        Martin Fuze Team last edited by Martin

                        This is indeed a bug in the current (live) implementation of multi-deminsional arrays. The 2nd dimension (presumably 3rd+ too) will inherit the size of the first. I remember raising this issue previously.

                        I just checked and it is already fixed in the upcoming 2.15.0 release. So in 2.15.0 the sample will work as you expect.

                        It's a bit dirty, but as a workaround for now use this:

                        int MAX_COL = 26
                        int MAX_ROW = 6
                        array level[MAX_COL][MAX_COL]
                        
                        for row = 0 to MAX_ROW loop
                            for col = 0 to MAX_COL loop        // or len(level[0]) will work too here
                                level[row][col] = random(5)
                            repeat
                        repeat
                        

                        This is of course wasteful because it defines a 26 x 26 array, but at least it works

                        OrangePeel 1 Reply Last reply Reply Quote 3
                        • OrangePeel
                          OrangePeel @Martin last edited by

                          @Martin Alrighty, thanks! :)

                          1 Reply Last reply Reply Quote 2
                          • xevdev
                            xevdev F last edited by

                            So
                            I've been creating arrays
                            Array whatever [ 1 ]
                            And just increasing multi dimensional arrays and it seems to work.
                            If that makes sense.

                            CasualTie5 1 Reply Last reply Reply Quote 0
                            • PickleCatStars
                              PickleCatStars F last edited by

                              No, what do you mean?

                              1 Reply Last reply Reply Quote 1
                              • CasualTie5
                                CasualTie5 F @xevdev last edited by

                                @xevdev do you mean creating new elements of an array, even if they exceed the declared array length?
                                if yes, I'm pretty sure it is indeed an intended way of using arrays in FUZE

                                1 Reply Last reply Reply Quote 1
                                • xevdev
                                  xevdev F last edited by

                                  Yes exactly like that.

                                  1 Reply Last reply Reply Quote 1
                                  • First post
                                    Last post