How do I resume from an event that changed the layout

0 favourites
  • 5 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • The problem I am having right now is, I have a two separate layouts and when I use the go to layout[insert name here] action, It will send me to the the layout but when I tell it to send me back to the previous layout it will start from the beginning of the event sheet instead of starting off where the action ended at.

    For example if I'm half way through my event sheet for layout 0 and I tell it to go to layout 1. Then go back to layout 0. It will start the event sheet for 0 completely over, instead of starting half way through the event sheet, which is where it left off before I made the first go to layout call. Is there anyway to make it resume from this spot when it returns to my first layout, or would I be better of combining layouts and just making different layers for one layout? Any suggestions is appreciated.

  • If you have two separate event sheets for each layout you need to "include" them by right clicking on an empty area in the event sheet.

    Any events that you have under the "On Start of Layout" condition will fire again when you change to a new layout, if you don't want this to happen you can add another condition that checks the current layout as well.

    As long as the event sheets include one another and you don't have on start events triggering unnecessarily you should be ok.

  • I already have them included. What I want isn't for on start layout to fire again, I want my event sheet to resume from where I called go to layout[inset name here].

    So if I'm almost at the end of the event sheet and I call go to layout 1, when i tell layout 1 to go to layout 0, I want layout 0 event sheet to start off almost at the end of the event sheet (where it left off when it first called go to layout 1). Sorry for any confusion I may have caused.

  • That's not the way C2 works. You need to restructure your code to do what you want. C2 always processes code top to bottom. Changing layouts always restart the event sheet.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah that is what I thought, Ill just combine the layouts. Thank you for the help.

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