Slippery sliding on slope

Get help using Construct 2

Post » Mon Dec 24, 2012 8:17 am

Anyone have an idea for the best way to make a platformer slope that pulls you down the hill?



I've tried adding to the X velocity when on slope, I don't think it worked well.

I've tried just doing a +x +y to position when on slope, but it thinks you're always in the air so that doesn't work.


alspal2012-12-24 09:14:46
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Mon Dec 24, 2012 8:49 am

You need to work with gravity.

This: http://www.scirra.com/tutorials/273/how-to-make-a-gravity-based-platformer should fix all your upcoming questions.

Ps: Dont forget to set the players angle like in the Tutorial or it looks like your Player goes stairs down :D
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Mon Dec 24, 2012 9:17 am

I'm not sure if that tutorial is related? This problem is to do with making a slope that you can slide down, not make you walk around it like in sqiddster's gravity example/tutorial.
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Mon Dec 24, 2012 9:21 am

Anything like this?

// Kinda stupid example, but meh, it's sliding:PJJList2012-12-24 09:23:55
B
17
S
5
G
1
Posts: 74
Reputation: 2,627

Post » Mon Dec 24, 2012 9:37 am

Yeah thats what he want but he still need the gravitation to let it look real ;)
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Mon Dec 24, 2012 9:58 am

Yeah that works, except I should clarify that I'm using the platform movement (not physics).
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Mon Dec 24, 2012 1:14 pm

Yeah, i get that, thought u can kinda mix those two ones- platform and physics:P Give it a try!) Or, manually&without physics, you can either add event that simulates gravity(Like every tick => x=x-dx, y=y-dy, depending on movement angle, and some additional conditions or something, may think on this one later), or you make a Slope family, and then if(player overlaps Slope){player.angle=slope.angle, move player at that angle, add some acceleration}. Huh, hard to figure that out without construct around:D i'll try to play with that ideas when i get back home:)
If that'd be still actual:)JJList2012-12-24 13:43:31
B
17
S
5
G
1
Posts: 74
Reputation: 2,627

Post » Wed Dec 26, 2012 10:53 pm

Bump
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Thu Dec 27, 2012 12:09 am

I was trying some complicated ways to do this and then I thought of the most obvious way.

platformSlopes.capx (r114)
B
54
S
28
G
18
Posts: 1,520
Reputation: 24,990

Post » Thu Dec 27, 2012 2:27 am

B
34
S
4
G
8
Posts: 67
Reputation: 5,857

Next

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, jeffige, LeFuji, plinkie, Radulepy and 1 guest