How do I make an object solid to some,but passable by others

0 favourites
  • 8 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • I have a game where the player can move around with the arrow keys and shoot bullets with the mouse button.

    I want to create a special kind of wall that the player cannot walk through, but the bullet can.

    Any tips?

  • The bullets will go through any solid object if you just set the "Bounce off solids option to No".

  • Unfortunately I am using bouncing bullets and would still like them to bounce off normal walls!

  • If you want to go a a roundabout way of doing this, you can double up on the Physics and the Solid behavior; shoot-through walls will just have physics + immovable + no rotate, but regular walls will have that and Solid together. You won't be able to just use 8-direction for your player, though; to get it to react properly to physics objects, it will need to move by its physics behaviors.

  • Here's an example I put together. The controls aren't a perfect match for 8-directional, but with a little tweaking you might get movement like what you want.

  • Of course, the simpler solution is this: Make both types of walls Solid, disable "bounce off of solid objects" on the bullet, and add a condition:

    Bullet -> On Collision with SolidWall | Bullet -> Bounce Bullet off SolidWall.

  • try this demo change it around and see

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Of course, the simpler solution is this: Make both types of walls Solid, disable "bounce off of solid objects" on the bullet, and add a condition:

    Bullet -> On Collision with SolidWall | Bullet -> Bounce Bullet off SolidWall.

    Hi just wanted to let you know I ultimately ended up doing this and it works great, thanks!

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