Page 1 of 2

Player falling through platform glitch....

PostPosted: Fri Aug 22, 2014 9:58 pm
by tomhaiger
Ive been struggling with this issue for while now and really need some help on this. I've got a glitch in my game where my player goes through platforms for some reason.

I had an issue with my autorunner where my player kept moving to the left when running off a platform, i managed to solve this by setting my players X position when they are falling (line 16). But after doing this, my player starts to go through platforms and i have no idea why.

When i delete the event i created, the glitch doesn't happen, it works as it should. I don't know why it's doing this and would appriciate help on fixing this issue.

Re: Player falling through platform glitch....

PostPosted: Mon Aug 25, 2014 10:39 am
by tomhaiger
Anyone? Sorry to bump this but I could do with some help....

Re: Player falling through platform glitch....

PostPosted: Mon Aug 25, 2014 10:47 am
by LittleStain
As people have tried to explain before, setting the x coordinate while falling causes the glitch, because it overwrites the normal falling behaviour..

So what you are saying is you have solved something by adding a bigger problem..

What I would try to do is to really solve the first issue instead of trying to solve the problem you created while trying to solve the first issue..

Re: Player falling through platform glitch....

PostPosted: Mon Aug 25, 2014 1:28 pm
by tomhaiger
I've mentioned previously that i have been struggling with an issue with my player moving to the left when falling, and unfortunately no-one has been able to come up with a solution (although many have been helpful enough to try, which is appriciated)

This was the only method i could find that would work, but it has created other problems like you said, which i was hoping could be fixed. I don't see anything wrong with asking for help with that...

I've added my old capx without the changes, where the issue is with the player moving back when falling. If this issue can be solve then that would be great, but as i've mentioned, i've not been able to find a solution yet.

Re: Player falling through platform glitch....

PostPosted: Mon Aug 25, 2014 1:53 pm
by DuckfaceNinja
What kind of glitch? I don't see any glitch with line16 removed? It seems to work normally as an auto-runner supposed to... Are you expecting the runner not to move towards left when it collide solid object?

Re: Player falling through platform glitch....

PostPosted: Mon Aug 25, 2014 2:55 pm
by tomhaiger
I've mentioned in the first post that the glitch doesn't occur with line 16 removed.

The reason i added line 16 is because i had an issue with my player moving to the left to the screen/going back each time you drop/fall off the platform. If you continously do this, eventually the player will end up on the edge of the screen.

Unfortunately, with line 16 added, the glitch with my player falling through platform occurs.

The 1st capx i posted has the glitch with falling through platforms. The 2nd capx i posted just the same as the 1st capx except without line 16, so the issue with that one is my player moving towards the left of the screen when falling of a platform.

I basically want to solve the issue of my player moving towards the left of the screen when falling of a platform.

Re: Player falling through platform glitch....

PostPosted: Mon Aug 25, 2014 3:35 pm
by DuckfaceNinja
tomhaiger wrote:If you continuously do this, eventually the player will end up on the edge of the screen.

Hmm, I thought this was supposed to happen? My impression that it is not a glitch because this is what I normally see in runner game.

Mind if I ask what supposed to happen when player fall and hit the platform-side?

Re: Player falling through platform glitch....

PostPosted: Mon Aug 25, 2014 4:58 pm
by tomhaiger
When the player runs or falls off the platform, they shouldn't move left or right, the X position should stay fixed so that doesn't happen.

In my game, when you fall off, my player moves to the left of the screen, which it shouldn't do. It should stay in the same X position.

I tried to fix this by creating an event that sets my player's X manually when falling, and although this worked, my player starts going through platforms which is the glitch I'm refering to in the 1st capx.

Re: Player falling through platform glitch....

PostPosted: Mon Aug 25, 2014 5:02 pm
by LittleStain
like @DuckfaceNinja I actually don't see what is wrong with the second capx you posted..
Looks like all is working as would be expected..

Re: Player falling through platform glitch....

PostPosted: Mon Aug 25, 2014 5:29 pm
by tomhaiger
I don't get why you can't see the problem, the issue is there with the 2nd capx as I've just tested again.

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/run off the platform that this happens.

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