Help: Go to layout + Button.Text

This forum is currently in read-only mode.
  • Hi, all! I'm trying to learn Construct and make simple game. So, here's my .cap file:

    http://rapidshare.com/files/328948252/BakeTheCake.cap

    What I'm trying to do is to switch layout from Main menu layout to one of three others depending on button clicked. I first made it using three separate conditions, but I'm now trying to do it in more general way (in case I add more buttons). Note that button texts and layout names are same. Escape switches back from other layouts to Main menu.

    The problem is that all three buttons (Gathering, Splitting, Mixing) switch to Gathering layout.

    I thought that using object-type inside action (in this case Button through Button.Text) refers to the instance of that object-type which is used in the condition (in this case Button.on_button_clicked), but it seems that Button inside action always refers to the first instance (Gathering in this case).

    Does anyone have an idea what's the problem (if there is problem at all!)? Note: I'm using Construct 0.99.62

    Thanks in advance for any help!

  • Unfortunately, the "Else" condtion doesn't work in some cases, and that's what's messing things up here. Just replace it with an inverted copy of the "Text is "Exit" (case: Yes)" condition(right click the condition, then click "Invert condition").

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, that solved it. Thanks again!

    P.S. Is this known issue, or should I make bug report?

  • It's very much known, but I'm unsure if it's already in the tracker.

    Search for it and if you don't see it, put it in there.

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