Is there a way to do this better?[Solved]

Get help using Construct 2

Post » Tue Mar 31, 2015 4:45 pm

I am making a top down game and I currently have a platform you can stand on and it will move you around when you are standing still.
I also have it where you can move when you are on it.
My problem is the player's movement is not affected by the platform so when you move up when the platform is moving right the player does not stay on the platform. Is their a better way to do this so the platform's movement affects the player?

I attached my capx to it
Last edited by ZeroBelow on Sun Apr 05, 2015 4:29 am, edited 2 times in total.
B
29
S
6
G
1
Posts: 93
Reputation: 3,020

Post » Tue Mar 31, 2015 4:51 pm

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

this is a link to the capx

I keep getting a error when trying to attach it or edit my post
B
29
S
6
G
1
Posts: 93
Reputation: 3,020

Post » Tue Mar 31, 2015 5:04 pm

first thing:

instead on key released, I would recommend using player is not moving, for when I moved by using the arrow keys the pinning didn't work..

second thing:

Maybe pinning the player isn't the best option here..
setting the player's position to the platform minus or plus the current location of the player compared to the platform could be a better option.
limiting the player's x and Y while overlapping the platform would be something like:
player is over lapping platform - player set x to clamp(player.x,platform.x-0.5*platform.width,platform.x-0.5*platform.width)
player set x to clamp(player.x,platform.x-0.5*platform.width,platform.x-0.5*platform.width)
If I'm correct.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Mar 31, 2015 6:00 pm

...you can be smart..or you can be stubborn :D

http://s000.tinyupload.com/index.php?fi ... 2290447519
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Tue Mar 31, 2015 6:05 pm

Thank you for the quick reply :)

not going to let the arrow keys affect player going to disable that

I am trying to do what you said but I am not having any luck, when I put it in it sets the player set X and y to the edge of the platform rather than to where he is currently on the platform. it also does not allow him to move if i set both the X and y. Is there any way you could show me a capx of it?
B
29
S
6
G
1
Posts: 93
Reputation: 3,020

Post » Tue Mar 31, 2015 7:31 pm

Korbaach I do really appreciate your help, but their is a glitch with just pinning the character to the platform, it makes it where if u move perpendicular to the movement of the platform it will move out from under you.
B
29
S
6
G
1
Posts: 93
Reputation: 3,020

Post » Sun Apr 05, 2015 4:28 am

Ok I figured out a way to do it, All i needed to do what make it where the player is being moved at the same speed and direction of the platform. So I used the move object at angel command. It works it just took a bit of tweaking to get the speed for the player right.
B
29
S
6
G
1
Posts: 93
Reputation: 3,020


Return to How do I....?

Who is online

Users browsing this forum: nez05 and 45 guests