hi,
I need some help with an athletics game I’m making. I’ve got the basic script to make the guy run:
onClipEvent (load) {
SpaceKeyIsUp = true;
speed = 1;
}
onClipEvent (enterFrame) {
speed -= .2;
if (speed<=0) {
speed = 0;
}
if (Key.isDown(Key.SPACE)) {
if (spaceKeyIsUp == true) {
gotoAndStop(1);
speed += 1;
}
spaceKeyIsUp = false;
} else {
spaceKeyIsUp = true;
}
_x -= speed;
}
but i want to make other events like long jump, javelin etc and i dont know how to make it so speed and angle adds upto a good throw/jump.
can anyone help me out? thanks.