As you can see in the images below, some of the spikes are away from where they are supposed to be. This only happens when I enter from the menu to the game mode . After I die , if I press Try Again, the game start working perfectlly fine. Also on the PC I do not have any of those problems. I tryed to spawn them at exactly coordonates(it didn't work) also I tried to spawn them on dynamic coordonates(eg. wall.x+40 ) still nothing. I tryed to reset all the Variables at the start of the layout/when I click the button (from the menu) to simulate the conditions from pressing the Try Again button.
Any other ideeas?
How are you currently spawning the spikes?
Develop games in your browser. Powerful, performant & highly capable.
(Every 1 second ---> row1 choose(1,2) . If row=1 - Spawn Spike on layer X at X,y. )
But i managed to resolve this by adding a new layer with : Click me to begin!.
So the spawn will begin only after the click. Thank you anyway.
If you wanted to save having to transfer through what is essentially a blank layer, spawn the spikes on the menu screen but hide them. When the layout loads, set them to Visible and the positions should be loaded, and you save the user a meaningless click, .