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

#1 2007-10-29 14:17:19

donkeyscommand
Scratcher
Registered: 2007-06-03
Posts: 10

Press and... Go?

I have written this script for a dance machine:

When Space key pressed,
If space key pressed,
Repeat 3,
Wait pick random 0.5 to 1,
Repeat until key a pressed,
Change y by 2.5,

But when I try it it is outline for a second and and then stops. Can anyone tell me why and how I can fix it?

Offline

 

#2 2007-10-29 17:22:02

Mick
Scratcher
Registered: 2007-03-23
Posts: 100+

Re: Press and... Go?

I can tell you how to fix it, but I can't tell you why. Try this:
[blocks]
<when green flag clicked>
<forever>
<wait until> <key[ space ]pressed?>
<wait( <pick random( 0.5 )to( 1   secs>
<repeat until> <key[ a ]pressed?>
<change y by( 2.5
<end>
<end>
[/blocks]
It should work now.  smile

Last edited by Mick (2007-10-29 17:27:58)


Go to www.legoless.com
It's my blog.  big_smile

Offline

 

#3 2007-11-10 15:59:20

donkeyscommand
Scratcher
Registered: 2007-06-03
Posts: 10

Re: Press and... Go?

Great! New one.
I have sprites that do this.

When Green Flag Pressed:
Wait 43 Secs
Repeat 8
Wait Pick random 0.1 to 0.25 secs
Repeat until key a pressed
change y by 2.5
Go to X -204 Y-131

Offline

 

Board footer