Loading saves

Get help using Construct 2

Post » Sat Nov 10, 2012 7:29 pm

Hi guys

Is there a way one game can load another games saved data?

For example you play "game 1" and it asks you to go play "game 2" and perform an action ... "game 1" will only proceed when the action in "game 2" has been completed?

The other way would be for one game to change a variable inside another game.

Hopefully this make sense

Thank you in advance!Ninjadoodle2012-11-10 19:31:28
B
26
S
14
G
8
Posts: 105
Reputation: 7,225

Post » Sun Nov 11, 2012 1:52 am

If both games are being hosted on the same domain, you should theoretically be able to do cross-game webstorage.

So in GAME1 you save a key as GAME1HEALTH. Then you fire up GAME2 and load GAME1HEALTH it should work too.

This won't work on places like the Scirra Arcade as they prepend locastorage with a unique ID. For that I guess you'd need to look at Ajax and a serverside implementation.
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Sun Nov 11, 2012 3:48 am

Thank you for the info! Yup, I'm gonna be hosting them on the same domain. I didn't think you could load another games save, but what you are saying makes sense ... since its web storage, it shouldn't mater what is loading it. I will try this and see if it works :) Ninjadoodle2012-11-11 03:50:02
B
26
S
14
G
8
Posts: 105
Reputation: 7,225

Post » Sun Nov 11, 2012 12:47 pm

@Ninjadoodle Good stuff - let me know how it goes, I'm intrigued as to whether it would work.
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783


Return to How do I....?

Who is online

Users browsing this forum: Aserak2012, Colorfish, Waltuo, Yahoo [Bot] and 4 guests