How make Crates that can be pushed by Player

Get help using Construct 2

Post » Mon Feb 17, 2014 4:34 pm

I have used the Physic basic example to create Physic for Crates and that they land on Solids,but how make a dynamic pushing for this crates by player ?
B
7
Posts: 61
Reputation: 393

Post » Mon Feb 17, 2014 4:37 pm

The player should have physics behaviour also.

Apply force on the player and when the player touches the crates the crates should be pushed.
If not it could be the settings for density/friction etcetera could be off, so adjust these to your needs.
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 » Mon Feb 17, 2014 4:38 pm

A far better way would probably be to skip the whole physics behaviour and fake it with other behaviours, but well..
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 » Mon Feb 17, 2014 6:25 pm

I try every Settings but my Player can push the crate only 1 pixel forward. I use Polygon collision for my Player.
B
7
Posts: 61
Reputation: 393

Post » Mon Feb 17, 2014 7:24 pm

Does this help? I added Solid and Platform behaviors to the block I wanted to move and did this:
B
3
Posts: 7
Reputation: 214

Post » Mon Feb 17, 2014 7:31 pm

You might have better luck with the Platform behavior or 8-direction movement for both the player and the crate. The physics behavior can be kind of wonky, so I would avoid it if possible.
B
26
S
8
G
2
Posts: 33
Reputation: 3,645

Post » Mon Feb 17, 2014 9:16 pm

I wouldn't use platform behaviour for the blocks.
Using your example, instead of simulating pressing right for the block, try set position to: Block.X + Player.Platform.Speed
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Mon Feb 17, 2014 10:22 pm

Sorry to make this more confusing for you than it already is but:
If you are making a grid based game then IMO you will be better using bullet behaviour for both player and block.
You also need to check that the block is movable which usually means spawning a collision detector on the far side of the block to see if the space you want to move it into is empty.
There are 10 types of people in the World, those that understand binary and those who don't.
B
7
S
2
Posts: 93
Reputation: 797

Post » Tue Feb 18, 2014 1:24 pm

Thank you for this but it don't work, I mean its the same that i can only move the Crate 1 pixel every second. It's very very very hard to move. I try to make a Platform Game. Do someone have a other Idea maybe ?
B
7
Posts: 61
Reputation: 393

Post » Tue Feb 18, 2014 1:38 pm

Try this.

http://www.scirra.com/forum/platFormer-push-pull-box_topic46764_page1.html
There are 10 types of people in the World, those that understand binary and those who don't.
B
7
S
2
Posts: 93
Reputation: 797

Next

Return to How do I....?

Who is online

Users browsing this forum: Waltuo and 30 guests