Right I’m creating a game of epic proportions. There are two things I request as I’m not sure on how to do them.
onClipEvent (load) {
grav_y = 0;
jumping = false;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.SPACE) && !jumping) {
grav_y = 15;
jumping = true;
}
if (jumping == true) {
grav_y -= 1;
if (grav_y<=-7.5) {
grav_y = -7.5;
}
this._y -= grav_y;
}
if (_root.ground.hitTest(this._x, this._y+45, true)) {
grav_y = 0;
jumping = false;
}
}
Thats the actionscript I’m using for my mc. But when the character jumps I want the characters pose to change, when it is in the air and when it hits the ground.
The other thing I’m stuck on is creating parametres for the character, so that it stops moving at certain points (at the edges of the ground and such). Any help on either/ both will be great.