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

#1 2012-05-28 11:34:43

Sean09877
New Scratcher
Registered: 2012-05-26
Posts: 14

How do you make the sprite when it hits something.PLEASE HELP!!! :( :(

I'm trying to make twogames but i dont know how to make a sprite disapear when it hits something. PLEASE HELP!!!!!  sad   sad   sad   sad

Offline

 

#2 2012-05-28 11:37:37

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: How do you make the sprite when it hits something.PLEASE HELP!!! :( :(

I think this belongs in Help with Scripts.  smile

Try this:

when gf clicked
show
wait until <touching [Sprite2 v]?>
hide
Set 'Sprite2' to whatever you want it to touch then disappear.

Last edited by SciTecCf (2012-05-28 11:39:06)


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&amp;display=small

Offline

 

#3 2012-05-28 11:49:22

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: How do you make the sprite when it hits something.PLEASE HELP!!! :( :(

Yes it does belong in help with scripts, but the script in SciTecCf's post will work beautifully.


Why are the secret organizations getting all the attention?  mad

Offline

 

#4 2012-05-28 17:00:26

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Re: How do you make the sprite when it hits something.PLEASE HELP!!! :( :(

SciTecCf wrote:

I think this belongs in Help with Scripts.  smile

Try this:

when gf clicked
forever
show
wait until <touching [Sprite2 v]?>
hide
Set 'Sprite2' to whatever you want it to touch then disappear.

added a forever

Last edited by berberberber (2012-05-28 17:01:44)


http://i47.tinypic.com/2iaa73k.png

Offline

 

#5 2012-05-29 17:51:18

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: How do you make the sprite when it hits something.PLEASE HELP!!! :( :(

berberberber wrote:

SciTecCf wrote:

I think this belongs in Help with Scripts.  smile

Try this:

when gf clicked
forever
show
wait until <touching [Sprite2 v]?>
hide
Set 'Sprite2' to whatever you want it to touch then disappear.

added a forever

the wait until block means theres no need, it would be a forever if it used an "if" statement


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#6 2012-05-30 20:24:14

3sal2
Scratcher
Registered: 2012-03-22
Posts: 100+

Re: How do you make the sprite when it hits something.PLEASE HELP!!! :( :(

Like this:

when gf clicked
show
forever if <touching [Sprite2 v]?>
hide


http://scratch.mit.edu/static/projects/3sal2/3120946_sm.png In 2012, scientists at the LHC discovered the Higgs boson, which explains the source of the masses of the W+, W-, and Z bosons, as well as fermions.

Offline

 

#7 2012-05-30 22:30:36

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: How do you make the sprite when it hits something.PLEASE HELP!!! :( :(

@berberberber- Actually, you don't want a forever loop.  What would happen?  The main sprite (let's call it Sprite1) would start out shown, and then once it touched the other sprite (Sprite2), it would hide.  But then the script would jump back to the beginning of the forever loop and show Sprite1 again.  In fact, if Sprite1 is still touching Sprite2, it will flicker between hidden and shown.  Presumably, you want the script to stop after Sprite1 touches Sprite2 (unless you want Sprite1 to reappear when they are no longer touching).

Last edited by amcerbu (2012-05-30 22:31:40)

Offline

 

#8 2012-06-02 13:44:11

Sean09877
New Scratcher
Registered: 2012-05-26
Posts: 14

Re: How do you make the sprite when it hits something.PLEASE HELP!!! :( :(

Please don't fight on my forum. Fight on your own forum

Offline

 

#9 2012-06-02 14:00:15

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: How do you make the sprite when it hits something.PLEASE HELP!!! :( :(

They aren't fighting, don't worry. amcerbu is merely pointing out something that berberberber hadn't apparently thought of. And have you fixed the problem?


Why are the secret organizations getting all the attention?  mad

Offline

 

#10 2012-06-02 14:29:08

tb11
Scratcher
Registered: 2012-03-18
Posts: 8

Re: How do you make the sprite when it hits something.PLEASE HELP!!! :( :(

yeah fight on your own fourm  smile


mine craft!!!!  smile

Offline

 

#11 2012-06-02 18:20:25

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Re: How do you make the sprite when it hits something.PLEASE HELP!!! :( :(

amcerbu wrote:

@berberberber- Actually, you don't want a forever loop.  What would happen?  The main sprite (let's call it Sprite1) would start out shown, and then once it touched the other sprite (Sprite2), it would hide.  But then the script would jump back to the beginning of the forever loop and show Sprite1 again.  In fact, if Sprite1 is still touching Sprite2, it will flicker between hidden and shown.  Presumably, you want the script to stop after Sprite1 touches Sprite2 (unless you want Sprite1 to reappear when they are no longer touching).

Yeah, I fogot to add another wait until.


http://i47.tinypic.com/2iaa73k.png

Offline

 

#12 2012-06-02 18:24:22

WingsGames
Scratcher
Registered: 2011-02-21
Posts: 500+

Re: How do you make the sprite when it hits something.PLEASE HELP!!! :( :(

3sal2 wrote:

Like this:

when gf clicked
show
forever if <touching [Sprite2 v]?>
hide

I don't think that that would work... :\. Forever if means that if a condition is true, start the forever loop.


Are you an aspiring home decorator? If so, please answer my question!

Offline

 

Board footer