Question #9350119

How can I make him fall if the up key isn't being held? AS2?

Here is the code of my guy that will jump and (even if you let go of the key) will fall down after a certain period of air time. if(Key.isDown(Key.UP)) { jumping_var = true } if (jumping_var == true) { this._y +=jumpSpeed_var; jumpSpeed_var +=1; if (this._y >=300) { jumping_var = false; jumpSpeed_var = -20; } How can I increment it so that when you let go of the key he starts too fall? I tried by using if(!Key.isDown(Key.UP)) but that didn't work.. Please help :)

2013-08-08 14:52:23

TELL US , if you have any answer

There is NEVER a problem, ONLY a challange!

The is a free-to-use knowledgebase.
  The was started on: 02.07.2010.
  It's free to register. Once you are a registered user, you can ask questions, or answer them.
  (Unless registration you can just answer the questions anonymously)
  Only english!!! Questions and answers in other languages will be deleted!!

Cheers: the PixelFighters


C'mon... follow us!

Made by, history, ect.