Jumping while running with controls

Michael WallenMichael Wallen Member, BASIC Posts: 18
edited November -1 in Working with GS (Mac)
I've been trying for several days now to get my actor to jump while running left or right. I've read through the jumping tutorial and some of the posts on this forum and I still can't get it to work. I have left and right buttons as actors and I also have a jump button. Any help would be greatly appreciated.

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    have a attribute called jump. In your jump button have when touch is pressed change attribute jump to 1 and another rule when touch is released change jump to 0.

    then a rule in your player if attribute jump =1 change attribute self position y to self position y+100

    That should work while your running, and to make it jump higher or lower just change the 100 number
  • Michael WallenMichael Wallen Member, BASIC Posts: 18
    Thanks for the help!
  • NachozNachoz Member Posts: 52
    my best solution after being stuck with the same problem for a few hours was to change my gravity to 500 or more make regular move left and move right buttons and as tshirt booth mentioned make the jump button change velocity Y to whatever you feel is a high enough jump distance, youll have to test a few times till you get the right feel for the game your making,
    cheers
  • NachozNachoz Member Posts: 52
    o forgot to mention add as part of the jump rule the that player must collide with ground or whatever actor is the floor or you will be able to jump endless amount of times.
Sign In or Register to comment.