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

#1 2012-06-26 15:40:39

mattc12
New Scratcher
Registered: 2012-06-26
Posts: 4

help with multiple different backgrounds

I am doing a brick breaker game and need to make different bricks appear for different levels and then hide again after the level is complet.
I am using the show and hide on looks but this doesn't seem to work for more than a couple of levels.
Can somebody please help.

Offline

 

#2 2012-06-26 15:49:44

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: help with multiple different backgrounds

Here's an example of what you're looking for:
http://img834.imageshack.us/img834/3233/levelchange.gif

Last edited by fg123 (2012-06-26 15:49:58)


Hai.

Offline

 

#3 2012-06-27 00:30:41

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: help with multiple different backgrounds

its better to make them run on broadcasts like this.

when I receive [getLevel v]
if <(level) = [1]>
show
else
hide
end
stop script
Since most brick breaker games have more then 30 brick sprites, all those forever's will use up memory/lag the project.

Last edited by Wes64 (2012-06-27 00:30:51)


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#4 2012-06-27 01:36:34

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: help with multiple different backgrounds

That's why I prefer to use stamping and virtual sprites to do brick breaking games.  tongue

Your script doesn't need the [stop script].

Just sayin.  tongue


Hai.

Offline

 

#5 2012-06-27 01:50:41

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: help with multiple different backgrounds

fg123 wrote:

Your script doesn't need the [stop script].

Just sayin.  tongue

Don't hate on the programming habits, bro  wink


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#6 2012-06-27 02:00:09

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: help with multiple different backgrounds

Wes64 wrote:

fg123 wrote:

Your script doesn't need the [stop script].

Just sayin.  tongue

Don't hate on the programming habits, bro  wink

I'm used to using Forever loops. LOL XD

lol


Hai.

Offline

 

#7 2012-06-27 11:09:34

mattc12
New Scratcher
Registered: 2012-06-26
Posts: 4

Re: help with multiple different backgrounds

thanks this was alot of help

Offline

 

#8 2012-06-27 11:16:11

mattc12
New Scratcher
Registered: 2012-06-26
Posts: 4

Re: help with multiple different backgrounds

where can i find the 'level' bit in the
level=1

Offline

 

#9 2012-06-27 11:17:19

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: help with multiple different backgrounds

mattc12 wrote:

where can i find the 'level' bit in the
level=1

Variables. Click "create new" and type in "level".


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&amp;display=small

Offline

 

#10 2012-06-27 11:21:27

mattc12
New Scratcher
Registered: 2012-06-26
Posts: 4

Re: help with multiple different backgrounds

thanks

Offline

 

Board footer