[Solved] My player doesn't die when it falls off the platform

I am new to GDevelop and was trying to make my character die when it fell off the platform.
@andryimtv suggested, on a similar topic, to make a timer, so after 5 seconds of falling it would reset the game.
I tried it. It didn’t work. I would like some alternatives please :sweat_smile::smiley:
Thank you :relaxed:
Link to ToxicDesign’s post:Platform drop death
Link to andriymtv’s profile:Profile - andriymtv - GDevelop Forum

Edit: it may be my immaculate coding skills that are at fault

Hey! Please post a picture of your events, we can’t help you if we don’t know what’s going on exactly :wink:
See About the How do I...? category - #4 by arthuro555.


these are the events that I made for the timer :relaxed: hope they are helpful
sorry if the image is small

You should put an trigger once in the “Is player falling” event as it is constantly resetting the timer while the player is falling

1 Like

thank you very much! Nevermind, I have found a way, where i make an invisible boundary sprite, and if the player hits it, it resets the level! I will keep your way in mind though :sweat_smile::relaxed:

There is a little logic issue here. You are resetting the timer before checking it’s value. Therefore, the condition will never be met, as the timer is set again to 0 just before you check it’s value. What you want to do is:
Reset the timer when the player leaves the ground, so player is falling and trigger once, else it’ll continue resetting until you are not falling anymore.
Then, you want to not have the event that checks the timer as a sub condition of the first, as you want the timer to always be checked, not only the moment it is resetted.
Finally, you want to check if the player is not falling, then stop the timer. Else, the timer wouldn’t stop after you got back on the ground.

1 Like

How do I make the post solved?

thank you
very much
hey anyone thought that this is a mix of facebook and reddit but for gdevelop?