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

#1 2010-12-27 14:19:30

surge1441
New Scratcher
Registered: 2010-10-24
Posts: 8

question

how do you make a stage switch backgrounds by: sprite1 touching sprite2 to switch backgrounds. please help.

Offline

 

#2 2010-12-27 14:30:10

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: question

Use these scripts:
For Sprite1:
[blocks]<if><touching[ Sprite2
<broadcast[ switch backgrounds
<end>[/blocks]
For the stage:
[blocks]<when I receive[ switch backgrounds
switch to background [background2][/blocks]


Yawn.

Offline

 

#3 2010-12-27 14:45:00

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: question

Is this what you need?

On sprite1:

Code:

When green flag clicked
Forever if <touching sprite2>
    Broadcast change

On the stage:

Code:

When I receive change
next background

http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#4 2010-12-27 15:47:15

surge1441
New Scratcher
Registered: 2010-10-24
Posts: 8

Re: question

thanks, harakou and meowmeow55

Offline

 

Board footer