im makin a minigame (before i start my real project, just to get the hang of it...) but, when my guy lands (especaly after a jump) he gets stuck in the ground ant it takes a few jumps before he is free enough to move. can you help me stop this?
i also want to make it so if the spacebar is held down (to always jump when you hit the ground) i do not want it to go to "stand" because it flashes by and looks ugly. can anyone fix this?
function jump_down(valueY) {
if (!this.stagemc.limitmc.hittest(this.Worm._x, this.Worm._y, true)) {
this.Worm._y += valuey;
} else {
// if you fall too deep in a limit, then you are placed correctly
for (i=1; i<=100; ) {
if (!this.stagemc.limitmc.hittest(this.Worm._x, this.Worm._y, true)) {
break;
}else{
this.Worm._y -= 1;
}
}
this.Worm.gotoAndStop("stand");
}
}
Dunno about the SPACE key being hold, I dont understand where the function is called from.