Me and my mother who's a teacher are making an "educational" game for her school.
Currently i'm trying to make the objects, which in this case are fruits, spawn in random, determined places
(Determined by the "Fruit Spawner Objects")
While i think the logic behind the while loop and the spawnObject function are sound, for some reason i cannot comprehend, sometimes the fruit stacks, and not all fruitSpawners are destroyed, i've tried a number of things with no luck whatsoever, can anybody help me?
Video of the problem (You can see that in the last few seconds the apple and the blueberry appear in the same spot, and one fruitSpawner instance is left.): i.gyazo.com/b56df6b8c65acade9c48f92820dc2389.mp4