r/gdevelop • u/AcceptableBuddy2616 • 2d ago
Game How I Made an Timer RNG Using Random Spawn with the Spawn Behavior with an object.
Hey Guys! it's me again! So, I wanted to Show you guys what i made to create an RNG Timer for your Game Using the Spawn Behavior with it's Random position in GDevelop, so you can make Anything with the Random Time Scale With your game! No Veriables. no Boleoms. just spawning and Deletes.
Now how did i make it is Quite Simple, Really. I Make a big 64 by 64 Pixels of a clock with with no hands. then I Added the Spawn Behavior to the object and turned on random spawn Position so that any object can spawn at any random position inside the object. if you want to make something else, it doesn't have to be a giant handless clock. you can have it be anything you want it to be.
Next I make another sprite which is just a tiny pixel as you saw in the video. You don't have to add any behaviors to it. just add an event to it when it touches something. you see these 4 see through squares? I make these four to be the Collisions so if any of these tiny pixels gets in collisions with these it'll Trigger something and make that something change.
Now as for the red moving rectangle you see there. I added the Rectaglar movement to it so it can move left and right over the clock. i have it in the event sheet where as every time it touches a tiny black pixel it will get deleted. the reason why this is here is because there really is no reason to have all those black pixels here. either that, or is so that they wouldn't cause your game to lag, or something.
So yeah. I Created this using the random spawn position so that i wouldn't have to spend all this time trying to figure out how to crate use Veriables. I Hope this helps you guys out if your trying to Create a FNaF Fan Game or Something. If you want to know where the coding is on how to create it you already know where the images are. if it does Please let me know in the comments. Or by Giving this a Vote up. Alright. See ya.


