How can I make a layout behave differently if to access it a button or other? Please help..

0 favourites
  • 4 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • How can I make a layout behave differently if to access it a button or other?

    I have two buttons, the two buttons go to the same layout, but I want that depending on which button press, I load some data or others, that is, the layout knows how to differentiate why button we have entered it.

    Please help..

  • If they are different objects then you do with events, on button press go to layout. If you are referring to same object but 2 different instance of same button, then you could add instance variable of text, and the name of the layout, then in events you can use 'go to layout by name' and the name is button.variable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I want to do, if you press button 1 —> I go layout 1 —> layout 1 loads itemtable(maria) data

    if you press button 2 —> I go layout 1 —> layout 1 loads itemtable(jose) data

    How can I do this?

    Thanks for Answer

  • You could maybe use a global variable and on button press set a global variable to 1 or 2, depending on button, do this in events on the first layout.

    Then on event sheet for layout 1, you can say on start of layout, if global var is 1, load this data, if global var is 2, load the other data.

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