Upside Down Air Jumping

Yodigi7

  • Posts: 16
I was looking for help with the upside down air jumping. I wanted to jump in the air with gravity being up rather than down.
~Tony :)

Tuo

  • *
  • Posts: 2469
What it takes is using custom gravity. You can use a speed incrementer in place of gravity to handle the situation. (for example, normal gravity would be "always incrementing y-speed" by about 1-1.5) You can change the type of speed to change the sides.

Here's my own gravity at work (all 4 directions): http://www.stencyl.com/game/play/18756
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

Photon

  • Posts: 2691
Why not just invert gravity and the direction of the jumping? I'm not sure you need custom gravity.
Do NOT PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!

Tuo

  • *
  • Posts: 2469
Aye, that can work too (Scene Palette -> World) although it's not as quickly customizable imo.
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

Yodigi7

  • Posts: 16
I have an almost finished behavior for it and only have one problem. The maximum number of jumps doesn't always work. Sometimes it will let you do up to 7 even though I have the maximum set to 3
~Tony :)

Tuo

  • *
  • Posts: 2469
Why are you combining a "is down" and "is pressed"? That's likely a part of your issue. Another issue is that the player hits the tiles for one frame after jumping (so after jumping off the tiles, it will still be at 0).
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

Yodigi7

  • Posts: 16
Yes, thanks, here is the final product I didn't realize until later that I should have combined the two. I finally have the working product. It is going to be on the Forge as well.
~Tony :)