I have two basic similar situations with a common problem.
One involves an introductory title screen animation. Instead of always waiting for it to finish, I want the option to press a key to skip to the menu screen. What I've tried so far, either it doesn't respond at all, or it will go the menu but continue with the intro script.
Second is simply stopping a walking animation when the move left/right keys are released. Right now it will finish the cycle before going idle.
Thanks in advance.
Offline
What is the script?
Just a reminder I won't be on Scratch that much but I 'll still be here, so if i'm on something, I will be commenting back, okay!
, PICO Team!!!!!!!!!!! SCRATCH DEADW!!! PICO HACK ACCOUTNTT@@Offline
With the first one, I probably need the script, but I think you might be doing something like:
[scratchblocks]
when gf clicked
repeat until <trigger key pressed>
Offline
With the first one, I probably need the script, but I think you might be doing something like:
when gf clicked
repeat until <[trigger key v] pressed>
animation script here
end
What you would need would be:
when gf clicked
repeat until <[trigger key v] pressed>
if <not <(end_animation) = [1]>>
animation script part one here
repeat the above script until the animation restarts
else
stop script
end
You would also need, on any sprite:
when gf clicked
if <[trigger key v] pressed>
set <end_animation> to 1
end
Last edited by Programmer_112 (2012-12-28 17:46:40)
Offline
With the second, you probably need to split it into parts, and put in:
when gf clicked
forever
if <<key [right arrow v] pressed> or <key [left arrow v] pressed>>
repeat until <<i = [number of steps in sequence]> or <not<<key [right arrow v] pressed> or <key [left arrow v] pressed>>>>
change [i v] by one
do i part of sequence
end
end
end
Last edited by Programmer_112 (2012-12-28 17:45:36)
Offline