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
I am fairly new to scratch, so I wouldn't say I'm the most expert scratcher, but here's my opinion anyway!
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!)
Offline
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
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
Offline