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

#1 2012-03-25 07:29:45

Levinja97
New Scratcher
Registered: 2012-03-24
Posts: 4

Help with backgrounds

I'm getting stuck on my project and I want to do it so that if my character touches the edge of the screen and the background changes. I've tried to use broadcasting and all my attempts have failed, what should I do?

Offline

 

#2 2012-03-25 08:27:50

Indiego
New Scratcher
Registered: 2012-02-27
Posts: 61

Re: Help with backgrounds

You could make a very thin line all the way around the edge of the screen in a color thats nowhere else in the game, and then add this to the scripts of the sprite:

when gf clicked
forever
if < touching color [whatever the color you used is] >
broadcast [next screen v]

and then add this to the stage:


when I receive [next screen v]
next background

hope that helps  smile

Offline

 

#3 2012-03-25 08:30:53

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Help with backgrounds

Using Indiego's script, the sprite will still be touching the screen after it broadcasts, so if you want it to wait until you're not touching the screen, either add a "wait until <not <touching screen" to the script or a "go to x: () y: ()" block right after the broadcast.


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#4 2012-03-25 15:28:45

Levinja97
New Scratcher
Registered: 2012-03-24
Posts: 4

Re: Help with backgrounds

Thanks for the help! I really appreciate it!  big_smile

Offline

 

Board footer