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.
when gf clicked forever wait until <touching [Thing v]?> change [Score v] by [How many points the thing it collected is worth] end
Last edited by skippito (2012-06-21 13:23:03)
Offline
skippito wrote:
Here is a script for the points.
when gf clicked forever wait until <touching [Thing v]?> change [Score v] by [How many points the thing it collected is worth] end
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:
when gf clicked forever wait until <touching [collector v]?> go to x: (pick random [-180] to [180]) y: (pick random [-180] to [180]) change [Score v] by [the number of points the thing being collected is worth] endI hope this helped.
Last edited by skippito (2012-06-21 13:28:17)
Offline