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:20:13

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

scratch game

How do you switch levels

Offline

 

#2 2011-06-15 22:01:30

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: scratch game

Could you be a little more specific here? Are you trying to change levels in terms of stages in a game, or the difficulty? If it's a new stage, what is the trigger to get to the next level? Assuming you're making a platformer or a similar type of game with a game at the end, the easiest way would be to make a goal at the end and make a couple little scripts like this:

Code:

On the player sprite:
When green flag clicked
Forever
     If touching color (color of goal)
         Go to x: starting_x y: starting_y
         Broadcast level change
    End If
End Forever

On the stage:
When I receive "level change"
next background

http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer