How do I move the block in various directions?

Get help using Construct 2

Post » Thu Jun 11, 2015 5:26 pm

As per below screenshot how do I make it so when the player collides with the block, depending on which side, e.g. North, South, West, East that the player collides on it then starts moving the block in that direction? Tried all forms of movement behaviour except physics as could not figure out how to stop it falling off screen. The image is the closed I got it but only able to push the block at point West.


Image

URL incase above don't work: http://picpaste.com/Untitled-cmj9EulG.png
B
10
S
3
Posts: 109
Reputation: 1,080

Post » Thu Jun 11, 2015 5:33 pm

I saw a tutorial about it once. I think you can find it easily too.
But anyway, the easiest way to do that in my opinion is to put at the block the platformer behavior, set it speed to be less than then player's speed, disable the default commands so the player can control the main char but the block itself, then anytime the player collides with the block you simulate the block to move the same direction as the player.

The collision will be more smooth if you create invisible objects around the box to be pushed for the player to collide with.

I don't know if I'm being clear enough, but give this a though and try and play a little, and if you still don't manage to do it come back here ;)
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Thu Jun 11, 2015 6:17 pm

Tried all that still, don't work, I found various tutorial on it for a 2d platformer but not for pushing it in all four directions, as in top down view which is what I am trying to achieve.
B
10
S
3
Posts: 109
Reputation: 1,080

Post » Thu Jun 11, 2015 9:22 pm

B
17
S
7
Posts: 280
Reputation: 2,522

Post » Fri Jun 12, 2015 1:36 pm

Ok that works. Many thanks. Two follow up questions:

1.) How would I stop the player bouncing a little when it comes into collision with the red collision blocks?

2.) Where is the pin behaviour, I can not see it anywhere on my add behaviour dialogue?
B
10
S
3
Posts: 109
Reputation: 1,080

Post » Fri Jun 12, 2015 3:23 pm

Actually ignore number 2 I figured that out, still upon collision how do I stop it bouncing?
B
10
S
3
Posts: 109
Reputation: 1,080


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests