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

#1 2010-05-25 12:37:33

HotHead25
Scratcher
Registered: 2010-05-25
Posts: 14

How to link levels

Made one level, how do I link it to another?

I want to make it so that my character goes to the next level when it hits a tile.

Any suggestions?

Thanks

Offline

 

#2 2010-05-25 12:43:42

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: How to link levels

OK, on the character sprite, add this script:

<when green flag clicked>
<forever>
<if><touching[ TILE
<broadcast[ NEXT LEVEL
<wait until><<  <not> <touching[ TILE >>
<end>
<end>

Then add this to the character:

<when I receive[ NEXT LEVEL
<go to x sad  Wherever you want levels to start )y sad  Wherever you want levels to start

And on the background:

<when I receive[ NEXT LEVEL
<next costume> (this will say "background" not "costume"  wink  )

Hope this helps - any questions, feel free to ask  smile


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

#3 2010-05-25 13:00:38

HotHead25
Scratcher
Registered: 2010-05-25
Posts: 14

Re: How to link levels

How do i choose where the next level is going to be?

Offline

 

#4 2010-05-25 13:19:42

HotHead25
Scratcher
Registered: 2010-05-25
Posts: 14

Re: How to link levels

Also when he hits the exit he just flashes. not moves.

Offline

 

#5 2010-05-25 13:28:39

JTxt
Scratcher
Registered: 2010-05-19
Posts: 100+

Re: How to link levels

HotHead25 wrote:

How do i choose where the next level is going to be?

Sorry, I'm not sure I understand you.

There are many ways to change levels in scratch.  How you would want to do this depends on how you built your game and your experience with scratch. 

One way, similar to what Wolfie1996 said:
you can [broadcast "Next Level"] when you reach a goal.  then you can have [when I receive "Next Level"] scripts.  to do things in different sprites. and on the background to change the background.

If you upload your project I'll try to help.


http://scratch.mit.edu/static/icons/buddy/524717_med.png?t=2010-06-15+09%3A48%3A36

Offline

 

#6 2010-05-25 15:38:40

HotHead25
Scratcher
Registered: 2010-05-25
Posts: 14

Re: How to link levels

Cool i will load it up under "Stealth"

Please bear in mind this is my first attempt and i am only experimenting.

Thanks

Offline

 

#7 2010-05-25 15:46:33

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: How to link levels

I just checked out the code behind your project - you might want to put the "if touching sprite 5" in a seperate loop - Scratch can only sense one thing at a time in each script, so if keys are pressed in that script, it won't tell if it's touching sprite 5. Hope this helps  smile


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

#8 2010-05-25 15:57:23

HotHead25
Scratcher
Registered: 2010-05-25
Posts: 14

Re: How to link levels

Sorry changed level name to "Stealth Agent."

Good idea but i still need to link it to another level.

Help please.

Offline

 

Board footer