This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-11-02 09:03:00

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

i need help with stamping!!! please help me!

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?


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#2 2008-11-02 10:03:15

Digimath
Scratcher
Registered: 2007-07-07
Posts: 100+

Re: i need help with stamping!!! please help me!

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've updated my text adventure game.
Colossal Cave 150http://scratch.mit.edu/static/projects/Digimath/3003787_sm.png

Offline

 

#3 2008-11-02 10:29:40

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: i need help with stamping!!! please help me!

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


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#4 2008-11-02 10:47:38

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: i need help with stamping!!! please help me!

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


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#5 2008-11-02 10:59:58

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: i need help with stamping!!! please help me!

yay! thanks it worked. thanks so much. i dont know why i didnt think of that, im just scratch-dead right now


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#6 2008-11-02 11:37:52

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: i need help with stamping!!! please help me!

o and btw here is the project: http://scratch.mit.edu/projects/funkymonkey/309593


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

Board footer