Do global variables span across event sheets?

Get help using Construct 2

Post » Sun Mar 03, 2013 7:02 pm

Hello my helpful lovelies.
I'm trying to add multiple levels and a total score to my game, and I'm wondering if global variables will be saved across different event sheets before I try this.
If not, what would be the best way to adding things like score and best time to each level at the level select menu? Does it all have to be one big event sheet?
B
10
S
3
G
3
Posts: 234
Reputation: 3,467

Post » Sun Mar 03, 2013 7:10 pm

This is simple to test, but yes, global variables span event sheets.
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Sun Mar 03, 2013 7:30 pm

They span Layouts as well. If you set a variable to something in one layout, then move to another layout, it won't automatically reset. It will still hold the altered value.
So a global variable should work fine.
B
6
S
1
Posts: 67
Reputation: 986

Post » Sun Mar 03, 2013 8:23 pm

In fact, they are so global, you can put all your global declarations in an event sheet of their own, and it doesn't have to be included or associated with any layouts.
B
200
S
51
G
30
Posts: 896
Reputation: 36,494

Post » Mon Mar 04, 2013 5:54 am

Wow. That's helpful. Thank you guys. I think I may do your suggestion Paradox. =)
B
10
S
3
G
3
Posts: 234
Reputation: 3,467


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests