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

#1 2011-06-15 18:37:55

Amy344
New Scratcher
Registered: 2011-05-30
Posts: 3

When you are making a game and finish level 1 how do you switchlevel1

When you are making a game and complete level one how do you switch to level two without having the same script as level one

Offline

 

#2 2011-06-15 18:43:49

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: When you are making a game and finish level 1 how do you switchlevel1

Having a variable named "Level" would be the best option.  Whenever the player completes a level, it can change "Level" by 1 and broadcast "New Level".

Whenever the player receives New Level, he can go to wherever he should, like so:
http://i53.tinypic.com/2wmm9uc.gif

A similar script can be applied to the stage, to change to the appropriate level background, like so:
http://i56.tinypic.com/210y36a.gif
Other miscellaneous objects can also be activated or deactivated depending on the value of "Level."

Last edited by Kileymeister (2011-06-15 18:45:01)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#3 2011-06-16 20:46:52

Amy344
New Scratcher
Registered: 2011-05-30
Posts: 3

Re: When you are making a game and finish level 1 how do you switchlevel1

For the go to x blocks what do you type in them thanks  smile

Offline

 

#4 2011-06-17 15:27:23

Vurb
Scratcher
Registered: 2010-05-09
Posts: 100+

Re: When you are making a game and finish level 1 how do you switchlevel1

Amy344 wrote:

For the go to x blocks what do you type in them thanks  smile

I am not the one that posted that, however, I think that those blocks just define the location that your sprite spawns in the new level (to prevent it from appearing in unwanted places). I suppose it's somewhat unclear when the values are defined as zero.

Offline

 

Board footer