ID:1696202
 
Code:
onClipEvent (load) {
power = 0.6;
yspeed = 0;
xspeed = 0;
gravity = 0.1
jump = 0;
mass = 4; s
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
xspeed -= power;
}
if (Key.isDown(Key.RIGHT)) {
xspeed += power;
}
if (Key.isDown(Key.UP)) {
if (jump == 0) {
jump = 1;
yspeed = 8;
}
}


if (jump == 0) {
_y += yspeed;
yspeed += (gravity * mass);
}
else {
_y -= yspeed;
if (yspeed > 0) {
yspeed -= (gravity * mass);
}
else {
yspeed = 0;
jump = 0;
}
}
_x += xspeed;
if (_root.piso.hitTest(this._x, this._y, true)) {
yspeed = 0;
}
}


Problem description:
I want it to NOT jump when it is already jumping. Can someone help me please? Thanks :D
Why was this put in off topic, again?
Why would it be anywhere else?
In response to Nadrew
Nadrew wrote:
Why would it be anywhere else?

Dev help.
In response to Xorbah
We try to keep Developer Help specifically focused on DM. Having other programming languages muddles it up a bit.
In response to LordAndrew
LordAndrew wrote:
We try to keep Developer Help specifically focused on DM. Having other programming languages muddles it up a bit.

Alllllrighty.

Can you explain the problem in a little more detail?

(Alternatively, switch to AS3 already. It's been out for what, seven years now?)