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

#1 2011-06-24 14:27:54

gothicsnowman
New Scratcher
Registered: 2011-06-24
Posts: 1

How do you change levels in game using scoring?

I'm very new when it comes to scratch (the first real project I'm doing is taking an example game and making it more complex). I took the "pong" example, added a scoring system, and I wanted to make it that when you get a certain score the background changes (when you have a score of 20, it changes, when its 40 it changes again etc.) How would I do this though? I know  how to keep score (though sometimes the score counter doesn't increase when like it's supposed to), but I have no clue how to make the background change when the score reaches a certain number.

Offline

 

#2 2011-06-24 14:45:52

samurai768
Scratcher
Registered: 2009-07-21
Posts: 1000+

Re: How do you change levels in game using scoring?

First take the variable that controls the score, and put it in this block:

<(  <=>  )>

Then, type in the extra space the score number has to be for it change the level, and drag it into an if block. Grab a change background block and a set variable to 0 block, and Voila!

When you're all done it should look like this:

http://i55.tinypic.com/2le4i83.png

Offline

 

Board footer