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

#1 2009-01-22 16:14:35

Nodear
Scratcher
Registered: 2009-01-20
Posts: 55

How To Change Backgrounds in game.

For a game im making after the sprite gets to the yellow I wanna make it change to the next background how would I do that?


http://i253.photobucket.com/albums/hh62/nodear/clubpenguinironman.jpg
It's because their birds.

Offline

 

#2 2009-01-22 16:28:58

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

Re: How To Change Backgrounds in game.

If you click on the stage there should be a tab up with scripts called either costumes, or backgrounds, make a new one, then in the looks tab, there is a next background button

Last edited by cds56 (2009-01-22 16:29:10)


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#3 2009-01-22 16:33:18

Zelda123
Scratcher
Registered: 2007-11-21
Posts: 1000+

Re: How To Change Backgrounds in game.

Under the Stage, there are some scripts under "LOOKS" such as "Next Background" and "Switch to Background [ ]"

You could add a script on the character so that when it touches the yellow, it changes the level by 1.

This is an example for a game with different backgrounds and levels:

If <Touching Color [Yellow]>
Change level by 1
Go to (StartingX), (StartingY)

And on the Stage,

Forever
Switch to Background Costume (Level)

Offline

 

#4 2009-05-16 12:24:45

Bluemachin
Scratcher
Registered: 2009-05-14
Posts: 4

Re: How To Change Backgrounds in game.

Zelda123 wrote:

Under the Stage, there are some scripts under "LOOKS" such as "Next Background" and "Switch to Background [ ]"

You could add a script on the character so that when it touches the yellow, it changes the level by 1.

This is an example for a game with different backgrounds and levels:

If <Touching Color [Yellow]>
Change level by 1
Go to (StartingX), (StartingY)

And on the Stage,

Forever
Switch to Background Costume (Level)

Thanks Zelda! I thought it was <touching color[ sensing script.  smile  :putnam:

Offline

 

#5 2009-06-07 12:59:18

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: How To Change Backgrounds in game.

I'm just thinking... What is the definition of advanced??? To me, this is one of the most basic parts of scratch. Anyway, you can do this:
<if><touching color[ yellow ]
<broadcast[ next background ]

For the moving character. For the stage:
<when I receive[ next background ]
<next costume>

The forever thing slows down the game if it's too big already. Although I doubt it would be too big if color detection is used.

Last edited by juststickman (2009-06-07 12:59:38)


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

Board footer