Ubiquitous Variables

Get help using Construct 2

Post » Thu Mar 13, 2014 5:28 pm

Just saying it simply:

variables that will exist after changing layout. :D

in would use that in my game as currency; you collect it in game and with it, you can boost your player, gain effects and blah blah blah. :ugeek:

is that possiple some way? :mrgreen:
~~~~Jabutosama
B
14
S
3
Posts: 68
Reputation: 1,439

Post » Thu Mar 13, 2014 5:33 pm

Just use global variables.
Or you can create an object that is global and add instance variabes to it.
Global objects don't get destroyed when changing layouts. On a game of mine I have an sprite called Settings, and save all the settinsg as instance variables of that object.
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Thu Mar 13, 2014 5:43 pm

WOAH :o

i didn't even know that :shock: it's possiple this way... :shock: i mean... well. :?

Thank you :mrgreen:
~~~~Jabutosama
B
14
S
3
Posts: 68
Reputation: 1,439

Post » Thu Mar 13, 2014 9:01 pm

Your welcome, I just like the global object with vars, so I can keep things organized better. Global vars are a pain
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests