Jump only once when button pressed help

wildj0kerwildj0ker Member Posts: 10
edited December 2011 in Working with GS (Mac)
Hi guys, Need some help with my jump controls. Right now my actor will continue jumping if the button is kept pressed down and grounded.
I am trying to get my actor to only jump once forcing the user to have to press the button again in order to jump again.
My rule is set up as follows

When button pressed is true
self grounded true
------------
Change self motion lin velocity Y to 950

Forum search not working for me . Thanks for any help

Comments

  • wildj0kerwildj0ker Member Posts: 10
    I will give that a shot. Thanks again TSB!
  • wildj0kerwildj0ker Member Posts: 10
    I gave it a shot and my actor keep still continues to jump if button is held down. He not doing a mid air jump
    which is good. I am just trying to get actor to jump once even if the button is held down. Any ideas?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    That's because the rule when overlaps with ground is turning it back to true even when the button is pressed. I would try this. Rule when touch is pressed and game.jump is true: timer for (time you want for jump to last) change self motion Lin velocity Y 950 and a rule inside the touch rule, when touch is released change att game.jump to false.
  • wildj0kerwildj0ker Member Posts: 10
    That worked perfectly! Thank you very much for your time.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited December 2011
    No problem wildjoker, it could probably been tweeked.a.bit better that was just off the top of my head. That will give you a semi Max jump as you could Tweek it to do the velocity for the length of the touch and having the timer work as a Max jump time.
Sign In or Register to comment.