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

#1 2009-12-20 07:30:54

levelgame
Scratcher
Registered: 2009-12-19
Posts: 19

Script Problem

There seems to be a problem with my level game. I was testing it and on level 5 it said type in levelsix so I did and I said in the scripts to go to the next level when this is typed like this

when green flag clicked
wait until (level = 5)
wait until key l pressed
wait until key e pressed and so on
broadcast next level (I said in the background to go to the next level when it recieved it)
stop script.

Then when I played it skipped level 6 and went on to 7. Level 7 is a don't touch the red, level 6 is a click the right button level. Any ideas why this is happening?


http://i.imgur.com/w76ty.gif

Offline

 

#2 2009-12-21 11:42:32

WeirdF
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: Script Problem

Try using the Scratch 1.4 feature, the ask block. Instead of typing each letter like that, how about just saying:

Repeat until answer = levelsix
Ask [ ] and wait

If that doesn't help, try taking away the 'stop script' block at the end.


http://i.cr3ation.co.uk/dl/s1/gif/847032b8a331def77529b6a0384db1fe_handfingers.gif

Offline

 

#3 2009-12-21 13:46:55

levelgame
Scratcher
Registered: 2009-12-19
Posts: 19

Re: Script Problem

WeirdF wrote:

Try using the Scratch 1.4 feature, the ask block. Instead of typing each letter like that, how about just saying:

Repeat until answer = levelsix
Ask [ ] and wait

If that doesn't help, try taking away the 'stop script' block at the end.

It's because the level is not supposed to ask. The text is in the background. It says type in levelsix. I'll try taking away the stop script block.


http://i.imgur.com/w76ty.gif

Offline

 

#4 2009-12-21 13:48:07

levelgame
Scratcher
Registered: 2009-12-19
Posts: 19

Re: Script Problem

It didn't work.


http://i.imgur.com/w76ty.gif

Offline

 

#5 2009-12-25 08:41:47

hidas
Scratcher
Registered: 2009-09-27
Posts: 76

Re: Script Problem

when the game is just starting, tell us how the variables are set. for example, do you set the variable level to 1 or 0 at the start? things like that.


TBOS (Toxic Blobs Of Slime) will get you someday. Better buy a slime suit. Too late. Here they come...

Offline

 

#6 2009-12-29 06:39:43

levelgame
Scratcher
Registered: 2009-12-19
Posts: 19

Re: Script Problem

hidas wrote:

when the game is just starting, tell us how the variables are set. for example, do you set the variable level to 1 or 0 at the start? things like that.

I've already fixed it. mathematics worked it out.


http://i.imgur.com/w76ty.gif

Offline

 

#7 2009-12-29 16:00:03

hidas
Scratcher
Registered: 2009-09-27
Posts: 76

Re: Script Problem

oh. then i guess that post was useless, was it not?  big_smile


TBOS (Toxic Blobs Of Slime) will get you someday. Better buy a slime suit. Too late. Here they come...

Offline

 

Board footer