Page 1 of 1

How do I Make Coins Save with webstorage?

PostPosted: Sat Mar 01, 2014 3:26 am
by kota
How do I Make Coins Save with webstorage? i have never done this coins thing before and strugling at it so can someone give me a capx? i need the coins to save without having a save button

Re: How do I Make Coins Save with webstorage?

PostPosted: Sat Mar 01, 2014 12:02 pm
by Doc Ai
What coin thing are you talking about?
I will assume that you are doing this:
When the player touches a coin,Global variable Coin increases by 1.
When do you want to save?Game over?

Re: How do I Make Coins Save with webstorage?

PostPosted: Sat Mar 01, 2014 12:09 pm
by Doc Ai
I will assume like that,
In game over layout,Make another Global variable called totalcoin

Webstorage Local key "Coin"exist -Set total coin to webstorage.LocalValue("Coin")

Coin>totalcoin - set totalcoin to coin

trigger once, - Webstorage Set local key "Coin" to ""&totalcoin
-Set text coin to Your total coin is: & Webstorage.LocalValue("Coin")

Re: How do I Make Coins Save with webstorage?

PostPosted: Sat Mar 01, 2014 12:36 pm
by Vuuv
It's actually very easy: https://www.scirra.com/manual/120/webstorage
All you need is there.

Re: How do I Make Coins Save with webstorage?

PostPosted: Sat Mar 01, 2014 1:22 pm
by Doc Ai
Just reading the manual and making things is not very easy.
source:My experience