You need to give the platform an instance name of "ground". If you look at the coding I'm using, it says
- Code: Select all
while (_root.ground.hitTest(_x, _y, true)) {
tjump = false;
_y--;
grav = 5;
the "_root.ground.hitTest" means that when the character his something that has the instance name of ground, it stops.
The rest of it is so that you can jump when you hit the ground.