Go to Layout VARIABLE

This forum is currently in read-only mode.
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hi,

    is it possible to go to a layout but not typing a number into the edit menu but through a variable. For example when i press the button it should jump to the layout number i saved in a global variable. For example my variable is "value" and the value in it is 5.

    On Click Button 1 --> System Go to Layout global('value')

    but doint this nothing happens. The value is saved like this in the variable, as i tested with a text field but i just dont jump to the layout i want it to.

    Thank for you help,


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Entirely posible. I have mine set up using text so I can shuffle levels around without breaking the connection.

    Possible errors are

    Is there a keyboard object on your layout?

    Is the event sheet connected to the layout?

    I think the level 'numbers' are 0 index, so you may be using the wrong number.

    Run the debug menu and check that the global variable is being set correctly. Set up another method of changing to the same level to test that is all working correctly.

  • It may not accept integers, and I think it may be case sensitive as well.

    "Layout 2" should work where 2, or "layout 2" might not.

    Just depends on how you have it named.

  • okay awesome now it works, thanks a lot for the quick help!

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