I cannot find any way of doing a ''While'' function. Someone reccomended that I do a ''Repeat Forever if [_]'' however with sounds this just repeats the sound, (say a note) rather than playing the sound continuously! I want a way of doing, eg. ''While [A] pressed, play note [31]''
<forever if><key[A]pressed?>
<end>
Offline
Does this help?
<when green flag clicked>
<forever>
<repeat until><key[ a ]pressed?>
<play note( 31 )for( Number... )secs>
<end>
<end>
Offline
I don't think that's possible.
Offline
scratchboard -
I assume that by a while loop you mean a cblock that does the code inside while the condition (boolean) is true. To accomplish this, one must note that a the repeat until block has a very similar function: it does the code inside until the condition is true. It is the exact opposite. So, using that information, we know that a while block is really just this:
[blocks]
<repeat until> <not> condition >>
Do something...
<end>
[/blocks]
Last edited by nXIII (2010-03-07 14:17:33)
Offline