You need to make a Flag that you are JUMPING or NOT (Or have a variable that shows up force, while gravity (each loop you you bring force a little more negative.)
If guy on ground, then you MAY check for a JUMP Button, but if guy in Air, forget checking if user hit jump - they are already airborne.
In your loop, if your UPFORCE>0 (going Up) then move guy up a little.
Each loop, (gravity) Take some off UPFORCE UNLESS Player at groundheight already. You're using floats, so no testing for exact numbers.
IF (PlayerY<=groundheight) then
PlayerY=GroundHeight
else
UPFORCE = UPFORCE - 0.01;
endif
Remember - you're in a loop! Think like you're in a loop!
Also - your in a MMORPG - and this is the puzzle you need to conquer to advance to the next level toward fame, fortune and glory!
NAME OF GAME: LIFE - Costs Nothing To Enter - Costs Everything to Leave!
Seriously - Give this a good think and good go of it.... Games are animated - you need to think in "One Frame at a time" until you start learning the logic that works versus why "broke stuff" has bad logic. Give this 4 hours before posting again... and then post the code you have - and I might ed-ja-ma-cate you
No Effort - No Helpy!
I KNOW YOU can do this!!!!!