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

#1 2010-03-12 19:07:39

Aloys1320
Scratcher
Registered: 2010-03-12
Posts: 23

Changing level by score.

I'm new at scratch and making my first game, however I have come across a problem. I want to make it so that once your score is at a certain point you will progress a level, but cant seem to make the variability's work. Any possibilities?

Offline

 

#2 2010-03-12 20:24:04

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Changing level by score.

Make a script continously check if the variable equals a certain point (use a boolean block). Once the variable equals the right amount, the script should change the level.


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#3 2010-03-12 20:46:26

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Changing level by score.

Try using the Wait Until block.  You can set it so that when the variable reaches a certain value, a broadcast is sent that changes the background and repositions the sprites.

[blocks]
<when green flag clicked>
<set{ Score  }to(  0
<broadcast[ Set Level 1 ]
<wait until><( Score  <>> 100  )>
<broadcast[ Set Level 2 ]
<wait until><( Score  <>> 400  )>
<broadcast[ Set Level 3 ]
[/blocks]

I have a theory that the Wait Until block bogs the project down less than a Forever Loop with IF block tests.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2010-03-12 20:58:54

Aloys1320
Scratcher
Registered: 2010-03-12
Posts: 23

Re: Changing level by score.

Thanks a lot that really helped.

Offline

 

#5 2010-03-13 08:11:20

Cmodude
Scratcher
Registered: 2010-01-29
Posts: 100+

Re: Changing level by score.

Well, I guess you would do this: make a variable called for example, points or experience, and the one called "level", and say,
<when green flag clicked>
<forever if> <( <{ experience or points  }> <=> certain number )>
<set{ level }to( certain number }>
<end>

at least I guess it would be that way tell me if it has a glitch that way

Last edited by Cmodude (2010-03-13 08:17:01)


http://dc.makegames.de/294175.gifhttp://dc.makegames.de/294176.gifhttp://dc.makegames.de/294177.gif
Working on: Pokemon: Wrath of Arceus My projects

Offline

 

#6 2010-03-13 08:19:14

Cmodude
Scratcher
Registered: 2010-01-29
Posts: 100+

Re: Changing level by score.

But Paddle2See's is better than mine


http://dc.makegames.de/294175.gifhttp://dc.makegames.de/294176.gifhttp://dc.makegames.de/294177.gif
Working on: Pokemon: Wrath of Arceus My projects

Offline

 

Board footer