[SOLVED] Help with creating a platforming "Ghost Jump"

D

Docien

Guest
Often in platformers, especially ones that require extremely precise input, there's an effect called a Ghost Jump. Basically, in games where you're moving fast, you'll often time your jump a fraction of a second late, and since you're off the edge of a platform or no longer touching the ground, you wouldn't be able to jump. This can obviously be a bit frustrating, so I'm looking to recreate the ghost jumping effect. A ghost jump is essentially a few frames, possibly 5 or so, where you can jump even though you're no longer touching a floor.

I can't seem to find any tutorials on this, and I've already tried a thing of my own. Basically what I did was create a "canJump" variable that's set to true when you're "grounded". However, when you're not grounded, there's a very short timed alarm, set to about 5 frames long, that goes off and sets "canJump" to false. The issue is that this alarm never seemed to go off, making it so that I could jump infinitely, which is a bit of a problem. Any ideas on how else I could achieve the ghost jump effect? Just looking for pseudocode at most.

Thanks in advance! :'D

(I'm using GameMaker V 1.4, by the way!)
 
Last edited by a moderator:

Aaron Craig

Member
Nice. I was going to suggest something very similar to that, but my reply wouldn't have had all the pretty graphics. That looks to be a great way to implement the "ghost jump" effect.
 
D

Docien

Guest
Aaaand I whipped something up that works perfectly! Thank you guys for your help c:
 
Top