Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord
    1. Home
    2. Tags
    3. array
    Log in to post
    • All categories
    • Linser22

      Removing an item from a dynamic array
      Help • array • • Linser22

      6
      0
      Votes
      6
      Posts
      1188
      Views

      Linser22

      @mozipha

      This is what I ended up going with it’s a little messy but I’ll put it here incase it’s helpful to anyone else. I’m working with sprites so I believe I can’t just sprite[0] = sprite[1]. If you can I haven’t been able to get it to work.
      Thanks again.

      function remove(ref o_array, index) array n_array[len(o_array) - 1] var offset = 0 var i for i = 0 to len(n_array) loop if i == index then offset = 1 endif n_array = createSprite() setSpriteImage( n_array[i], block_image ) setSpritelocation( n_array[i], getSpriteLocation( o_array[ i + offset ] ).x, getSpriteLocation( o_array[ i + offset ] ).y + ( offset *8 )) setSpritecolor( n_array[i], getSpriteColor( o_array[ i + offset ] ) ) removeSprite( o_array[i] ) repeat removeSprite(o_array[ len(o_array) - 1 ] ) return n_array
    • Ben 2.0

      Array Index Troubles
      Help • help error array • • Ben 2.0

      3
      1
      Votes
      3
      Posts
      828
      Views

      Ben 2.0

      Alright, I'll give it a go. Thanks for your help

    • spikey

      2-D string array with more columns than rows issue
      Bug Reporting (FUZE 4 Nintendo Switch) • array • • spikey

      10
      0
      Votes
      10
      Posts
      637
      Views

      pianofire

      @Starshine-Vixen Yes this seems to be a bug. I have tried it with the latest patch (which should be out soon) and it works as expected

    • spikey

      A copy of a colon-style defined array range fails to grow
      Bug Reporting (FUZE 4 Nintendo Switch) • array • • spikey

      3
      2
      Votes
      3
      Posts
      404
      Views

      xevdev

      Very interesting never seen that error code before

    • spikey

      Crash depending on preceding user actions
      Bug Reporting (FUZE 4 Nintendo Switch) • crash array • • spikey

      2
      3
      Votes
      2
      Posts
      423
      Views

      pianofire

      Thanks @spikey I will take a look. I can also try it on the new patch

    • spikey

      Array is ok with index -1
      Beginners • array • • spikey

      7
      1
      Votes
      7
      Posts
      605
      Views

      Dave

      The documentation needs a couple of updates, but this is an intended feature. You've done a great job there @spikey discovering the ins and outs. Expect help documentation to come which reflects this!

    • spikey

      array helper functions
      Beginners • array • • spikey

      10
      2
      Votes
      10
      Posts
      1667
      Views

      vinicity

      I did some quick tests, and it seems that the modified functions are definitely faster. Between 4 and 10 times in my little test scenarios...