How do I / Platform and Sine behavior problem

Get help using Construct 2

Post » Thu May 28, 2015 1:29 am

Presently I'm using the Sine behavior for vertical platforms and I'm running into a small problem.
I tried different fixes given by users in the forums but with no result. When I jump on top of the moving platform, sometimes Falling is triggered again, causing the character to do a small jump. This seems to be triggered only when the platform is descending and the fall lenght is greater.

Sorry if I cannot provide a capx, since this happens only on my prototype (which is too advanced to provide here) and it doesnt happen if I test it in a new game.

Any suggestions to what it might be would be amazing.

Thanks in advance!

Cheers
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Thu May 28, 2015 2:17 am

i think its not the game the problem, but the new version c2 that saves automatically the game to localstorage, for some reason i have the same problem, with my game now, i tested and retested it for to many times, now when i reload or test again, i get the same old data, try clearing your offline website data and cache, for firefox from history, atleast on me that worked, partially!
B
75
S
22
G
68
Posts: 1,337
Reputation: 43,271

Post » Thu May 28, 2015 2:52 am

For getting the player to stand on moving objects that use sine behavior, I find that simply pinning the player to the object (if the player is standing still) is a simple and effective way to stop any unwanted movement because of imperfections in the platform behavior.
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,208
Reputation: 43,838

Post » Thu May 28, 2015 10:26 pm

@gamecorpstudio: I'm testing using NW so I shouldn't have the same problem I think

@Colludium: I tried it but it still does a small almost imperceptible falling. Seems to be like an updating problem. Thing is, I tried using someones code for a custom sine movement. The platform works amazingly well but I have exactly the same problem. I went through the rest of my code but with no results. Im sure its something Im failling to see.
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Thu May 28, 2015 10:47 pm

I always end up creating an invisible sensor sprite that is pinned under the player. I use that to determine if the player is on a platform or is falling - and use that to manage the animations to stop the occasional stutter you're seeing, if I understand what you're describing correctly.
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,208
Reputation: 43,838

Post » Fri May 29, 2015 12:25 am

@Colludium
Exactly! I just did the same and fixed the states and now works like a charm. I already had a sensor for feet detection that I use for wall jumping and wall gliding, but by putting it under the Player Detector it seems to work better when overlapping the platform. It seems that sine behavior doesnt play well with overlapping at offset?

anyways, thanks for your time!

Cheers
B
43
S
12
G
14
Posts: 488
Reputation: 10,570


Return to How do I....?

Who is online

Users browsing this forum: evillair, lordsas, Matei511, tarek2 and 65 guests