Player not jumping after changing sprite

Get help using Construct 2

Post » Thu May 04, 2017 1:04 am

Message: marcoscodas can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
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: https://www.mediafire.com/?t8k83k3sqj2e9mp

Thank you guys! Loving Construct 2 so far. So much easier than other stuff I've tried!
B
15
S
5
Posts: 78
Reputation: 1,173

Post » Thu May 04, 2017 1:30 am

frame 0 of your runner has a different collision box then the rest
B
25
S
16
G
26
Posts: 125
Reputation: 16,103

Post » Thu May 04, 2017 1:35 am

celstrider wrote: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.
B
15
S
5
Posts: 78
Reputation: 1,173

Post » Thu May 04, 2017 2:14 am

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.
B
25
S
16
G
26
Posts: 125
Reputation: 16,103

Post » Thu May 04, 2017 2:30 am

celstrider wrote: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?

Image

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
B
15
S
5
Posts: 78
Reputation: 1,173

Post » Thu May 04, 2017 2:39 am

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.
B
15
S
5
Posts: 78
Reputation: 1,173

Post » Thu May 04, 2017 3:10 am

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
Last edited by celstrider on Thu May 04, 2017 3:20 am, edited 2 times in total.
B
25
S
16
G
26
Posts: 125
Reputation: 16,103

Post » Thu May 04, 2017 3:14 am

Message: marcoscodas can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
celstrider wrote: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.
B
15
S
5
Posts: 78
Reputation: 1,173

Post » Thu May 04, 2017 3:18 am

in event 6

replace:
block set size to width: 100 + random(400)
with:
block set size to width: 96 + (round(random(400)/32)*32)
B
25
S
16
G
26
Posts: 125
Reputation: 16,103

Post » Thu May 04, 2017 3:38 am

Message: marcoscodas can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
celstrider wrote: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: https://www.mediafire.com/?c45gfhfvn7a0zca

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).
B
15
S
5
Posts: 78
Reputation: 1,173

Next

Return to How do I....?

Who is online

Users browsing this forum: VValt and 21 guests