Jumping at an angle

butterbeanbutterbean Member, PRO Posts: 4,315
edited November -1 in Working with GS (Mac)
How do I program my main character to jump at an angle, and not straight up if the left or right key is held down with the jump key?


  • KamazarKamazar Member Posts: 287
    If space bar and right key are down, accelerate in direction 135... ?
  • TobyToby Member Posts: 478
    yep that works
  • butterbeanbutterbean Member, PRO Posts: 4,315
    So I created a game attribute boolean, called self on the ground

    When the player jumps straight up using the spacebar, she can only jump once

    When I put in a rule for her to jump at an angle, here's how I did it:

    When all conditions are valid:

    Actor receives event: Key, Space is down
    " " : Right Keyboard is down

    Change attribute:

    Self on the ground to : False

    Timer: For .5 seconds Run to completion is checked

    move direction: 28 relative to actor Move type: Additive

    Speed: 175

    Now what happens is when I hit the right and spacekey, she keeps jumping almost like she's triple jumping or floating, so she will keep jumping up to the right instead of landing on the ground, and resetting the jump

    How do I fix this?

  • butterbeanbutterbean Member, PRO Posts: 4,315
    Anyone? :)
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
Sign In or Register to comment.