Stay with background from another layout - RESOLVED

Discussion and feedback on Construct 2

Post » Sat Jun 14, 2014 6:02 pm

Hello guys I'm new here on the forum and seek experience and learning, so I have the following questions:

I have 2 layout, the first has 4 buttons (each 1 means background), the user must choose only one button, thus changing the background chosen.

Chosen the background the user moves to the next layout (hence arises the doubt), how can I get the background that was chosen in 1 layout and stay with him in the second layout?

Thanks in advance to all who try to help.

Ron Sueliton 8-)
Last edited by Rony Sueliton on Sun Jun 15, 2014 8:16 pm, edited 4 times in total.
B
11
S
3
G
1
Posts: 105
Reputation: 1,135

Post » Sat Jun 14, 2014 6:40 pm

This is an English speaking forum, please stick to English or provide a translation with your post.
Moderator
B
95
S
34
G
33
Posts: 3,006
Reputation: 27,874

Post » Sun Jun 15, 2014 2:07 pm

Rony Sueliton wrote:Hello guys I'm new here on the forum and seek experience and learning, so I have the following questions:

I have 2 layout, the first has 4 buttons (each 1 means background), the user must choose only one button, thus changing the background chosen.

Chosen the background the user moves to the next layout (hence arises the doubt), how can I get the background that was chosen in 1 layout and stay with him in the second layout?

Thanks in advance to all who try to help.

Ron Sueliton 8-)


Really easy to do with variables, for example you make a global variable called background and set it to 0. Then on each one of your button presses set the variable to a different number, button1 press set global variable to 1, button2 press set global variable to 2 etc.... Then on your second layout you just check what the variable is, on start layout>if global variable background =1 set background to background 1 and so on.
B
48
S
16
G
2
Posts: 109
Reputation: 4,332

Post » Sun Jun 15, 2014 2:48 pm

With the response our friend Sumyjkl in another post that I got the solve my problem.

Sumyjkl wrote:Make it global. It's in the properties tab on the object. You'll need to set it invisible if you at some stage don't want it though.


Thanks, "twg", in response tbm, then try this way you spoke.
B
11
S
3
G
1
Posts: 105
Reputation: 1,135


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 17 guests