Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Help save the game !

matheusfr27
Registered User
Quote
2019-01-22 03:20:26

Hello, I apologize for my English not being very good.

I've already looked at various things like doing game saves on Copper Cube, but I have not yet come up with a clear way to do that. Could you help me with that?

Thank you !


j9907
Registered User
Quote
2019-01-22 08:39:25

Do what I'm doing :)

https://www.ambiera.com/forum.php?t=6640


srfstudio
Registered User
Quote
2019-01-22 13:05:51

@matheusfr27 The way that CC is meant to save/load the game is with action called 'Load or Store Variable from or to disk'. It doesn't save the actual game-state but only variable values that user manually selects.

@j9907 I'm not sure if I've looked hard enough but it seems that Load/Save variable action doesn't have any Javascript reference? We can only use CC's action and can't use Javascript for this?


xanimalkingx
Registered User
Quote
2019-01-22 19:24:08

matheusfr27 wrote:
Hello, I apologize for my English not being very good.

I've already looked at various things like doing game saves on Copper Cube, but I have not yet come up with a clear way to do that. Could you help me with that?

Thank you !

I am not sure yet but Im pretty sure you can save entire object properties into json objects than save them to a file using the save to disc coppercube action. Then you could re-assign the properties from the json text from the local file into all objects that reference than when loading the save. Not sure about this, since CopperCube has ES5 and the JSON class is only on ES6+. Pretty sure there is some way to save JSON in ES5, though.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact