Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Changing Backgrounds and Levels
- RJess14
-
1 post
Changing Backgrounds and Levels
I'm trying to figure out how to change the background for different levels in a simple game. I want for the background to change when my sprite touches a certain color. Can anybody help me out?!?
- mwiedmann
-
100+ posts
Changing Backgrounds and Levels
Under the “Looks” group there is the “switch backdrop to ___ ” block.
On the Stage, there is also the “next backdrop” block that can be used to cycle through the backdrops.
So you should be able to do something like:
If touching color _ then
swtich backdrop
wait 1
You may want the “wait” or some other delay so the backdrops doesn't keep switching.
On the Stage, there is also the “next backdrop” block that can be used to cycle through the backdrops.
So you should be able to do something like:
If touching color _ then
swtich backdrop
wait 1
You may want the “wait” or some other delay so the backdrops doesn't keep switching.
- turkey3
-
1000+ posts
Changing Backgrounds and Levels
^^that or this:
when flag clicked
forever
wait until <touching color _?>
next backdrop
wait until <not <touching color _?>>
when flag clicked
forever
wait until <touching color _?>
next backdrop
wait until <not <touching color _?>>
- MasterCard786
-
100+ posts
Changing Backgrounds and Levels
Something like this is good for levels of a maze or something like that!
- taza156
-
1 post
Changing Backgrounds and Levels
non of this worked help plase i want to get a L6 in it
- Birdlegs
-
1000+ posts
Changing Backgrounds and Levels
The best thing to do is to make a variable for levels. This way, you have lots of control over each level. An item that only appears in one level could show if your level variable is equal to a certain level and hide if it's anything else.
- Airbender101
-
2 posts
Changing Backgrounds and Levels
when a script is over, how do you change that background to another? trying to make a background for another background. Somebody please help.
- Airbender101
-
2 posts
Changing Backgrounds and Levels
My project is on https://scratch.mit.edu/projects/61000368/
- deer33816
-
3 posts
Changing Backgrounds and Levels
Well, you could try using the broadcast buttons, like you put the broadcast on a sprite, and then say that the message is called: message1. So you drag a brown broadcast block onto the background script, and you'll have something that sounds like this: When I receive message1. Then you drag a purple “change background” block, and put it under the message1. Now it'll sound like this: When I receive message1, change the background to _____.
- -Scratcher-
-
100+ posts
Changing Backgrounds and Levels
Agree! The easiest way is to use a variable for the levels. The best thing to do is to make a variable for levels. This way, you have lots of control over each level. An item that only appears in one level could show if your level variable is equal to a certain level and hide if it's anything else.
For the stage:
Additionally, I'm always broadcasting a message when a new Level starts, for each object for example:
So, now you can control everything with one sprite, which is your player.
Last edited by -Scratcher- (May 29, 2015 11:02:24)
- rara23
-
4 posts
Changing Backgrounds and Levels
you can do this script
Last edited by rara23 (July 4, 2015 23:02:30)
- imalijah
-
10 posts
Changing Backgrounds and Levels
How do i make a sprite appear, on a certain level
- hair444y
-
46 posts
Changing Backgrounds and Levels
How do i make a sprite appear, on a certain level
- jt83065
-
19 posts
Changing Backgrounds and Levels
YER YOU do you just cant find it because your a new sratcher you will lern how to one day find the block it is in the sensing or the blue hot bar I don't have touching color
- Discussion Forums
- » Help with Scripts
-
» Changing Backgrounds and Levels