How do I clicker game (Money mountain bug)

Get help using Construct 2

Post » Thu Aug 03, 2017 7:48 pm

Follows attached file for better understanding: https://mega.nz/#!oSJh0QIT!C20f94hQJPR3 ... HJzuKsDaVY
I'm creating a clicker style game where you make money by tapping the screen quickly.
A pile of money goes up as the green bar of progress grows, so far so good.
The problem is time to move from "Lobby" layout, and returns to "Game" layout again, the stack of money does not continue from where it left off.
I have tried in many ways without success. How can I be doing to fix this? Any doubts in writing this piece, tell me that I rewrite again = D Thanks! Translated from Portuguese to English.
If there is a better way to reprogram my stack of money, I thank you.
B
22
S
2
Posts: 43
Reputation: 972

Post » Fri Aug 04, 2017 1:23 am

You can use the "persist" behaviour on the object(s) that you want to retain the values and settings... but you are best off making some kind of save/load system for the data.

Are you making this for mobile platforms or for a PC NWjs export?

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Fri Aug 04, 2017 1:56 am

SoldjahBoy wrote:You can use the "persist" behaviour on the object(s) that you want to retain the values and settings... but you are best off making some kind of save/load system for the data.

Are you making this for mobile platforms or for a PC NWjs export?

~Sol

I've tried using this behavior, but it ends up losing the order that money is creating. I'm working on mobile phones.
B
22
S
2
Posts: 43
Reputation: 972

Post » Fri Aug 04, 2017 2:01 am

It sounds like you might be better to read up on using local storage - essentially creating a "save" and "load" system to take care of data persistence between layout changes.

You can read more about local storage HERE

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Fri Aug 04, 2017 5:17 pm

[quote="SoldjahBoy"]It sounds like you might be better to read up on using local storage - essentially creating a "save" and "load" system to take care of data persistence between layout changes.

You can read more about local storage [url=https://www.scirra.com/manual/188/local-storage]HERE[/url]

~Sol[/quote]
I tried with local storage but without success, I think I'm doing it wrong. The game that I'm inspiring and this https://play.google.com/store/apps/deta ... e&hl=pt_BR
I really wanted to create the way objects are stacked in this game. I have succeeded in creating an animation in which each frame increases the number of money stacked, but unfortunately it was not 100% true what I really want and even more it was created several frames (100 in my case) that ends up weighing a little for mobile devices
B
22
S
2
Posts: 43
Reputation: 972

Post » Mon Aug 07, 2017 12:10 am

I haven't used local storage much at all myself, and not for a long time. If it was for NWjs I would be able to make some examples...

Local storage would definitely be the way to go though... there may be some other tutorials or example files kicking around.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Mon Aug 07, 2017 10:21 pm

SoldjahBoy wrote:I haven't used local storage much at all myself, and not for a long time. If it was for NWjs I would be able to make some examples...

Local storage would definitely be the way to go though... there may be some other tutorials or example files kicking around.

~Sol

Thank you for your help. I found a form using array and local storage and the result is what I expected = D . I will soon post the link from my game if you wish to see the result. See you!
B
22
S
2
Posts: 43
Reputation: 972

Post » Mon Aug 07, 2017 11:52 pm

OK great! Glad you found a solution that works for you :D

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474


Return to How do I....?

Who is online

Users browsing this forum: dand, mageekm, oosyrag and 20 guests