(Possible Suggestion) Group Global Variables

Get help using Construct 2

Post » Thu Nov 14, 2013 3:36 pm

Yeah, just tested this, and I can't change local variables unless the sprite is on the screen.

Also tried using an array instead of a sprite, and it works fine.

Still, if it's possible in the future, I think it would be useful to be able to group global variables for those of us that plan on having dozens and dozens.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
82
S
14
G
7
Posts: 975
Reputation: 11,037

Post » Thu Nov 14, 2013 3:38 pm

@TELLES0808

Sometimes when I test my game, I'll jump to certain points in the game. I'd rather not have to jump between each level each time.

Thanks for your help!
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
82
S
14
G
7
Posts: 975
Reputation: 11,037

Post » Thu Nov 14, 2013 3:44 pm

Oh, that's the point, so, you can make an event sheet and call it as "shared sheet" or "debug sheet"... where you can place the actions to create the global objects anywhere you want, pre-configure them and them check if they already exist, skipping the step above.

Should be something like this:
= Intelligence.Count = 0
-> Create Intelligence at X and Y;

Import this event sheet inside any other event sheets you have...

I personally like to organize my event sheets in separated parts, and import them all inside a global event sheet.TELLES08082013-11-14 15:45:11
Image
B
108
S
24
G
18
Posts: 1,373
Reputation: 22,824

Post » Thu Nov 14, 2013 3:53 pm

@TELLES0808

This works great with arrays rather than sprites, as you don't need to have them on any layout.

Thanks to you and @PixelHero
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
82
S
14
G
7
Posts: 975
Reputation: 11,037

Post » Thu Nov 14, 2013 3:55 pm

Very nice! indeed!!
Image
B
108
S
24
G
18
Posts: 1,373
Reputation: 22,824

Previous

Return to How do I....?

Who is online

Users browsing this forum: MrSkailo and 26 guests