Collision with a specific object

Get help using Construct 2

Post » Tue Sep 03, 2013 10:46 pm

Is it possible to have a collision that affect only one object or a group? How can I have a solid object that works only with the player?
B
2
Posts: 6
Reputation: 162

Post » Wed Sep 04, 2013 1:10 am

Unfortunately as far as I know, this isn't possible in C2.
B
44
S
12
G
1
Posts: 545
Reputation: 4,271

Post » Wed Sep 04, 2013 1:22 am

Your only wanting it to be a solid to the player? Could set the object to solid with disabled as default and on overlap with player set solid to enabled else solid disabled. You'd probably want your sprite to have a bit of transparency on the edges
B
10
S
2
G
1
Posts: 77
Reputation: 1,278

Post » Wed Sep 04, 2013 2:33 am

@JWstudios - the only problem with this is that if the object interacts with 2 objects (one being the solid event), this will create complications.
B
44
S
12
G
1
Posts: 545
Reputation: 4,271

Post » Wed Sep 04, 2013 1:07 pm

@JWstudios, @ome6a1717 is right. The case is, I have a topview game using 8 directions behavior and 2 players. I want to make sure that both of players will be on the screen. They can't pass through the screen border. I was thinking about to have a collision on the edge of the top fixed layer that would avoid the players to go out. But it would also avoid other actors, like enemies, to go into the player. Because of this I was thinking about to have a collision that would work only with a kind of object. Is there another idea about how to make it work?

Thanks.
B
2
Posts: 6
Reputation: 162

Post » Wed Sep 04, 2013 1:37 pm

Maybe you could use the expression clamp?

clamp(x, lower, upper)
Return lower if x is less than lower, upper if x is greater than upper, else return x.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Sep 05, 2013 8:31 am

Humm, but lets say the layout is bigger than screen. I was thinking about to use a collision on the top layer.
B
2
Posts: 6
Reputation: 162


Return to How do I....?

Who is online

Users browsing this forum: Ryan Kocourek and 25 guests