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
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]
Offline
Or a simple solution. Do forever next costume wait 1 if key m pressed, stop script.
Offline