How do I change the value from another layout?

Get help using Construct 2

Post » Fri Sep 04, 2015 3:05 pm

Hey there.

I am currently making a game with Construct 2, and I want to have a button in one layout to change a variable from an object from another layout with a value from another variable. I tried to do the normal thing, When 'Button Pressed' -> Set value from variable 'X', however, it doesn't work at all. I tried over and over with other options I could think of, it just doesn't work, I wasted 6 hours so far and NOTHING!!

Please help me out.

//PinguRares
B
3
Posts: 8
Reputation: 195

Post » Fri Sep 04, 2015 3:16 pm

You have to use a global variable to have access to a value from every layout.
B
24
S
3
G
1
Posts: 451
Reputation: 2,165

Post » Fri Sep 04, 2015 3:19 pm

Asmodean wrote:You have to use a global variable to have access to a value from every layout.

And how do I make my Instance Variable a global one, again? I forgot :p
B
3
Posts: 8
Reputation: 195

Post » Fri Sep 04, 2015 3:21 pm

Right click on the event sheet, 'Create Global Variable'
B
9
S
3
Posts: 104
Reputation: 1,033

Post » Fri Sep 04, 2015 3:40 pm

Frostein wrote:Right click on the event sheet, 'Create Global Variable'

Thank you!!
B
3
Posts: 8
Reputation: 195


Return to How do I....?

Who is online

Users browsing this forum: Armench, Jackriduk, kiki4construct and 29 guests