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

#1 2007-05-20 15:41:13

PederMF
Scratcher
Registered: 2007-04-22
Posts: 2

Keeping track of the current background

Thank you for a wonderful tool! I and my sons (7 and 10) love it! My question is: When you develop a game you often want to let the user move the game's "main sprite" to different backgrounds, for instance by using the arrows. Then you want different sprites to appear on the different backgrounds (by using show / hide). Is the any best practice out there concerning how to trigger the hide/show of the sprites depending on what background you enter? In one game I found that they broadcast a general message called "New background" whenever they enter the next/previous stage and in addition have a variable holding the number of the background. Another option is to broadcast different messages depending on what background you enter and then make the sprites respond those each of the messages.

Åsmund, Oslo, Norway

Last edited by PederMF (2007-05-20 15:44:00)

Offline

 

#2 2007-05-24 19:07:14

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: Keeping track of the current background

Thanks for Scratching. There is no best way of doing it. I think you are on the right path by looking at other projects to learn from them. That's often what we do too. I would recommend to use the method that  is easiest for you and your kid.


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

Board footer