How do I prevent conflicting layers?

0 favourites
  • 3 posts
  • Hey experts. Going to try to keep from making this a wall of text.

    Have a project with several layers with the “combat” and “crops” layers being the focus here.

    When I’m on the crops layer, the character collides with an object and opens the battle layer (as designed). This collision causes all layers to be invisible and only the combat level is viewable.

    However, when I click on objects on the combat level, somehow my clicking also selects objects on the (invisible) crops layer, causing undesired behavior.

    So, how can I prevent items on the crops layer from being accessible when that layer is hidden and only the battle layer is visible?

    I’ve tried making layers invisible, disable layer “crops” effect, etc with no obvious success.

    Constructive input and suggestions appreciated, thank you in advance.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can give the crop objects a variable and use this in the clicking condition (if object.var is not crop then click) or using this variable again you can compare which objects are crops and disable their collision when the crops layer is invisible / battle starts.

  • There is a "layer is visible" system condition you can add in your crop selection event.

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