Call a global variable from another sheet

Get help using Construct 2

Post » Wed Aug 31, 2016 9:47 pm

Hi,


Can anyone help me with this?

I want to call a global variable from another sheet. It is possible?


Thanks :)
B
16
S
1
Posts: 35
Reputation: 666

Post » Wed Aug 31, 2016 9:54 pm

Yes, Globals are global.
ImageImageImage
B
71
S
21
G
221
Posts: 3,650
Reputation: 124,229

Post » Wed Aug 31, 2016 9:59 pm

blackhornet wrote:Yes, Globals are global.


Thanks!
Can you teach me how I do that?
Please...
B
16
S
1
Posts: 35
Reputation: 666

Post » Wed Aug 31, 2016 10:03 pm

There's nothing to teach. You just use it the same.
ImageImageImage
B
71
S
21
G
221
Posts: 3,650
Reputation: 124,229

Post » Wed Aug 31, 2016 10:07 pm

just right click to add a variable (for example money)
add a spriet (for example button )
add the object 'mouse' (doubleclick and add it)
and write a code (example) :
{ on 'button' clicked - > add to money 10 }
to see the variable you can make a text and put { ' every tick - > set text 'money' }
That's it.

Now go check the tutorials !
Good luck

local-variables_t69628
https://www.scirra.com/manual/73/instance-variables
https://www.scirra.com/manual/83/variables
B
11
S
3
Posts: 277
Reputation: 1,395

Post » Wed Aug 31, 2016 10:11 pm

Radulepy wrote:just right click to add a variable (for example money)
add a spriet (for example button )
add the object 'mouse' (doubleclick and add it)
and write a code (example) :
{ on 'button' clicked - > add to money 10 }
to see the variable you can make a text and put { ' every tick - > set text 'money' }
That's it.

Now go check the tutorials !
Good luck

local-variables_t69628
https://www.scirra.com/manual/73/instance-variables
https://www.scirra.com/manual/83/variables


Thanks. I understand now.
Sorry for stupid question.
B
16
S
1
Posts: 35
Reputation: 666

Post » Wed Aug 31, 2016 10:13 pm

@Maced0
No problem and good luck ;)
B
11
S
3
Posts: 277
Reputation: 1,395


Return to How do I....?

Who is online

Users browsing this forum: BadMario, Yahoo [Bot] and 1 guest