Next Layout/Go To Layout Bug?

This forum is currently in read-only mode.
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • Am I doing something wrong, or why does it only go to the next Layout (or Layout of given Number), after pressing a button the second time?

    I made a new empty .cap. Just to check for switching between Layouts.

    When pressing Space, it should change to the next Layout.

    Now what You see is this:

    1) Space Pressed - Reloads same Layout

    2) Space Pressed - Loads wanted/next Layout

    3) 4) 5) ... Space Pressed - Works as expected.

    But every time the first press (after running the application) reloads the same Layout.

    2nd EDIT: Okay, here's what I found out now. It has nothing to do with the MouseKeyboard Object being global. It is indeed the Layout Switch making trouble. The first time You make a layout switch after application start, it will in fact read switch to the other Layout AND continue reading the Events of the new Layout in the SAME Tick. It will add the Events of the new Layout to the current Tick.

    The next time You switch Layouts, it works as expected.

    You can check this by switching the layout upon a button press, and increase a global variable by one.

    Now on the second Layout, for the same button press, You switch the layout back to the first, and increase the same variable by one.

    If You now press the button the first time, the variable will increase by 2, after that each consecutive press will just increase by one.

  • Do you use transitions in this project? I've noticed that they are still really buggy as of Construct Classic R1.2

  • Is there a workaround for this? I'm having the same issue and I have no idea how to fix it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi there

    I have encountered the same problem as you.

    And I also have recently found the root of the problem here

    It might be too late to answer you but I think that this might help others who encountered the same problem

    Here is why that is happening:

    It's true that it pressed the same button in the same tick in the targeted layout because the time used in "go to layout" is very little

    I assumed this is the problem from mouse & keyboard being bugged

    How to get this problem solved is:

    add wait time before "go to layout" in the event you pressed the button

    I have tried some numbers and found out that wait(100ms) is the best for this problem

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