Player moves towards left of screen when falling...

Get help using Construct 2

Post » Sat Aug 02, 2014 6:26 pm

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?
You do not have the required permissions to view the files attached to this post.
B
5
S
2
Posts: 126
Reputation: 876

Post » Sat Aug 02, 2014 7:43 pm

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
Image
B
71
S
28
G
12
Posts: 515
Reputation: 12,284

Post » Sat Aug 02, 2014 9:07 pm

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?
B
5
S
2
Posts: 126
Reputation: 876

Post » Sun Aug 03, 2014 2:13 am

Try this simple solution. I've use this solution in my auto runner.
You do not have the required permissions to view the files attached to this post.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273

Post » Sun Aug 03, 2014 1:57 pm

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?
B
5
S
2
Posts: 126
Reputation: 876

Post » Sun Aug 03, 2014 5:08 pm

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.
B
10
S
2
G
1
Posts: 28
Reputation: 681

Post » Sun Aug 03, 2014 5:54 pm

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...
B
5
S
2
Posts: 126
Reputation: 876

Post » Sun Aug 03, 2014 7:44 pm

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 ;)
You do not have the required permissions to view the files attached to this post.
B
10
S
2
G
1
Posts: 28
Reputation: 681

Post » Mon Aug 04, 2014 2:51 pm

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

Still trying to find a solution to this issue...
B
5
S
2
Posts: 126
Reputation: 876

Post » Tue Aug 05, 2014 2:46 pm

Sorry to bump this but can anyone else help me out?
B
5
S
2
Posts: 126
Reputation: 876


Return to How do I....?

Who is online

Users browsing this forum: adamebastin, Bro7hers and 9 guests