The Daily Click ::. Forums ::. Klik Coding Help ::. Double jumping
 

Post Reply  Post Oekaki 
 

Posted By Message

Hideki



Registered
  06/08/2003
Points
  21
22nd November, 2003 at 12:45:51 -

alrite i need help with double jumping and the slopes thingy, i wanna know how you do double jumps, ive tried it and it sorta works but not all the time and that aint good, and i was ust wandering how u program slopes.

 
n/a

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
22nd November, 2003 at 12:50:07 -

How have you programmed your custom platform engine (i don't think it can be done with easily with the built in engine) ? we can't help you much without any info on that...

 
n/a

Hideki



Registered
  06/08/2003
Points
  21
22nd November, 2003 at 15:51:01 -

well its custom platform movement, it uses the loop function, ive been advised to use loops, and basically when uthis is wot ive tried)
press (the jump button)
plus floor collider is not overlapping a backdrop
set alterable value c to 1,
set alt. b to -5

press (the jump button)
plus floor collider is not overlapping a backdrop
plus alt. c is equal to 1,
then subtract 5 from alt. b
set alt.c to 2

press (jump button)
plus floor collider is not over lapping a backdrop
plus alt.c is equal to 2
then ignore control

it works but only a few times(which is a bit annoying)



 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
23rd November, 2003 at 11:34:10 -

i usually make the character
get pushed up when overlapping a background
get pushed down when not overlapping a background

and not get pushed at all when jumping

 
.

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
23rd November, 2003 at 11:37:57 -

as for double jumping. example

space jumps but only when counter is less than 2

start of level counter = 0
everytime space is pressed add one to counter
when the character hits the floor set counter to 0

in theory it works


 
.

Hideki



Registered
  06/08/2003
Points
  21
23rd November, 2003 at 12:33:18 -

erm..forget the double jumping thing its kinda gettn on ma nerves because it dont work properly evn though i tried wot u said it still carries on jumping, but i need help on the animation, for some reason when i try an change the animation to shooting it plays it but too fast, ive tried decreasing the animation speed and everything but it still dont work and right now MMF is really buggn me, i need help, ive hea4rd about the custom animation thing but i think thats just a bit stupid(no offence)


 
n/a

Aali [Crazy_Productions]



Registered
  13/10/2002
Points
  843
23rd November, 2003 at 12:36:37 -

if that code doesn't work you've made something very wrong

 
"If Darl McBride was in charge, he'd probably make marriage unconstitutional too, since clearly it de-emphasizes the commercial nature of normal human interaction, and probably is a major impediment to the commercial growth of prostitution."
-- Linus Torvalds, December 5th 2003.

(Darl McBride is CEO of The SCO Group)


this place sucks but don't tell anyone, it's our little secret, ok?

Weston L



Registered
  16/12/2002
Points
  1603
25th November, 2003 at 15:54:06 -

Double jumps can be done with the built in platform movement!

Maybe I should write an article about it. Yeah, I will post a link to it here once it's done.

 
n/a

Weston L



Registered
  16/12/2002
Points
  1603
25th November, 2003 at 20:34:28 -

OK. Here it is:

http://www.create-games.com/article.asp?id=1214

 
n/a

renneF



Registered
  02/08/2003
Points
  672
26th November, 2003 at 09:39:23 -

I just made a custom platform movement with double jump, it's really easy to make.

 
Image

cake



Registered
  13/12/2002
Points
  1173
27th November, 2003 at 22:07:35 -

The reason it isn't working from what I can see is the "Floor collider is not overlapping backdrop" condition. You see, your gravity pushes the floor collider to overlap the floor, and your loop pushes the floor collider up to not overlap the floor. Basically this has the effect of you floor collider rapidly alternating between overlapping the floor and not overlapping, which is why your jumping only works some of the time.
Create a new object (call it say "Jump Control" or something) that sticks out a little below your floor collider, like 3 pixels, and sets position to the floor collider, so you now have a 3 pixel detector underneath the floor collider.
Now, for your jumping:

1.
Jump control is overlapping background
+ player presses <jump key>:
set <y velocity value> to -5
set flag 0 ("player") ON

2.
NOT Jump control is overlapping background
+ player presses <jump key>
+ <y velocity value> <= 0 /* Note, this condition is to make it so the double jump can only be performed while you are still going up, not when you are falling. You can remove it if u want */
+ flag 0 ("player") is ON
set <y velocity value> to -5
set flag 0 ("player") OFF

I think that should work, I didn't test it. Best of luck

Image Edited by the Author.

 
n/a

Daniel[Crazy_Productions]

Possibly Insane

Registered
  29/12/2002
Points
  2505
28th November, 2003 at 13:05:45 -

the problem with your shooting animation might be an event that sets the animation to stopped or wathever when the shooting animation is play and that makes it stop playing wich you will recognice as if it was playing too fast.

 
Beware of life ...so far noone have survived it.......

Daniel[Crazy_Productions]

Possibly Insane

Registered
  29/12/2002
Points
  2505
29th November, 2003 at 03:26:46 -

...you could try to check if the stopped or walking animation is play and then jump wich is a much better solution than another detector

 
Beware of life ...so far noone have survived it.......
   

Post Reply



 



Advertisement

Worth A Click