Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Jumping once [Resolved]

In my game, I'm trying to make an ability to jump over obstacles. Now, I've got everything as well as possible, using a conditional branch to know when the player is pressing the right button, but my problem is: the character wants to be a rabbit! They won't stop jumping until the button is no longer being pressed.

How do I make the character jump only once when the button has been pressed? I know there's a 'Jump System' in the tutorial, but I can't get my head around it.

Please help.
 
Have you tried using a switch to refuse the player from jumping again? Like this:

Condition Branch: Button X is pressed
Condition Branch: Switch 0001 == OFF
  @>: Set Move Route
  @>: Jump, whatever direction
  @>: Control Switches: [0001: Disallow jump] = ON
Else
  @>: Control Switches: [0001: Disallow jump] = OFF
End

If that doesn't work I have no idea how to fix your problem unless you provide me some more details.
 
Tell him to jump then wait about a second... (20 frames in rmxp, 60 in vx)
It happens because the event repeats itself, no matter how long the button is pushed down for.
Unless there is a loop, adding waits should work. If the ones I said don't, just increase them.
 
I am reckoning that he is using a paralell common event for the fact he wants a specific button to be pressed to jump. Like in for instance jump at any location in the world. The method I posted should work in this case, though if you could provide us a screenshot of your event so we can see where it is placed if this doesn't work, it would help a lot.
 
bradleydfc":3lutrycd said:
Tell him to jump then wait about a second... (20 frames in rmxp, 60 in vx)
It happens because the event repeats itself, no matter how long the button is pushed down for.
Unless there is a loop, adding waits should work. If the ones I said don't, just increase them.
I did what you said, and it worked. I was using a 4 frame wait. Thanks for all your help.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top