The Daily Click ::. Forums ::. Klik Coding Help ::. Custom Jumping in Platform Games
 

Post Reply  Post Oekaki 
 

Posted By Message

MitchHM



Registered
  23/03/2007
Points
  501

Game of the Week Winner
29th August, 2008 at 14:17:31 -

Hey!

I'm working on a platform game, and I really want to make it so that the character jumps higher, the longer you hold the jump key. If you know what I mean, and can discribe to me how to do that, please do. Thank you in advance!

ps: If you have/make an example, I only have MMF 1.5

 
n/a

Introversity

Denture Disciple

Registered
  07/01/2007
Points
  42

Hero of TimeHas Donated, Thank You!
29th August, 2008 at 14:35:22 -

Just make it so that when you're not holding down the Jump key your downwards vertical acceleration increases while you're rising, and use a counter or alterable value so that you can't let go of the Jump key and then press it again mid jump to magically slow down and speed up.

 
Loves cute animals.

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
29th August, 2008 at 16:21:42 -

I use a way that might be a bit overly complicated.

character's Y value is attached to a counter called 'Jump'

character's alterable value (called MODE)
0 = set jump to 0 (stop)
1 = subtract 1 from jump (moves character up)
2 = add 1 to jump (moves character down)

flag on = do nothing
flag off = force character to fall (if mode is 1 set to 2)

upon pressing button 1 sets the mode to 1 and a flag on (and maybe setting the Jump counter to -10 or something for a little jump boost)

holding button 1 keeps flag on

not holding button 1 turns flag off

flag off + mode = 1 then turn mode to 2

if counter = -20 set mode to 2 and flag off (height of jump)

 
.

MitchHM



Registered
  23/03/2007
Points
  501

Game of the Week Winner
29th August, 2008 at 16:27:08 -

thanks guys, I'll try both

 
n/a
   

Post Reply



 



Advertisement

Worth A Click