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

#1 2010-01-11 10:35:41

tintenfish
Scratcher
Registered: 2010-01-11
Posts: 2

Changing the Background

Hello
I have a question: I try to crate a game. when the gaming figure touches the right edge, the background should change and the gaming figure should appear on the left edge. Also, all the objects used with the old background should disappear and new objects should appear with the new background. is that possible?
thank you very much for your help!

Offline

 

#2 2010-01-11 12:40:42

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: Changing the Background

First, open up the background in the paint editor, and add a shape of a different colour to the rest of the game (for now, let's say red) that is where you want the sprite to reach. Then, on the sprite that you can control, add this script:

http://i46.tinypic.com/2144jfs.gif

Now, you'll need a script to recieve this broadcast on the background:

http://i47.tinypic.com/2lt6p77.gif

And you said that you wanted to hide some other sprites at the same time? No problem - put this into all of the ones that you want to hide:

http://i45.tinypic.com/28rcikw.gif

And showing other sprites at the same time is just as easy - add this script to all the ones that you need to show:

http://i49.tinypic.com/28jcxmx.gif

Remember the original controlled sprite? You might want to move it off of the red after it's done its job: (I used variables to show that you should type a number there):

http://i50.tinypic.com/2mxr436.gif

Hope this helps!  big_smile  Any questions, feel free to ask.  smile

Last edited by Wolfie1996 (2010-01-11 12:42:32)


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

Board footer