How do I prevent the player from moving w/ sine platforms?

Get help using Construct 2

Post » Sat May 13, 2017 4:19 pm

I'm designing a level that is made of narrow platforms. Each platform has square sine behavior, and every 3 seconds shifts to the right, then back 3 seconds later. The problem is that if the player is standing on a platform when it changes positions, he will move along with it! I want the player to stay in place so that if he doesn't jump before the platforms move, he will fall. It seems that the player's position is linked to the position of the platform he's standing on.
Posts: 43
Reputation: 1,734

Post » Sun May 14, 2017 12:59 am

Assuming, you are using the Platform behavior for the Player and the Solid behavior for the platform(s), you can use the Solid action Solid: Set enabled to disable the collision between the Player and the platform.

As a side effect, this will cause the player to fall through the platform.
Since I'm not completely sure whether your intention is to completely eliminate the collision or to just make the player not move along with the platform, you can use this workaround to make the player not stick to the platform, but also not fall through it:
When you disable the platform's solid state, also set the Player's Platformer gravity and speed to 0.
This will make him keep his position.
Remember to switch the gravity and solid state back on when needed.
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
Posts: 528
Reputation: 7,091

Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk, Google [Bot] and 56 guests