Sub Events not working as expected

From the Asset Store
14 amazing sound files of game events like Level Ups, Level Completes, object spawn, object taking etc.
  • I setup a Menu Button that when clicked, it should toggle the menu layer Visible/Invisible. I thought it would be a relatively simple block, but apparently I've done something wrong.

    Menu Button - On Clicked

    ~[Sub] System - Layer 1 is not Visible > System - Set Layer 1 to Visible

    ~[Sub] System - Layer 1 is Visible > System - Set Layer 1 to Invisible

    What's going wrong? When I click it, it will turn the Menu layer on, but then it won't turn off. The only possibility I can think of, is that the Button itself doesn't persist between layers, even though it appears to and can apparently be clicked. :/

    Any solutions would be appreciate.

  • Events are read in sequence so in your Events, it sets Layer 1 to Visible, which instantly makes the very next Event valid so it sets it back again.

    Either use a variable as a toggle or just use 'Else.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah, thanks for that! The Else option worked wonderfully.

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