Pages: 1
Topic closed
ok i'm making a game that requires stamping and each sprite is given this script"
<when I receive[ sprite ___
<show>
<go to[ mouse pointer
<forever if> <mouse down?>
<go to[ mouse pointer
<if> <key[ space ]pressed?>
<stamp>
<hide>
heres the problem: there are 9 sprites that have this script, so once I click on one of them to stamp them, the first time works, but when i try to stamp another one, the previous sprite stamps as well. and so on and so on, until they all end up just stamping over themselves. does anyone know and way to fix this problem?
Offline
If you just want each sprint to stamp once after it receives its broadcast then you might try changing the forever-if control block to a wait-until control block.
Offline
Digimath wrote:
If you just want each sprint to stamp once after it receives its broadcast then you might try changing the forever-if control block to a wait-until control block.
i just tried that and it doesn't work. it ends up not going to the mouse pointer
Offline
Have a variable that gets set, when a sprite is chosen, to a number identifying that sprite. For examples sake, call it spriteID
Then, change the mousedown condition to "if mousedown" AND "if SpriteID=1"
That way, only the sprite you allocate as being sprite 1 will stamp. On sprite 2, change it into ""if mousedown" AND "if SpriteID=2" etc
Offline
yay! thanks it worked. thanks so much. i dont know why i didnt think of that, im just scratch-dead right now
Offline
o and btw here is the project: http://scratch.mit.edu/projects/funkymonkey/309593
Offline
Topic closed
Pages: 1