Show a particle explosion before changing scene to "game over"? (solved)

so i want there to be a particle explosion when my player dies from certain conditions and then change to a game over scene but the problem is that it either changes scene without showing the particles or either there are no particles at all. how do i fix this issue?

I dont know the particle system, so I can’t help with its settings. but

have you tryed the “no more particles” condition? or simply use a scene timer to change the scene?

Do you “Create object” particles when the player dies and set timer to delay the game over scene? Can you show the code? Use Windows Snipping tool (if you have Win)

1 Like

yeah ive tried both, they change the scene as intended but then dont show the particles

wait,wait. I dont understand.

you want to show the particles before or after the scene change??

before the scene changes

can you show a screenshot or something from the events?

ok wait a little, i think it might have figuired it out, if it dosent work then ill send the screenshot

ok so here im creating the timer and at all other condition where the player dies

and here im changing the scene

but it changes the scene after the 4 seconds even if the prior conditions arent met.
hope u understand

yes. the problem is the timer. when you check the state of a timer (or a variable) in a condition, GDevelop create it in the memory automatically with a value of “0”. so using a single condition “the timer is greater than …” will create and start the timer! so using it alone isn’t enough. you should use a variable to enable checking the timer. but make sure the variable be the first condition in the event! otherwise the timer start ticking, and when the variable switch, the action executed immediately, because the timer’s value will be great enough.

or, an another solution is to this problem is:
you create and pause the ivolved timer at the beginning of the scene, and just unpause when needed. so there is no need to use another variable this way.

thanks bro this solution was pure genius :slight_smile:

1 Like