Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.
How do I… add a jump cooldown?
What is the expected result
It’s to have a jump cooldown.
What is the actual result
I can just hold the space bar and the character just jumps as soon as it hits the floor and that looks trash.
( I don’t know how to upload screenshots on here )
Use a timer (scene or object), and to the character add a boolean instance variable, say called JumpCoolingActive.
Uncheck the platform character behaviour to use default values:
Because you aren’t using the default controls, you’ll have to code for the movement keypresses. Use the following events as a guide (change to timer check value for longer/shorter delays):
Im sory but ur advice didnt work, i made a youtube video on my project so that might help. if it looks low quatity, go on fullscreen
also i might not reply staright away cuz i might be asleep
Can you screen shot the events? Because that snippet I posted worked fine for me, so I suspect you’ve mistyped something.
sorry but i have to sleep and ill be in school a few minutes after i wake up so my next reply might be in a few hours
You are checking the value of a global variable; it should be an instance variable of the player object:
Thank you the cooldown works now, i am gonna make it shorter though because 3 seconds is prob too long. i also found a bug that if u hold the space bar, it keeps on playing my jump animation but i fixed that now with this code ( its on the last line at the bottom )