This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-06-14 18:34:29

dkl65
New Scratcher
Registered: 2012-05-24
Posts: 10

How can I make High Score Variable not lose its value?

Hello!
I have made a Card Bomber game at http://scratch.mit.edu/projects/dkl65/2611512. I have a High Score variable that changes its value to the score if it is higher than the previous High Score. However, everytime I refresh the page, the High Score variable returns to 0. I don't have any block in the scripts that sets High Score to 0. The Nyan Cat game at http://scratch.mit.edu/projects/SeptimusHeap/1801269 keeps my high score every time I play it. I downloaded it, and the High Score is changed in Sprite36.  It is the same thing I do:
if score > High Score{
  set High Score to score;
}
I want my High Score variable to keep its value indefinitely, just like the Nyan Cat game. I am using Scratch 1.4. What should I do?
Thanks!

Offline

 

#2 2012-06-14 19:07:25

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: How can I make High Score Variable not lose its value?

Unfortunately, this feature is not available in Scratch 1.4...it will be in 2.0.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#3 2012-06-14 21:02:08

dkl65
New Scratcher
Registered: 2012-05-24
Posts: 10

Re: How can I make High Score Variable not lose its value?

When is version 2.0 coming out? I missed the beta version. Looks like I'll be redoing my program in version 2.0 later. How much do you know about 2.0? I know that there will be functions. Do they accept parameters/arguments? My project has a lot of repetitive code; the functions would really help.

Offline

 

#4 2012-06-14 22:52:47

silvershine
Scratcher
Registered: 2010-11-21
Posts: 500+

Re: How can I make High Score Variable not lose its value?

dkl65 wrote:

When is version 2.0 coming out? I missed the beta version. Looks like I'll be redoing my program in version 2.0 later. How much do you know about 2.0? I know that there will be functions. Do they accept parameters/arguments? My project has a lot of repetitive code; the functions would really help.

Scratch 2.0 is expected to be released towards of end of this summer/early fall. Detailed information about Scratch 2.0 can be found here.

Offline

 

#5 2012-06-25 19:08:57

RoboNeo9
Scratcher
Registered: 2012-05-09
Posts: 100+

Re: How can I make High Score Variable not lose its value?

In Scratch 2.0 you can use cloud data which is like saving stuff to a database. I think that is what you would need.

Offline

 

#6 2012-06-26 16:06:54

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: How can I make High Score Variable not lose its value?

In Scratch 2.0, you can make custom blocks with your own parameters which would help in your script repetition problem.  smile


Hai.

Offline

 

Board footer