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

#1 2013-03-09 11:58:57

gracielace
New Scratcher
Registered: 2013-03-09
Posts: 3

How do I make a boost in the score?

I need to make a boost in the score when the sprite manages to eat three items in a row. There will be a  boost in the score by about 3 points. Is there anyone here that knows how     to do this? Thanks

Offline

 

#2 2013-03-09 12:56:28

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: How do I make a boost in the score?

Have a varibale called score and a variable called row. Have score visible. Set row to 0. If the character eats 1 item set row to 1, if they eat another set it to 2 and another, 3. But if there is much of a time difference between eating them set it to 0 again. Then have a script that says, when row = 3 change score by 3 then wait until row doesn't equal 3 (so that it doesn't just continue adding three. If this helps then good, else say and I'll try and make a project with it in so that you can download it.

Offline

 

#3 2013-03-09 13:57:43

Scratchthatguys
Scratcher
Registered: 2010-07-16
Posts: 1000+

Re: How do I make a boost in the score?

Don't use set for row, just change it every time something is eaten. Then when row equals three, set row to zero and change score by 3.

Offline

 

#4 2013-03-09 22:45:30

Sky01
Scratcher
Registered: 2010-10-23
Posts: 10

Re: How do I make a boost in the score?

gracielace wrote:

I need to make a boost in the score when the sprite manages to eat three items in a row. There will be a  boost in the score by about 3 points. Is there anyone here that knows how     to do this? Thanks

There's something called the "mod" block. It looks like this:

(( ) mod ( ))
Using a variable called "score", Make this:
forever if <((score) mod (0)) = (0)>
change [score] by (1)
wait until <not <((score) mod (0)) = (0)>>
end

Last edited by Sky01 (2013-03-09 22:45:45)


I had a really cool animation planned for this signature but couldn't figure out how to post it  sad
http://www.my_animation_WAS_here

Offline

 

#5 2013-03-10 07:13:57

gracielace
New Scratcher
Registered: 2013-03-09
Posts: 3

Re: How do I make a boost in the score?

Thanks for your help  smile

Offline

 

Board footer