Hey, I’m new to gdevelop, i’ve arledy made 2 other posts in this forum and i got the help i needed from them, because of that the game i’m making is coming along nicely, i have however run into a problem that i’m struggling to deal with, i’m trying to create a flappy bird type game ( it has rpg elements and simple enemies ).
The movement in the game is simple, theres a force acting on the player to make him move forward and the player just repeatedly jumps, the platforms that i use like you would pipes in the real flappy bird, are spawned randomly ( within some parammters, their height and lenght is all the same some are just pushed higher up or further down than others ).
The problem is that, i can’t delete the plaftforms when they are out of the screen without breaking the game;
I tried using the " destroy when outside of screen " behaviour, when i do that platforms don’t spawn, i tought " it’s probably just because they spawn outside the screen further ahead of the player". So i tried the same thing but with an extra border thats always 1000 pixels behind the “player” sprite X position, but the same thing happens.
I also tried the “pick nearest object” condition with the " delete an object " action, i just created a random imobile sprite behind where the player starts the game so that it’s not visible to the player and with a timer, slowly destroy the plaftforms that where closer to it. Doesn’t work my guess is that the delete platform command just deletes every platform behind or ahead of the player at the same time.
If somoene knew if there is a way to destroy a single instance of an object ( or rather 2, top and bottom platform but i’m sure i can figure that part out ), or how to make the behaviour work in the way i need it to, or if anyone has any other ideas or better ways to make this work i would really appreciate the help.
( I also tried making the player sprite immobile and adding a force to the platforms, but it’s not working because for the player i only add a constant force once, for the platforms i have to add it every time one spawns, and adding the force to a recently spawned one adds it to all the others too, making their speed increase like crazy, so if anyone knows how to add a force to a single instance ( again acctually 2 instances top and bottom ) i think that would work too )
Thanks in advance dor any help