Collision with a specific object

  • 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?

  • Unfortunately as far as I know, this isn't possible in C2.

  • 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

  • JWstudios - the only problem with this is that if the object interacts with 2 objects (one being the solid event), this will create complications.

  • 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.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Humm, but lets say the layout is bigger than screen. I was thinking about to use a collision on the top layer.

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