How to make a character jump while unpinning him

Get help using Construct 2

Post » Wed Jan 25, 2017 2:56 pm

Hello there !

I've searched a while but didn't find any answer so I'm asking you guys: How to make a character jump while unpinning him from another sprite ?

Explanation: The character (who have a platformer behavior, and many others) is attract to an asteroid (simple sprite with solid behavior on it) when he is overlapping another sprite whose around the asteroid. And when the player is on collision with the asteroid, he is pin to the asteroid while it is spinning (so the player spin with it). Then, I want the player to jump from that asteroid when I play the good input (a mouse click).

But the problem I have is that the player don't jump from the asteroid. Any ideas how to fix that ?

If it's more clear: it would be a platform whose stick the player on it and whose spin at the same. The player has to enter the input to jump at the right time go on another platform
B
4
Posts: 4
Reputation: 208

Post » Wed Jan 25, 2017 6:15 pm

It does not jump because it is not standing on ground. (i take it that it is orbiting).

Just 'Set vector Y' directly.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Jan 25, 2017 10:05 pm

I gamble that this is what you try to do.

https://www.dropbox.com/s/5lufkjha29upj ... .capx?dl=0

I am not that happy with this, i feel like the platform is pushed to close to its limits.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu Jan 26, 2017 8:39 am

I don't have the plugin you've used in your capx so I can't open it ^^ But thanks for the help.

I was also thinking that it was the platform behavior who was not adapted for that. So I deleted it from the player and use only the physics, and it's much better !
B
4
Posts: 4
Reputation: 208

Post » Thu Jan 26, 2017 3:15 pm

All you do is on jump unpin player
player ignoring input
B
252
S
39
G
15
Posts: 1,964
Reputation: 40,748

Post » Thu Jan 26, 2017 3:59 pm

Lordshiva1948 wrote:All you do is on jump unpin player
player ignoring input


It is not that easy. In case of the combination pin/platform, the moment of the pin is extremely important.
Pin 'on land' and the 'push-out-off-solids-routine' might not be ready. Locked up in the solid. Pin a little to late and it has no ground to jump from. Besides that, the pin might push it into the solids (it does not have a 'push-out-off-solids-routine'). Very difficult when dealing with round objects as planets tend to be. Only Physics has a circle collision mask, for you to choose. The other behaviors rely on masks build with lines, and a half pixel can make a difference. I jumped into this, like i jump into everything. But actually trying it myself got me stuck really quick. But it is heaven to learn from.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Jan 27, 2017 9:00 am

In that case particularly, I finally managed to have the effect I want, but it was without the platform behavior, only with the physics. And really, it was way more easy to do it with physics only.
B
4
Posts: 4
Reputation: 208


Return to How do I....?

Who is online

Users browsing this forum: MassimoF, Microbex, Yahoo [Bot] and 27 guests