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

#1 2010-04-14 19:29:39

Scoodles
Scratcher
Registered: 2010-04-14
Posts: 3

Making a start screen

I'm making a start screen,
and I had the PRESS A be a sprite

<when green flag clicked>
<repeat until><key[a]pressed?>
<next costume>
<wait(1  )secsc>
<end>
<stop script>


<when[a]key pressed>
<switch to costume[2
<play sound[waterdrop 

however when i press A, the script doesnt stop and the 'PRESS A' sprite still keeps flashing.

only after spam pressing A, it stops.

Last edited by Scoodles (2010-04-14 19:30:31)

Offline

 

#2 2010-04-14 20:04:03

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Making a start screen

That's because it'll only check if a is pressed every second. A variable might fix it:

[blocks]<when green flag clicked>
<set{ VARIABLE }to( 0
<repeat until><( <{ VARIABLE }> <=> 1 )>
<next costume>
<wait(1  )secsc>
<end>
<stop script>


<when[a]key pressed>
<set{ VARIABLE }to( 1
<switch to costume[2
<play sound[waterdrop[/blocks]


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#3 2010-04-14 20:40:29

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Making a start screen

Or a simple solution. Do forever next costume wait 1 if key m pressed, stop script.


http://i46.tinypic.com/dw7zft.png

Offline

 

Board footer