[AS]onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x += 5;
} else if (Key.isDown(Key.LEFT)) {
this._x -= 5;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP) && !jumping) {
vel_y = 36;
jumping = true;
}
if (jumping == true) {
vel_y -= 2;
if (vel_y<=-15) {
vel_y = -15;
}
this._y -= vel_y;
}
if (_root.ground.hitTest(this._x, this._y+35, true)) {
vel_y = 0;
jumping = false;
}
}
onClipEvent (enterFrame) {
this._y += 16;
if (_root.ground.hitTest(this._x, this._y+1, true)) {
this._y -= 16;
}
}
[/AS]
That’s the script I have on my character. Inside my mc called ground I have another mc which has an mc containing a moving platform. My character hittest okay with it, but once I jump onto it the platform continues to move and my character just falls off. What would I need to do so that the character stays on? Anyways any help would be greatly appreciated :).
EDIT: Why can’t you upload fla’s anymore? Since when did this happen :h:?