Ignoring collision from one layer to another

This forum is currently in read-only mode.
From the Asset Store
Particles support animations, collisions, effects and etc.
  • So... I have a simple question (or maybe it's complicated, who knows xD)

    In the game i'm making there will be multiple layers, and i want the player to be able to go from one layer to the other on certain points...

    The problem is, i wanna make it so that when the player is in the front layer it does not recognize the collision with objects in the back layer (and vice versa) how do i do this on construct?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add a condition like "Object A layer does not equal Object 2 layer".

  • You don't get it.... I want ALL the objects on layer one to COMPLETELY ignore the objects on layer two!

    You see... It's a plataforming game... (and it uses the plataform behaviour)

    And i wanna be able to jump into the background/back to the foreground in certain areas (a pseudo-3D gimmick, kinda like VB wario land)

  • You don't get it.... I want ALL the objects on layer one to COMPLETELY ignore the objects on layer two!

    First, if you want an answer to a question then you have to ASK the question. Second, the answer Ashley gave will work for you, just apply that to all of the collisions/objects you are interested in! You could do something like set a private variable in all of the objects that are on a certain layer and temporarily turn off collisions for those that have the PV set, but I think it is simpler to just check the layers per collision condition. You might consider using a for loop to loop through all objects on a layer and handle it that way.

  • Probably the easiest way would be to do this:

    Add your objects in different layers to two families. For example, put Layer 1 objects into Family Yellow, and Layer 2 objects into Family Blue.

    Now, in events:

    When Player is on Layer 1

    -> Remove attribute from Blue: "Solid"

    -> Add attribute for Yellow: "Solid"

    When Player is on Layer 2

    -> Remove attribute from Yellow: "Solid"

    -> Add attribute for Blue: "Solid"

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