logo hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    Crash array spawn timer

    Scheduled Pinned Locked Moved
    Bug Reports
    3
    6
    480
    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.
    • S
      Stephenn
      last edited by

      When I use this with a timer and random numbers the app crashes when I start the game.0_1494272193626_IMG_1339.PNG

      1 Reply Last reply Reply Quote 0
      • Aidan_FireA
        Aidan_Fire
        last edited by

        Is that the crate that is spawning the crate? If so, it's crashing because right at the start the crate must be spawning itself, then the new crates are spawning themselves, and as you can see you get an insane amount of crates very quickly, then hyperPad will crash because too many crates.

        1 Reply Last reply Reply Quote 0
        • S
          Stephenn
          last edited by

          No, it's not spawning itself. I got a random x value and y value, checked if they were on the grid and spawned a crate on them.

          1 Reply Last reply Reply Quote 0
          • S
            Stephenn
            last edited by

            0_1494323559683_IMG_1340.PNG 0_1494323621510_IMG_1343.PNG 0_1494323589209_IMG_1341.PNG

            Jack8680J 1 Reply Last reply Reply Quote 0
            • Jack8680J
              Jack8680 @Stephenn
              last edited by Jack8680

              @Stephenn I'm guessing it's because you're comparing the add values and multiply values (numbers) with arrays.

              The if behaviour doesn't loop through each of the array values like that, what you'd need to do is use a loop that activates the same number of times as the number of values you have in your array, then use the get array value behaviour with the index set to the index output from the loop. That way, it will check whether the positions are equal to each value in the array.

              1 Reply Last reply Reply Quote 0
              • S
                Stephenn
                last edited by

                Oh, ok thank you.

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