:If not(pxl-test(Y+2,X)
:Y+1->Y // or whatever you want to do for gravity
You should also use this to check if they should be able to jump or not::If (K=21)pxl-test(Y+2,X
:5->J // something that starts the jump
:Y-C->Y
:If not(pxl-test(Y+2,X
:C-1->C
Unfortunately, that means that it sometimes skips a few pixels and falls through the block... I failed and gave up on it, but now I realize that instead of doing that, you can do this::Y-(C>0)->Y
:Y+(C<0)->Y
:If not(pxl-test(Y+2,X
:C-1->C
The (C>0) will always be 1 until C is 0 or lower, and it will go up by 1 every time. The (C<0) will always be 1 when C is 0 or lower, and it will go down every time. :)
EDIT: You should probably store pxl-test(Y+2,X) to a variable, cause it is used a bunch of times.Or use some "Then", "End" and "Else" ;)
:If pxl-test(Y+2,X
:0->C
Should be:If pxl-test(Y+2,X) and (C<0)
:0->C
It was meant to stop the falling, so that gravity doesn't take effect upon landing.