0 Favourites

Player moves towards left of screen when falling...

  • I've come across a small issue with my autorunner game which i don't know how to fix.

    What happens is when my player falls of a platform (without jumping), it moves gradually to the left of the screen. When the player jumps, it's fine, its only when you let the player fall of the platform that this happens.

    It's a slight movement but i have double jump so if you just fall of the platform and then jump and do it continuously, you'll see the player getting closer and closer to the left of the screen.

    I've tried changing the platform behaviours such as gravity etc but haven't found a way to fix this. Can someone help me with this?

  • if you want to keep something at a fix x position, just set the sprite the that x position everytick

    or if sprite.x != value

    set sprite.x to value

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • I tried that and although it worked in keeping the player from moving left, weird things start to happen such as the player falling through platforms and skipping postitions so i don't want that.

    Are there any other methods?

  • Try this simple solution. I've use this solution in my auto runner.

  • Thanks, i've tried it and it does prevent the player going to the left but my player starts to judder slightly to the left and the move to its original postition when i fall. I don't really like that as it doesn't look great on my game.

    I appriciate taking the time out to help and apologise that your solutions are not working for me.

    Are there any other suggestions?

  • Hi,

    I add the same problem as you with my autorunner,

    and did some research and found this :

    http://www.scirra.com/arcade/example/59 ... -runner-v2

    You can see that in this version, there is no problem with the player when falling.

    (There is a link on the page to download the capx)

    Its is because the ground is not a bullet and the "game" is just scrolling to player automatically.

    See : System Scroll to Plaxer.X + **

    And you also need to change to YES the Unbounded Scrolling Property in the layout properties

    Et voila.

  • That hasn't worked either, maybe it has something to do with my Behaviour settings? I don't know.

    Could you perhaps try my capx to see if it works for you? Just in case i'm doing something wrong...

  • Yeah in your case it is more complex than mine and i'm not a pro yet.

    But since your game is quite like the auto-runner from the template, you should look at the version 2 from DatapawWolf.

    I'm sure you will find a way to resolve your problem in his capx

  • I've already downloaded that capx and tried it with mines but with no luck

    Still trying to find a solution to this issue...

  • Sorry to bump this but can anyone else help me out?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
564 105,217
rexrainbow's avatar
rexrainbow
Unread hot topic
168 15,519
Lumicreative's avatar
Lumicreative
Unread hot topic
0 Favourites
[plugin] Youtube player
175 20,544
rexrainbow's avatar
rexrainbow