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

0 favourites
  • 4 posts
From the Asset Store
Place blocks on a board, join them together to form even bigger blocks!
  • 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

    Also have screens of the code for player movement as well as the pushable blocks

  • Cant see the image but i think you might not have the solid behaviour on both the object and the wall.

  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • How do you move the block? Changing its position or simulating a movement?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)