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

#1 2009-07-16 11:43:37

Pokeball
Scratcher
Registered: 2009-05-20
Posts: 8

Changing Backgrounds

Hi,
I'm trying to do what I think is a fairly simple task in a game I am working on...but...I can't seem to get it right!

What I want to do: Change scenes (background) in the game -- basically leave one room and go to another when the main sprite goes to a certain point on the screen.

I have tried to create a small sprite and then use "If Sprite1 touching Sprite2, change background" logic...but the problem is when I play the game, it doesn't seem to recognize that the two sprites are touching?

I would LOVE to view examples of games where the character goes to different rooms.

Please share if you know of some and/or know why, even though I have one sprite positioned over the other my "if/then" command is not "triggering".

THANKS!

Offline

 

#2 2009-07-17 18:22:59

Zapdos2000
Scratcher
Registered: 2009-06-02
Posts: 13

Re: Changing Backgrounds

Say something like this for the sprite:
   <when green flag clicked><forever><if><color (a color on the sprite) touching color[ brown(the first door. Say the second is pink)<set{backgrounds}to(1) and so on
  For the background, say this:
   <when green flag clicked><forever><if><(<{Backgrounds}><=>1<switch to costume[1)>and so on.
I hope this helps you.  smile


http://img300.imageshack.us/img300/3310/mybanner4b26abb0bb6af.png
   Zapdos2000... FEEL THE POWER!!!
  cool

Offline

 

#3 2009-07-17 19:03:38

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: Changing Backgrounds

Yes, I think that is a glitch, one of my games doesn't work because of it.  sad

Anyway, welcome to Scratch!

Last edited by The-Whiz (2009-07-17 19:04:01)

Offline

 

#4 2009-07-28 15:49:50

robhsmit
Scratcher
Registered: 2009-07-11
Posts: 3

Re: Changing Backgrounds

I just creating a simple level changing project for my Video Game Design students - http://scratch.mit.edu/projects/robhsmit/625437

I hope this helps.

Rob

Offline

 

Board footer