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

#1 2012-10-18 11:19:01

InfamousGeoff
New Scratcher
Registered: 2012-10-18
Posts: 9

Score variable

I am trying to program a game for small children and have it when you mouse over a chosen sprite it adds 1 to score. Tried using the when mouse touching add score 1 but it keeps adding as the mouse touches. I will need this to continue to add only 1 as each selected sprite is moused on. Do not want to have to push down mouse because this is for baby's. Please help and thank you!!!

Offline

 

#2 2012-10-18 11:44:32

jamiewinter
Scratcher
Registered: 2012-08-19
Posts: 100+

Re: Score variable

ok the only way i can think is if you do it and broadcast something so the other object hides then add 1 to score

hope it helps  big_smile


Check out my youtube channel http://www.youtube.com/user/axelregulator/featured

Offline

 

#3 2012-10-18 11:56:05

Willpower
Scratcher
Registered: 2012-01-26
Posts: 1000+

Re: Score variable

You could put:

"Stop Script" after when mouse touching add 1

I have the same sort of problem on some of my games  sad

Last edited by Willpower (2012-10-18 13:37:59)


http://i49.tinypic.com/e84kdj.png

Offline

 

#4 2012-10-18 13:07:12

Zarule6
New Scratcher
Registered: 2012-08-02
Posts: 36

Re: Score variable

You can always add an wait [10/100 etc.]seconds block to stop it from adding it every second.

Offline

 

#5 2012-10-18 14:00:33

Ideas
Scratcher
Registered: 2012-10-07
Posts: 100+

Re: Score variable

Or you could use a wait until e.g.

when gf clicked
forever
if <touching [sprite 1 v]?>
change [score v] by [1]
wait until <not<touching [sprite 1]?>>
if <touching [sprite 2 v]?>
change [score v] by [1]
wait until <not<touching [sprite 2]?>>


http://img685.imageshack.us/img685/2010/screenshot20121110at132.pngI think that you must CLICK above

Offline

 

#6 2012-10-18 17:17:15

InfamousGeoff
New Scratcher
Registered: 2012-10-18
Posts: 9

Re: Score variable

jamiewinter wrote:

ok the only way i can think is if you do it and broadcast something so the other object hides then add 1 to score

hope it helps  big_smile

Use your idea thanks. All the ideas are great and would work but the broadcast is great because i can use it for every. Thank you guys!!

Offline

 

Board footer