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

#1 2012-01-21 13:43:35

maloneydb
New Scratcher
Registered: 2011-12-10
Posts: 2

Sprites and backgrounds

Hi,

I am working on a program that will have one sprite on a back ground and then switching to another background with a different sprite. I have had no luck in trying to execute these commands. Any advice would be greatly appreciated.

Thanks,

Dan M

Offline

 

#2 2012-01-21 14:53:57

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Sprites and backgrounds

Use broadcasts. Have Sprite1 broadcast "background1", and have the background say "when I receive background1". Then, just use a "switch to background" block to change the background in the when I receive block. Repeat this process for all of the backgrounds and sprites.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#3 2012-01-21 16:50:57

Purika
Scratcher
Registered: 2011-01-26
Posts: 100+

Re: Sprites and backgrounds

bobbybee wrote:

Use broadcasts. Have Sprite1 broadcast "background1", and have the background say "when I receive background1". Then, just use a "switch to background" block to change the background in the when I receive block. Repeat this process for all of the backgrounds and sprites.

Yeah, you can use the broadcast blocks to communicate between sprites.
EDIT: Or variables, but that´s more complicated.

Last edited by Purika (2012-01-21 16:51:49)


https://lh3.googleusercontent.com/-ZlPXbnYAtro/TxRNNopA6XI/AAAAAAAAAvY/worvlbyfCYI/s589/Purika.gif
If I was three birds, I could see myself fly below us!  big_smile

Offline

 

#4 2012-01-28 12:20:35

maloneydb
New Scratcher
Registered: 2011-12-10
Posts: 2

Re: Sprites and backgrounds

Awesome!!!

Thanks,

Dan

Offline

 

Board footer