Player not jumping after changing sprite

0 favourites
  • 15 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • Hello guys!

    First time poster here. I'm trying to develop my first game (well, I started with an RPG but that's gonna take sooo much longer, ha) and I want to make a fun endless runner to get something out there.

    However, I'm running into a problem: sometimes my Player sprite won't jump.

    I've modified the Endless Runner template a bit to add some things, changed the art around, etc. But it's as soon as I change the sprite that things go weird.

    I've solved the scrolling speed issue (as soon as the sprite is animated the scrolling goes out of whack), but I can't seem to get rid of the "sometimes it won't jump" problem.

    I've already tried enabling the double jump and that has helped some but it didn't get rid of the problem completely.

    Any ideas?

    Link to capx: mediafire.com

    Thank you guys! Loving Construct 2 so far. So much easier than other stuff I've tried!

  • frame 0 of your runner has a different collision box then the rest

  • frame 0 of your runner has a different collision box then the rest

    Thank you!

    Fixed that but it still has the same issue.

    It also jumps forward sometimes.

    It's driving me nuts, haha.

  • the origins were a bit off so I set all of them to 0,0 and it stopped jumping forward. I'll bet the sprite is lifting off the ground when the origins shift.

  • the origins were a bit off so I set all of them to 0,0 and it stopped jumping forward. I'll bet the sprite is lifting off the ground when the origins shift.

    Is this what you meant?

    I did this for all of the frames but it still jumps forward. Funnily enough, it doesn't seem to be missing Jump commands anymore.

    But it does jump forward still.

    Thank you so much for your help! <3

  • I think I've narrowed it down: When the blocks are not used completely (when it randomly generates an incomplete block at the end) it jumps forward.

    Any ideas on how to solve this?

    I would prefer if it didn't render incomplete blocks at all, to be honest.

  • jump requires you to be touching the ground. when the origin changed by a pixel as your sprite ran through the animation so your runner was lifted off the ground.

    because the blocks are 32x32, you gotta make the random width divisible by 32.

    https://app.box.com/s/kqux3y35bno0q7ynvo7w2ufkx137i5wk

  • because the blocks are 32x32, you gotta make the random width divisible by 32.

    https://app.box.com/s/kqux3y35bno0q7ynvo7w2ufkx137i5wk

    Thank you! I really appreciate the capx, but any chance of a screencap instead? Running an older version of C2 than you and won't let me open the file. I'll leave the update downloading with my 3rd world internet overnight.

  • in event 6

    replace:

    block set size to width: 100 + random(400)

    with:

    block set size to width: 96 + (round(random(400)/32)*32)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • in event 6

    replace:

    block set size to width: 100 + random(400)

    with:

    block set size to width: 96 + (round(random(400)/32)*32)

    Thank you so much!

    Blocks are now uniform. But jumping forward at the end persists. Any further ideas?

    I made some changes to Events 9 and 10 to avoid Player getting relegated to the left of the screen which I think might/could be causing the issue?

    I'm attaching a new capx with all the changes you've suggested so far (thank you!!)

    New capx: mediafire.com

    Thank you so much for all the help, this is the first time I'm having fun developing games (tried RPG Maker and TyranoBuilder before).

  • idk why the computer is glitching like that, but the problem is the collision poly. on the first frame.

    do this: double click the runner to bring up the sprite editor, click the collision poly option, right click to get the drop down menu, select "set to bounding box"

    then for good measure right click for the drop down menu again and select apply to whole animation.

  • yeah c2 gives you alot more flexibility on what you can build than those other game makers. I've been using it for a couple years now, and really enjoy it.

    I even used it at my job to build a customer kiosk a few months ago.

    Anyway I'm pretty sure that your game should work now so i'm clocking out for the night.

    Welcome to C2.

  • yeah c2 gives you alot more flexibility on what you can build than those other game makers. I've been using it for a couple years now, and really enjoy it.

    I even used it at my job to build a customer kiosk a few months ago.

    Anyway I'm pretty sure that your game should work now so i'm clocking out for the night.

    Welcome to C2.

    I clocked out earlier than you did, haha. My fiancee isn't cool with me staying up to the wee hours just to solve bugs (yet!). But I just applied your changes and it works like a charm! Thank you so much!

    It's funny because these are placeholder graphics, so I will need to change them again soon-ish. But your advice will apply to all of the future changes that I make, so that I don't run into the same issue.

    Thank you so much!

  • https://www.dropbox.com/s/n05jlqk7vugzr ... .capx?dl=0

    Platform is not really Special Relativity proof.

    When on the floor, it feels the velocity of the floor (it just tries to stand on the same place).

    Run, and you move from that position on the floor to another position on that (relative to) floor.

    But, when in the air it feels the gravity of the world, relative to the (non moving) world.

  • dropbox.com/s/n05jlqk7vugzrzd/weeTroughTheNIght.capx

    Platform is not really Special Relativity proof.

    When on the floor, it feels the velocity of the floor (it just tries to stand on the same place).

    Run, and you move from that position on the floor to another position on that (relative to) floor.

    But, when in the air it feels the gravity of the world, relative to the (non moving) world.

    Thank you for that!

    My issue seems to be solved but if I run into another issue I'll be sure to let you know

    Love the community so far!

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