How do I keep it on the same X axis when it runs and jumps

  • Example: example.c3p

    The linked c3p is the endless runner template you have on Construct with just an added sprite to demonstrate my problem.

    When you're running and jumping, the player sprite doesn't jump straight up, it goes a little bit forward and when landing it also has problems, I have added a red bar sprite to demonstrate it, after a few jumps you can end up being quite far away from your starting point.

    I would like it to always stay on the same X value.

    There is some tweaks at the end of the event sheet but it's not really working.

    How would you do it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You probably can just use every tick --> set X at the bottom of the event sheet.

  • As the last reply indicates, just reset it.

    Add a new global 'PlayerXSave'

    At Start of layout add System:set Value --> PlayerXSave to Player.X

    In System:EveryTIck (Event 5) add Player --> Set X to PlayerXSave

    Remove your fixes at event 8/9.

    This way, it will always keep it the same.

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