How do I make pushable blocks that stop at each other/walls

Get help using Construct 2

Post » Wed May 16, 2018 12:56 am

Found a glitch in a game i'm working on while making a new puzzle for a level. I have blocks in the level that can be pushed by the player (like Zelda). if you push the block forward then runs into another block i dont want it to go any further until you push it in another direction. At the same point if you push the block into a wall i dont want the block to go any further unless you push it in another direction.

As of right now the block can be pushed into the wall causing overlap as well as another block causing them to overlap.

This is a screen of one of the levels with this gameplay element
Image

Also have screens of the code for player movement as well as the pushable blocks
Grab That Booty!

Booty Diver is available on Steam, Itch.io, Xbox One, and Nintendo Wii U for $4.99.

Checkout the trailer
https://www.youtube.com/watch?v=tWhklyjL9vQ
B
13
S
2
Posts: 17
Reputation: 716

Post » Wed May 16, 2018 4:13 pm

Cant see the image but i think you might not have the solid behaviour on both the object and the wall.
B
19
S
7
G
4
Posts: 184
Reputation: 4,198

Post » Wed May 16, 2018 7:39 pm

right click the image ,and tell it to open in a new tab...for some reason it doesn't appear in the forum.

The wall has the solid behavior always had. i've tried turning solid on ,and off for the block with the same result.

I tinkered with some of the code ,and got it to where now the block won't go thru the wall anymore but if the player pushes on it while it's against the wall the player ends up "inside" the block then when you push in the opposite direction it pushes the block ahead of whatever direction you move to. Almost like i'm throwing the block.

I gave up on trying to make the puzzle i was working on to work. Just trying to make the current setup work with the least amount of glitches. I never caught it before because i always knew what to do but i recently started playing it like someone who wouldn't know and discovered this stuff....kind of frustrating considering the game is 80% complete
Grab That Booty!

Booty Diver is available on Steam, Itch.io, Xbox One, and Nintendo Wii U for $4.99.

Checkout the trailer
https://www.youtube.com/watch?v=tWhklyjL9vQ
B
13
S
2
Posts: 17
Reputation: 716

Post » Fri May 18, 2018 10:53 am

How do you move the block? Changing its position or simulating a movement?
B
19
S
7
G
4
Posts: 184
Reputation: 4,198


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests