Had a major system crash recently though. Lost a few hours work on microfooty and a few days to rebuild my computer. Working better than ever now though.
Glad to hear you are keeping busy. You guys do such amazing work.
The only problem with what you said is that ( yvelocity == 0 ) at the peak of a jump too.
Controlling complexity is the essence of computer programming.
How come there is a yvelocity = 0 at peak of jump ? Do you have gravity on Draw Actor ? Did you put yvelocity = 0 at jump peak so that you obtain gravity ? If that is the case, I have probably a better way of doing that ...
Anyway, for your problem, you can use a variable.
On Collision with Platform, jump = 0;
On CollisionFinish with Platform, jump = 1;
So, onKeyDown, if ( jump == 0 ), Jump Action;
hi ingsan, i tried your solution. it works fine, except that there is still a very small chance that the player can double-jump (when at the peak of a jump). this is what jazz-e-bob was mentioning.
hi jazz-e-bob, platform guy is pretty cool. i'm digging into your code now.
the solution i tried was to set a global variable 'int onGround = 0' (my character starts in the air) and setting it to 'onGround = 1' whenever the player touches the ground. When the player presses the jump button, onGround is set to 0.
This pretty much kills the double-jump, but the character is still able to jump when you simply walk off a platform. I tried adding a collision finish script to set onGround to 0 when the character walks off a platform, but it didn't do anything.
another bug i'm working around is preventing the character from 'sticking' when you push against a wall mid-jump.