How do I get the Global Highscore to store correctly?

Get help using Construct 2

Post » Sat Jul 26, 2014 5:51 pm

Hello!
I am working with the runner template to learn Construct and I wanted to put in a High Score system. I watched the video ArcadEd did and I adjusted the Storage local information, ie: (Storage.LocalValue("Highscore")), I saw other people had commented on but I still can't get the Highscore to post to the game screen or the game over screen. I keep getting the "NaN" error, I consulted other posts about this problem but they answered with the same solutions.

Here is a screenshot of my main layout perhaps the problem lies in my construction:

Image

Thank you in advance for your time.
B
5
Posts: 4
Reputation: 229

Post » Sat Jul 26, 2014 8:29 pm

i think if you remove the second condition on event 18 and remove event 19, it should be ok

or

Image
B
6
S
1
Posts: 51
Reputation: 502

Post » Sat Jul 26, 2014 9:14 pm

In event 2 use "Set Highscore" to int(Storage.LocalValue("Highscore"))

NAN is "Not A Number" if you just use (Storage.LocalValue("Highscore")) you are getting the value as a "string" and not an "integer" .
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Post » Sat Jul 26, 2014 10:17 pm

Thanks Trulz & Minor! That took care of the NaN. Appreciate it.
B
5
Posts: 4
Reputation: 229


Return to How do I....?

Who is online

Users browsing this forum: babymumu and 8 guests