Issues with Platformer behavior

Discussion and feedback on Construct 2

Post » Fri Dec 20, 2013 6:10 pm

So I'm trying to make a basic platformer and right now I'm working on animations. The problem I'm having deals with the falling animation. For some reason my character will get stuck in an infinite loop between the standing animation and the jumping/falling animation when he is on the ground not moving. I'm not sure why it's happening and have tried a number of different changes to the event conditions to fix it, but none have worked.

I think the issue could be related to the animation frames themselves, or to the collision detection, but I tried modifying them a few times to no avail. If anyone knows how this problem could be solved I would greatly appreciate it.

Here is a link to the capx.
B
5
Posts: 19
Reputation: 713

Post » Fri Dec 20, 2013 7:58 pm

https://www.dropbox.com/s/gva7s0jour76ogk/PlatformerIssue.capx

if you want your player to animate while falling you must have 2 separate animations ,one for jumping and one for falling.otherwise you cant pick the correct one when the condision changes(jumping,falling).i simplified your code.it was a big mess and conditions where overlapping each other and thus the chaotic behavior Roccinio2013-12-20 20:07:32
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Mon Dec 23, 2013 4:12 pm

@Roccinio, thanks for the help, your solution worked perfectly.

I do have one other question though which is somewhat related. I created an object with the Jump Thru Behavior and noticed some strangeness when using it. Essentially the character is able to stand on the vertical middle of the platform. You can see what I'm trying to say in this gif.



I basically just want to know if this is how Jump Thru platforms are supposed to work, and if it can be changed so it doesn't do this. Let me know, and thanks again for the help.
B
5
Posts: 19
Reputation: 713

Post » Mon Dec 23, 2013 4:15 pm

How's your collision box on the player character? Try making it square, it should work I think.
B
123
S
43
G
41
Posts: 847
Reputation: 28,206

Post » Mon Dec 23, 2013 4:33 pm

Okay, that fix worked. So from that fix am I right to assume that the Jump Thru platform was catching onto the various collision points on my character and they were causing it to think my character was still standing on top of it?

In either case, thanks for the help @andreyin.
B
5
Posts: 19
Reputation: 713

Post » Mon Dec 23, 2013 4:43 pm

No problem, Construct 2 has a bad habit of making a weird collision box when you import any image onto it.
B
123
S
43
G
41
Posts: 847
Reputation: 28,206


Return to Construct 2 General

Who is online

Users browsing this forum: Sventevith and 10 guests