How do I Make Coins Save with webstorage?

Get help using Construct 2

Post » Sat Mar 01, 2014 3:26 am

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
Banned User
B
5
S
1
Posts: 42
Reputation: 538

Post » Sat Mar 01, 2014 12:02 pm

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?
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Sat Mar 01, 2014 12:09 pm

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")
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Sat Mar 01, 2014 12:36 pm

It's actually very easy: https://www.scirra.com/manual/120/webstorage
All you need is there.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Sat Mar 01, 2014 1:22 pm

Just reading the manual and making things is not very easy.
source:My experience
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests