Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
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.
Order your layouts and use:
go to next/pervious layout
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.
Develop games in your browser. Powerful, performant & highly capable.
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..
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.
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..