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

#1 2008-12-20 12:21:05

secondsteven
Scratcher
Registered: 2008-12-19
Posts: 10

Making levels

Hi i am making a game and i want to learn abou how to make levels, if someone could tell me or give me an example that would be great thx

Offline

 

#2 2008-12-20 16:07:31

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: Making levels

This is the way I do it, but there's probably a better way.

Make a variable called "level". then, put this script in the stage:
<when green flag clicked>
<set{ level }to( 1
<broadcast[ change level

Then put these in the sprites that change:

<when I receive[ change level
<if><( <{ level }> <=> 1 )>
your actions here
<end>
<if><( <{ level }> <=> 2 )>
your actions here
<end>

Then, whenever you reach the end of the level make it change level by 1 and broadcast change level.

Last edited by hmnwilson (2008-12-20 16:09:36)


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#3 2008-12-20 16:38:59

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Re: Making levels

a better way...if there is a background for each level
http://img244.imageshack.us/img244/4651/59416530ym8.gif

Offline

 

#4 2008-12-22 20:12:54

big-bang
Scratcher
Registered: 2008-02-21
Posts: 1000+

Re: Making levels

If you aren't making a scroller, set a designated goal colour. For instance...

Player:
[blocks]<when green flag clicked>
<forever>
<if><touching color[ red
<broadcast[ level_up
<end>[/blocks]

Stage (if that's where your environment is):
[blocks]<when I receive[ level_up
<next costume>

<when green flag clicked>
<forever>
<if> <( background # <=> final level number )>
<switch to costume[ you win!
<end>[/blocks]

Oh, and you should actually use the blocks tag! It explains it right in the post and doesn't make all your text bold!

Last edited by big-bang (2008-12-22 20:13:08)


http://i47.tinypic.com/6edrbm.jpghttp://i45.tinypic.com/dw9hmw.jpghttp://i50.tinypic.com/f28tvn.jpghttp://i45.tinypic.com/ruwaop.jpg

Offline

 

#5 2008-12-22 23:52:56

ferret10
Scratcher
Registered: 2008-04-21
Posts: 58

Re: Making levels

I use
[blocks]<when green flag clicked>
<set{ level }to(1
<forever>
<if><touching color[
<change{  }by( 1[/blocks]

in the player sprite and then the background:
[blocks]<when green flag clicked>
<forever>
<switch to costume[ <{  }>[/blocks]


A must-see animation about the Scratch cat! http://scratch.mit.edu/projects/ferret10/364723 ¡uʍopǝpısdn ǝdʎʇ uɐɔ ı

Offline

 

Board footer