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

#1 2011-02-04 10:09:52

jheffernan
New Scratcher
Registered: 2011-02-04
Posts: 2

Deleting Characters/Show/Hide

When food is eaten or an asteroid is hit, I would normally delete the instance of the Sprite in StageCast Creator.  How do I do this in Scratch?  I can hide it but it seems like there should be a way to delete that maybe I am not seeing. 

Thanks!

Offline

 

#2 2011-02-04 12:26:44

henhouse05
Scratcher
Registered: 2011-02-04
Posts: 11

Re: Deleting Characters/Show/Hide

I am fairly new to scratch, so I wouldn't say I'm the most expert scratcher, but here's my opinion anyway! big_smile 
If you want a sprite to hide, deleting it will make it go away completely, and it won't be in the project any more. However, by using the show/hide blocks, hiding the sprite for a certain amount of time can be acheived.
Here's a basic example
<when green flag clicked>
<hide>
<wait( 2 )secsc>
<show>

This would make the prite hide for two seconds, and then show it again.
Hope this helps (sorry if it doesn't!)  big_smile  smile

Offline

 

#3 2011-02-04 13:04:06

peterkap
Scratcher
Registered: 2009-01-24
Posts: 1000+

Re: Deleting Characters/Show/Hide

jheffernan wrote:

When food is eaten or an asteroid is hit, I would normally delete the instance of the Sprite in StageCast Creator.  How do I do this in Scratch?  I can hide it but it seems like there should be a way to delete that maybe I am not seeing. 

Thanks!

Do this:
<when green flag clicked>
<show>
<forever if><touching[ (item that destroys it)
<hide>

Offline

 

#4 2011-02-04 13:11:57

Lord-Sprites
Scratcher
Registered: 2010-01-24
Posts: 500+

Re: Deleting Characters/Show/Hide

That may not work if he plans on reusing the asteroids later
For something like this, you have to set up a variable
For example, name it Hit
If touching the item that destroys it, then set Hit to 1
Forever
If Hit = 1
Hide
Else
Show

And then you just program around that


http://ls.gd/tzhttp://ls.gd/aghttp://ls.gd/axhttp://ls.gd/tfhttp://ls.gd/lo

Offline

 

Board footer