Does the object with "8 Direction" need to move by it's own.

0 favourites
  • 5 posts
From the Asset Store
It's here!
$4.95 USD
Creepy and nasty horror track. It's terrifying from the beginning till the end. Goosebumps guaranteed
  • Hello!

    If an object has the 8 Direction-behaviour, does it have to be moving by it's own controls to be able to be blocked by solids?

    For Example: If I have an object with lets say bullet-behaviour, and then I pin the object with the 8Direction on to that object.

    ...if I do that it wont be blocked by solids... right?

    A problem came up for me, when I already had created a player and been working for a long time with the game - but now I needed to make the player so it gets blocked by solids. The problem is that I already made my collision polygons for my player work for the game... Like for when the player gets hit by things and so on. But those collision polygons does not work for blocking solids. That's because everything gets real weird with the polygons I have.

    ...So I thought I would make a small round object and pin that to the player and have that work as an object that gets blocked by solids. And put the 8 Direction-behaviour to that object. But it didn't work. It just go right through solids.

    It seems like I have to put the 8 Direction to the player itself for it to work :/ But if I do, I still have to make a separate object and pin that to the player and have that work as collision polygons for when the player gets hit by things.

  • Bullets do not get "blocked" by solids... but you can set them to bounce off solids.

    It doesn't matter what other behaviors you are using, as in this case bullet would be the one taking care of the movement, and it doesn't care that there is a solid in the way. For example, even if I was using 8 direction, if another event decided to move me into the middle of a solid I would still get stuck in it.

    Although..... how do you define blocked? Do you want it to just stop? Or slide along the edge? Stopping is simple, just set bullet speed to 0 upon collision.

  • thanks for your reply oosyrag

    Ok I understand.

    I was looking for that the player could not pass through the solids, more like slide along the edge that you describe.

    I have small navy-vessels I do not want to be able to travel on land

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 8 Direction seems to be your best choice then. Any particular reason you are using bullet to move your ships instead?

  • The bullet behaviour works very good for ships - as they are always moving a direction. Like a sailing ship that gets affected by the wind. Then you only have to turn clockwise or counterclockwise to steer the ship.

    My ship do not have engines, they are sailing.

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