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

#1 2012-02-21 03:22:07

ensytan
New Scratcher
Registered: 2012-02-18
Posts: 1

Scoring system

Hi all,

Im working on a project where upon successful click, the clone will 1) decrease in opacity and 2) duplicates original and it increases score by one. The thing is as i go along deep into the gameplay, if i accidentally press on other clones, it changes the score by adding one two.

How do i make the scoring as such that it only function ONCE when clicked and that's it, stopped adding thereafter...

Cheers!

Offline

 

#2 2012-02-21 09:52:55

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Scoring system

You could create a ghost sprite and have it go to the real x and y locations of the sprite and when it''s checking if the user has clicked the correct one, you could use:

when gf clicked
set [score v] to (0)
set [ghost v] effect to (100)
forever
    go to x:(x) y:(y)
    if <<touching [mouse-pointer v]?> and <mouse down?>>
        wait until <not <mouse down?>>
        change [score v] by (1)
        broadcast [new clone v]
    end
Then the "new clone" broadcast will tell the other sprite that a new clone should be created and goes on from there.

This sounds like a pretty fun and cool game, when it comes out, can you tell me?  smile

Offline

 

Board footer