How do I Make Hidden Layers Unclickble??

0 favourites
  • 4 posts
From the Asset Store
Make your game more fun and interactive with the Dog Hide and Seek Buttons Sprite Sheet.
  • Hi guys,

    Right now I am making a game, and i thougth to make game inventory screen on separate layer, so i can easy show it and hide it when i need it, but i have problem with this method. Even if layer is hidden i can still click on the items from that layer and if clicked object have events that events will run. Is there any way to prevent this or what do you think what is the best method to this inventory showing and hiding?

    And I Try these methods but not working,

    Two solutions:

    1. Put all events concerning the inventory screen in a separate group and enable disable the group based on the visiblility of the layer.

    2. Add layer is visible conditions to all events..

    Anyhelp?

  • The methods you mentioned should work - disable a group of events, or check that the layer is visible. They are inconvenient, especially if you have lots of objects and layers, but there are no other solutions.

    Unfortunately, Construct doesn't provide any way to block touch/mouse events for a certain layer. This idea was posted in several variations on the suggestions platform, but got no reaction from the developers.

  • Just place them in right order:

    Set group "First group" deactivated

    Set layer "First" invisible

    Set layer "Second" visible

    Set group "Second group" activated

    ...Or insert Wait(0.1s) if unnecessary touch still working on second layer immediately after making changes, like

    Set group "First group" deactivated

    Set layer "First" invisible

    Set layer "Second" visible

    Wait(0.1s)

    Set group "Second group" activated

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When they become invisible move them off screen, -5555 Y or something so there is no way to click them. When they need to be visible move them back to where they are supposed to be.

    For this you will probably need to add them to a family so you can just move the whole thing out of the way MenuFamily > set Y > Self.Y -5555 and Self.Y + 5555 before making them visible. Should work

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