How do I make a system that in any layout that the user click in an arrow button, return to previous layout in history? Does C2 haves this function, need a plugin or global variable? Thanks in advance.
Sure:
Order your layouts and use:
go to next/pervious layout
or
global last layout or dictionary all previous layouts.
On click back - go layout by name
All in System.
Is more complex making this. Construct 2 don't have the possibility to return to last layout, only moving between layouts by order in project. I have an idea for developing this.
Create a global variable LastLayout
before going to a new layout set the variable to the name of the current layout.
to return to the last layout all you'd have to do is use the system goto layout by name : LastLayout
Which is what deathangel1479 tried to explain in his second example..
Develop games in your browser. Powerful, performant & highly capable.
Yes, I'm already using this. But what I need is more complex, and I've already got a idea for making this ideal for my purposes.
Ok..
Good luck..
I guess setting a global variable LayoutHistory on start of layout would work, just set it to : Layouthistory&";"&LayoutName
then using tokencount(LayoutHistory,";") to get the number of layouts in the history..
etcetera..