Im trying to make a score keeper tht says when a sprite picks up an item (press space on this item, that item hides) and the variable score changes by 1. the problem with this is that when i press space on the item, the score goes up by 0 or any number higher than 1
Do you have any better ways to keep score??
Offline
Are you using the [change [Variable] by (1)] block? Make sure it's a 1.
So the score won't change rapidly when you hold space, use a variable to stop you from increasing the score when you've already gotten the item.
Offline
wait, that didn't work. i wuz trying to use the blocks... alright, i'll write it out for you. here
if the problem is wat it sounds like (score is increasing rapidly cuz the key is held down) then this will fix it for you. it will increase the score and then wait until the key isn't pressed to change it again
when green flag clicked
forever
[
if <<key (space) pressed> and <touching (object)>>
[
change variable (var) by (1)
wait until <not<touching (object)>>
]
]
Offline