How do I just make the player jump only left or right

  • Hi,

    I think I haven't had much sleep to work this simple objective out. All I want is my player sprite is to jump left or right when touching the left or right of the screen. I have pinned invisible boxes left, right and above his head to take on the simulated actions. I don't want the player to be able to walk left or right, just jump left and jump right or jump straight up if touching directly above his head. ANy ideas? This is what I have so far... but it will jump the first time then just goes left or right without jumping.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey DevDan : You can find a commented capx example attached to this post.

    Jumping is kind of a trigger. You only want to fire it at the start of a touch, and not continuously. And according to your code, the character will continuously move if the player is touching the object.

    Good luck going forward,

    Nathan

  • Ahh perfect. Thanks Will be a good start for my kangaroo hopping

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)