Is there a "Go to last loaded Layout" action?

Get help using Construct 2

Post » Sat Aug 03, 2013 1:38 pm

Hi, I've had a good search of the tutorials and manual but not found an answer so excuse the question if its obvious!

I'm making a generic "back/exit" button that I want to simply reload the last visited layout. I will include this on many layouts so creating a generic button will help avoid having to put an event in for every specific layout. I know in theory how to get this working manually using global variables, an Array of the Layout names and the Go to Layout (name) action.

BUT I thought I'd check if Construct2 has this functionality already in it first, seemed dumb to do all that if there is somewhere a Go to Last Loaded Layout or similar action/event/what have you.

Thanks!
B
3
Posts: 2
Reputation: 204

Post » Sat Aug 03, 2013 2:35 pm

Not that I'm aware of, but I do it in a very simple way. When you click on the exit button, before transferring to another map, set a global variable to the layout name. Ie system.layoutname (or something similar... not near c2 right now). Then, when you hit return, go to layout by name and just put in your variable that you made.
B
103
S
38
G
19
Posts: 962
Reputation: 17,986

Post » Sat Aug 03, 2013 3:23 pm

Thanks, that's a lot simpler than my method I had forgotten global variables could also hold text! :) Cheers!
B
3
Posts: 2
Reputation: 204


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], mrkaio, Zav and 3 guests