How do I resume from an event that changed the layout

Get help using Construct 2

Post » Sun Mar 22, 2015 3:56 am

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.
B
4
S
1
Posts: 6
Reputation: 314

Post » Sun Mar 22, 2015 5:02 am

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.
ImageImage
B
89
S
18
G
6
Posts: 1,049
Reputation: 11,165

Post » Sun Mar 22, 2015 1:36 pm

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.
B
4
S
1
Posts: 6
Reputation: 314

Post » Sun Mar 22, 2015 4:37 pm

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.
ImageImageImage
B
71
S
19
G
166
Posts: 3,425
Reputation: 96,066

Post » Sun Mar 22, 2015 7:47 pm

Yeah that is what I thought, Ill just combine the layouts. Thank you for the help.
B
4
S
1
Posts: 6
Reputation: 314


Return to How do I....?

Who is online

Users browsing this forum: Phoenixbowman, Yahoo [Bot] and 6 guests