how to make actor jump not fly
bigoldee
Member Posts: 5
Hi, I am creating a platform game using the template and would like my actor to jump and be able to jump again only when he touches the ground or another object. Currently what happens is that if you press the space bar repeatedly the actor can fly because it keeps jumping even in mid-air. If someone knows a solution I would greatly appreciate it.Thanks
Comments
http://img.photobucket.com/albums/v451/LotusHurt/jumprule.png
*create the "jump" attribute as a boolean and set it to false as default (this way the game knows that the character should not be jumping when the game starts.)
I didn't make the jump attribute as a boolean and it still works well.
Thanks again
If anyone has any other suggestions I would like to hear them.
The problem I am having is just like in the platform game demo, if you repeatedly
press jump your actor will fly.
Thanks.
thats because every time you collide with the "ground" your "jump" variable gets back to 0 and lets you jump again.
======= ============
============== ===============
The top dash would be ground actor, bottom dash wall actor.
So when you jump up & hit the bottom of the next platform it would not let you jump again. Hope this helps.
I tried to do what you said but I can't get my actor to fall down again...
What am I doing wrong
From Freztino
-JGary
Thanks for the help!
From Freztino