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

#1 2013-02-01 23:46:52

Kingelmobap
Scratcher
Registered: 2010-09-13
Posts: 4

Making Multiples of 10 do something.

I am currently remixing pong starter. How can I make something change when a variable hits a multiplier of 10, (for ex everytime ball hits paddle 10 times a level goes up)

Offline

 

#2 2013-02-02 06:34:49

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Making Multiples of 10 do something.

when gf clicked
set [score v] to [0]
set [level score v] to [0]
forever
if <bat hit>
change [score v] by [1]
change [level score v] by [1]
if <((level score) mod (10)) = (0)>
set [level score v] to (0)
change [level v] by [1]
EDIT if you get double taps, so the score goes to 11, 12 etc, use (level score) > 9 instead

Last edited by zammer990 (2013-02-02 06:36:10)


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

Board footer