Global variables use

Get help using Construct 2

Post » Wed May 02, 2012 8:31 pm

Hello!

How do I use global variables outside studio? For example, I use Score variable and exporting the project to Windows 8 metro app. How can I access this variable in the code?
B
13
S
2
G
3
Posts: 24
Reputation: 2,812

Post » Thu May 03, 2012 1:45 pm

It's not a complete answer but it might get you on the right path.
http://www.scirra.com/tutorials/266/webstorage-how-to-save-ingame-information/page-1
My game Petrolhead Tactics is now on Steam Greenlight. I could not have done this without C2 ? Please rate, if you like!

Steam client already open: petrolheadtactics.com/steam
Web: petrolheadtactics.com/greenlight
B
19
S
4
G
4
Posts: 132
Reputation: 4,095

Post » Thu May 03, 2012 3:30 pm

Great! Thank you very much.
I've just tried to solve this problem in such a way and it works :)

The only thing, I had to overlook the js code in Visual Studio to find where my variable gets value. I took it from the WebStorage and now my Windows 8 game has the working Share Charm!
B
13
S
2
G
3
Posts: 24
Reputation: 2,812


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, SpartCrafter, Yahoo [Bot] and 25 guests