Discuss Scratch

RaspPiPaikin
New Scratcher
4 posts

sprites on only one stage not all

Hello

I am new to scratch and am teaching my daughter. We are working form a book called Adventures in Raspbery Pi. In the make make a video game section you are to make a sprite that only appears on one screen and not all of them. ex. the key is on the inside of the cave to help you get out. How do we do this? when ever we add a sprite it appears on all stages.
deck26
Scratcher
1000+ posts

sprites on only one stage not all

Try something like this

when backdrop switches to [ v]
hide
RaspPiPaikin
New Scratcher
4 posts

sprites on only one stage not all

Thanks. But what if the sprite has actions associated with it. If is touched would it still activate the conditional thread even though it is not visible?
RaspPiPaikin
New Scratcher
4 posts

sprites on only one stage not all

I also don't seem to have a “when backdrop switches to…” options. Where is that?
deck26
Scratcher
1000+ posts

sprites on only one stage not all

RaspPiPaikin wrote:

I also don't seem to have a “when backdrop switches to…” options. Where is that?
Are you using Scratch 2 or 1.4? That block doesn't exist in Scratch 1.4 but is in the Control set in Scratch 2. In 1.4 you'll probably need to do a broadcast just after changing the backdrop.

Hidden sprites shouldn't respond to ‘if touching’ and I've just done a quick test which seems to confirm that although I think I've seen others saying otherwise!

PaganoLeo10
Scratcher
100+ posts

sprites on only one stage not all

deck26 wrote:

Are you using Scratch 2 or 1.4? That block doesn't exist in Scratch 1.4 but is in the Control set in Scratch 2. In 1.4 you'll probably need to do a broadcast just after changing the backdrop.

When backdrop switches to () is actually in events.
deck26
Scratcher
1000+ posts

sprites on only one stage not all

PaganoLeo10 wrote:

deck26 wrote:

Are you using Scratch 2 or 1.4? That block doesn't exist in Scratch 1.4 but is in the Control set in Scratch 2. In 1.4 you'll probably need to do a broadcast just after changing the backdrop.

When backdrop switches to () is actually in events.
Apologies, I should have checked.
RaspPiPaikin
New Scratcher
4 posts

sprites on only one stage not all

I am using 1.4 on a Raspberry Pi. I am teaching my daughter from a book called “Adventures in Raspberry Pi” by Carrie Anne Philbin. the book has been great until this point. I have read through this section and even watched her video making the same RPG game.
Thanks for all the replies. I will test them out today.

Last edited by RaspPiPaikin (Jan. 23, 2015 15:37:20)

Pimpinella
Scratcher
50 posts

sprites on only one stage not all

You could use a blank costume, or probably a 1x1 pixel wide in background color. the sprite is there, but not or barely visible and will still allow actions using sprite collision
tawnycatz
Scratcher
54 posts

sprites on only one stage not all

try this, I use it most of the time:

when green flag clicked
forever

if <(backdrop name) = [name of backdrop ]> then
hide
else
show

end

end
deck26
Scratcher
1000+ posts

sprites on only one stage not all

tawnycatz wrote:

try this, I use it most of the time:

when green flag clicked
forever

if <(backdrop name) = [name of backdrop ]> then
hide
else
show

end

end
It will work but means Scratch doing a lot more work than should be necessary just to run that forever loop and repeatedly tell a sprite to show when already showing (or vice versa). It also means you can never show or hide that sprite using other scripts unless the right backdrop is in place as this script will immediately cancel what you've done. Generally, avoid forever loops unless you're sure you need one - watching for key presses to control movement is a good use but something like this is not really a good time to use a forever loop.

Last edited by deck26 (Jan. 24, 2015 11:30:58)

SamsungUHD
Scratcher
2 posts

sprites on only one stage not all

theres no block for the green, it only for typing
jerry1000
Scratcher
100+ posts

sprites on only one stage not all

SamsungUHD wrote:

theres no block for the green, it only for typing

Take another look in the green ‘Operators’ section…
deck26
Scratcher
1000+ posts

sprites on only one stage not all

The last two posts are necroposts - this topic is 11 months old. Please start a new topic if you have a question.
nalyle01
New Scratcher
2 posts

sprites on only one stage not all

I try to make stuff go away when it's on a stage Its not suppose to be in. it just stays.I try all your ways.
deck26
Scratcher
1000+ posts

sprites on only one stage not all

nalyle01 wrote:

I try to make stuff go away when it's on a stage Its not suppose to be in. it just stays.I try all your ways.
I suggest you start your own topic and share your project and I'm sure your problem will be solved by someone.
nalyle01
New Scratcher
2 posts

sprites on only one stage not all

I try so hard.It never goes away.I get mad sometimes.I just need somebody's help!
deck26
Scratcher
1000+ posts

sprites on only one stage not all

nalyle01 wrote:

I try so hard.It never goes away.I get mad sometimes.I just need somebody's help!
And you'll get help but the correct way to ask for it is to start your own topic. Go to the top of the forum and click on New Topic. It will also help if you provide a link to a shared topic.
Maxadvantage22
Scratcher
2 posts

sprites on only one stage not all

i cant find the green operator its only for typing
deck26
Scratcher
1000+ posts

sprites on only one stage not all

Maxadvantage22 wrote:

i cant find the green operator its only for typing
Please start your own topic rather than necroposting. See if this helps first though https://wiki.scratch.mit.edu/wiki/Scratch_Wiki:Table_of_Contents/Operators_Blocks - you can click on any of the blocks for more info.

Powered by DjangoBB