Crash array spawn timer



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



  • 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.



  • 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.



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



  • @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.



  • Oh, ok thank you.


Log in to reply