Hi everyone,
I need help! does anybody know how to collect and score points. I need it school, so quickly, please!
Thanks,
11janssena
Offline
You will need a variable for the score, and then a script that changes the variable when someone scores.
Offline
Let's say if someone scores a point for touching a apple.
The script would say
When the flag is clicked
forever [
wait until touching apple [
change score by 1 ]]
So basically if you touch the apple it will change your score by 1
Offline
Here is a script for the points.
whenclicked
foreverwait untiltouchingThing ▼?changeScore ▼byHow many points the thing it collected is worth
Last edited by skippito (2012-06-21 13:23:03)
Offline
skippito wrote:
Here is a script for the points.
whenclicked
foreverwait untiltouchingThing ▼?changeScore ▼byHow many points the thing it collected is worth
Since i'm rubbish at coding blocks in forums i'll describe it.
Since forever if you are touching it, it will change points you are left with 2 options:
-Either hide the sprite which gives you the points (or move it) once touched
-or wait until not touching sprite until able to wait to touch sprite.
Offline
OK. Try putting this in the things being collected:
I hope this helped.whenclicked
foreverwait untiltouchingcollector ▼?go to x:pick randomy:-180to180pick random-180to180changeScore ▼bythe number of points the thing being collected is worth
Last edited by skippito (2012-06-21 13:28:17)
Offline