In my game, a sprite is supposed to touch another sprite and when it does that, it should increase the score.
This is my script for sprite 1:
when gf clicked set [score v] to 0 forever if <touching sprite2> change [score v] by 1 endWhen I play my game, the score does not work. Can anyone please tell me if there is anything wrong with this script? Also if there is something wrong with it then can someone give me a replacement script? Thank you for all the help.
Offline
MrBob9786 wrote:
In my game, a sprite is supposed to touch another sprite and when it does that, it should increase the score.
This is my script for sprite 1:when gf clicked set [score v] to (0) forever if <touching [sprite2 v]?> change [score v] by (1)When I play my game, the score does not work. Can anyone please tell me if there is anything wrong with this script? Also if there is something wrong with it then can someone give me a replacement script? Thank you for all the help.
Fixed.
Anyway, one problem I see is that your score is increasing by huge amounts, correct? Well then, to fix that you might want to add this block into your script after the [change score by 1] block:
wait until <not (touching [sprite2 v]?)>I hope that this helps!
Last edited by ErnieParke (2012-11-17 13:08:35)
Offline