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

#1 2012-02-28 19:15:57

Becabooz
Scratcher
Registered: 2012-01-25
Posts: 22

How do I:

See my game has A score, I wanted to have added 1 life every 100 score, When I do it keeps adding them! How do I do it! (i tryed the score =100 in the if box

Offline

 

#2 2012-02-28 19:21:22

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: How do I:

First of all, you may want to post some code. But here is how.

if <((score) mod [100]) = [0]>
change [lives v] by [1]
end

Last edited by bobbybee (2012-02-28 19:21:31)


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#3 2012-02-28 20:24:16

Haiming
Scratcher
Registered: 2011-08-20
Posts: 1000+

Re: How do I:

I agree with bobbybee.

Offline

 

#4 2012-02-28 20:31:47

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: How do I:

Building on that, if your score check is in a loop you may want to do it this way so it doesn't keeping adding lives:

forever
  if <((score) mod [100]) = [0]>
  change [lives v] by [1]
  end
  wait until <not ((score) mod [100])>
end


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#5 2012-02-28 22:40:56

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: How do I:

BoltBait wrote:

Building on that, if your score check is in a loop you may want to do it this way so it doesn't keeping adding lives:

forever
  if <((score) mod [100]) = [0]>
  change [lives v] by [1]
  end
  wait until <not <((score) mod [100])=[0]>>
end

Fixed  smile


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#6 2012-02-29 00:47:10

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: How do I:

Thanks.


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#7 2012-02-29 15:43:15

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: How do I:

Woo-hoo! Someone finally agrees with me...


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#8 2012-03-10 08:52:00

darksky0001
Scratcher
Registered: 2012-02-26
Posts: 15

Re: How do I:

So u were listening to me and tierna when we were asking mr noble that...


Clicky: http://scratch.mit.edu/projects/darksky0001/2517159

Offline

 

Board footer