Um... I thought of this new block, it would be pretty useful. There is a way to get around it, but that gets really annoying. The block is a boolean block. This is what it would look like.
Basically, the boolean becomes true once the action inside has happened for a certain amount of time.
There is a way to get around this, but it gets annoying because you have to create another variable just for it. If I were to convert it into Scratch text kinda thing where you wanted an action to happen for 30 seconds:
>whenGreenFlagClicked< [set (Var:"seconds") to (0)] ^repeatUntil <<(Var:"seconds")=(30)> and <action here>>^ [change (Var:"seconds") by (1)] [wait (1) secs] ^end loop^ [whatever you want to happen after the time is over]
But with this block it would just be:
>whenGreenFlagClicked< ^if <<action> for ( ) secs>^ [whatever you want to happen after the time is over] ^end loop^
This would be useful for recreating games such as achievement unlocked, where the achievement, "Get off your seats" means you have to press the up arrow key for 15 seconds straight. It can also be useful for other things that I can't name right now, but I'm sure the scratch community will think of something!
Credit for the text version of blocks given to illusionist for the topic, Scratch Text
Share your thoughts!
Last edited by TimeFreeze (2009-08-31 13:52:50)
Offline
um... bump?
Offline
TimeFreeze wrote:
Um... I thought of this new block, it would be pretty useful. There is a way to get around it, but that gets really annoying. The block is a boolean block. This is what it would look like.
http://img215.imageshack.us/img215/8836/forsecs.gif
Basically, the boolean becomes true once the action inside has happened for a certain amount of time.
There is a way to get around this, but it gets annoying because you have to create another variable just for it. If I were to convert it into Scratch text kinda thing where you wanted an action to happen for 30 seconds:Code:
>whenGreenFlagClicked< [set (Var:"seconds") to (0)] ^repeatUntil <<(Var:"seconds")=(30)> and <action here>>^ [change (Var:"seconds") by (1)] [wait (1) secs] ^end loop^ [whatever you want to happen after the time is over]But with this block it would just be:
Code:
>whenGreenFlagClicked< ^if <<action> for ( ) secs>^ [whatever you want to happen after the time is over] ^end loop^This would be useful for recreating games such as achievement unlocked, where the achievement, "Get off your seats" means you have to press the up arrow key for 15 seconds straight. It can also be useful for other things that I can't name right now, but I'm sure the scratch community will think of something!
Credit for the text version of blocks given to illusionist for the topic, Scratch Text
Share your thoughts!
Thanks for using my code! I didn't think it would be taken so seriously...
Offline
It's actually a really good way of communicating on the forums. I don't like using the blocks given mostly because they don't look too professional.
Offline
um... I seriously need people's thoughts on this new block. Come on people!
Offline
I think this would be a good idea! I have to set up "achievements" with variables all the time... and it's kinda annoying
Offline