The Daily Click ::. Forums ::. Klik Coding Help ::. Variable jump height
 

Post Reply  Post Oekaki 
 

Posted By Message

Aptennap



Registered
  23/04/2004
Points
  916
24th October, 2008 at 14:36:49 -

How can I make that the longer you hold the jump button, the heigher the jump will be with PMO?

 
Oh sweet mary.

WillWill

Give me stuff

Registered
  24/07/2006
Points
  552
24th October, 2008 at 15:15:50 -

Not sure what you mean with PMO, but I take it you want it to be something like this:

Key Space is being pressed

- Set Object's Flag #0 to ON
- Add 1 to Object's Alterable Value A

Key Space is NOT being pressed
Object's Flag #0 is ON

- Set Object's Y position = Object Y - Object's Alterable Value A
- Substract 1 from Object's Alterable Value A

Alterable Value A is = 0
- Set Object's Flag #0 to OFF


Note that this one is far from perfect, but since you're not mentioning anything about having your own engine or such, this one should fit pretty well with what you're looking for. There's one flaw in this presentation which is that you can jump in the air once the "jump" value has gone to 0 (currently assuming you're using the in-built engine that does gravitation for you), but since I'm not very aware of the situation this is all I can offer at the moment.

Are you using sensors or anything like that? Backdrop objects?


 
http://www.morphboy.newgrounds.com/
^ Free tunes, as long as you contact me.

Aptennap



Registered
  23/04/2004
Points
  916
24th October, 2008 at 17:22:31 -

Thanks, I'll try this out. PMO is the Platform Movement Object.

 
Oh sweet mary.

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
24th October, 2008 at 17:46:18 -

Easy peasy lemon squeezy.
Just have a new event - player is holding shift (or whatever the key may be) - user input>user is holding the jump key in the air.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Aptennap



Registered
  23/04/2004
Points
  916
24th October, 2008 at 19:23:54 -

Wow that certainly was easy peasy lemon squeezy, thanks James!

 
Oh sweet mary.
   

Post Reply



 



Advertisement

Worth A Click