Detecting button press during scroll
Posted: Fri Sep 04, 2015 2:01 pm
I'd like to create a program which scrolls some text (easy) and then, while the text is scrolling, if it detects a button press (harder), abandon the scrolling text and perform some other subroutine (I have in mind a very simple Tetris-like game where you line up falling dots to make solid lines).
Is there a way to detect button presses and farm out to a subroutine during text scrolling?
My workaround is to scroll the text 1 character at a time, and try to detect presses between characters, but this is ungainly, especially as there appears to be no string handling so I'd need as many blocks as I have characters (I don't think I can store the string and iteratre through it).
One way might be having multiple Start blocks. Scratch supports this, for example. Is that possible in Codebug?
Is there a way to detect button presses and farm out to a subroutine during text scrolling?
My workaround is to scroll the text 1 character at a time, and try to detect presses between characters, but this is ungainly, especially as there appears to be no string handling so I'd need as many blocks as I have characters (I don't think I can store the string and iteratre through it).
One way might be having multiple Start blocks. Scratch supports this, for example. Is that possible in Codebug?