[SOLVED] Returning to previous layout?

Get help using Construct 2

Post » Mon Jun 22, 2015 3:44 am

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. :D
Last edited by DaniellMesquito on Mon Jun 22, 2015 9:01 pm, edited 1 time in total.
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
24
S
7
G
4
Posts: 326
Reputation: 3,878

Post » Mon Jun 22, 2015 6:25 am

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.
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
10
S
4
G
1
Posts: 158
Reputation: 1,303

Post » Mon Jun 22, 2015 7:01 pm

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.
Last edited by DaniellMesquito on Mon Jun 22, 2015 8:10 pm, edited 1 time in total.
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
24
S
7
G
4
Posts: 326
Reputation: 3,878

Post » Mon Jun 22, 2015 7:20 pm

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jun 22, 2015 8:13 pm

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.
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
24
S
7
G
4
Posts: 326
Reputation: 3,878

Post » Mon Jun 22, 2015 8:36 pm

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: plinkie, rayolf and 7 guests