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

Get help using Construct 2

Post » Tue Apr 25, 2017 6:51 pm

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.
Soulmachine @Soundcloud
B
14
S
2
G
1
Posts: 63
Reputation: 928

Post » Wed Apr 26, 2017 12:45 am

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.
Mistakes were made.
B
52
S
26
G
109
Posts: 1,611
Reputation: 61,643

Post » Tue May 02, 2017 4:06 pm

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 :)
Soulmachine @Soundcloud
B
14
S
2
G
1
Posts: 63
Reputation: 928

Post » Tue May 02, 2017 4:31 pm

8 Direction seems to be your best choice then. Any particular reason you are using bullet to move your ships instead?
Mistakes were made.
B
52
S
26
G
109
Posts: 1,611
Reputation: 61,643

Post » Sun May 14, 2017 9:24 pm

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. :)
Soulmachine @Soundcloud
B
14
S
2
G
1
Posts: 63
Reputation: 928


Return to How do I....?

Who is online

Users browsing this forum: AllanR, brunopalermo, PROxMTswatTR and 12 guests