One day I was in the shower, singing the entire "Poodle Hat" album by Weird Al. It was a very long shower.
After I got out of the shower I decided to watch Monty Python and the Holy Grail. And just as the old man with only one eye said, "What...is your favorite color?", it came to me.
My brother did. He got back from the mailbox.
After throwing away some coupons, I got an idea...
What if you could NAME YOUR SCRIPTS?
--
My idea is that there is a hat block that says "start script [ ]". You type in the script name between the brackets, for example, "start script [test_script]".
Now how will this work with other hat blocks, such as "when /'~' clicked"? Well... they won't be hat blocks. They'll be C blocks, like an "if" block.
For example, you could have a script like this:
- start script [this is a script]
- when /'~' clicked
- (do this...)
This would also allow you to receive broadcasts WITHIN a script:
- start script [this is also a script]
- when /'~' clicked
- say [Hello!] for (2) secs
- when I receive [broadcast]
- say [Hello!] for (1) secs
Of course, if you didn't put these blocks within a "forever" block, it wouldn't run forever. So let's do just that:
- start script [this is also a script]
- forever
- when /'~' clicked
- say [Hello!] for (2) secs
- when I receive [broadcast]
- say [Hello!] for (1) secs
And so on and so forth.
Well, then, an obvious question comes up. How will the user make this script run?
Of course, there would have to be a block for this, too. "run script []", with a dropdown menu of available scripts within the current sprite.
And, instead of the "stop script" block, there should be "stop script []", with, again, a dropdown menu.
Finally, you know when you right-click the scripting area and a context menu pops up with three options, "clean up", "save picture of scripts", and "add comment"? There should be a fourth option that's similar to the Find option in many programs. The context menu would like this:
clean up
save picture of scripts
add comment
go to script >
The ">" is an arrow that will indicate that another menu will open after hovering over the option. This second menu will contain a list of all the scripts in the current sprite, similar to the dropdown menu in many Scratch blocks. When you choose a script from the menu, Scratch will scroll to the position of the beginning of the script. It would help if it could highlight it, too. This option would be very useful if you have a lot of scripts or scripts that are long.
--
I don't know if any of this has been suggested yet, but I just got the idea and thought it would be worth posting. Oh, and sorry for no pictures/mockups. I'm too lazy right now. Maybe later.
It took about an hour to type this up since I was thinking this through as I was typing and fixed some holes in my logic . Feedback/support would be highly appreciated! Thanks.
Offline
It's already going to be implemented in 2.0, you can create blocks, and then use them as normal blocks that represent their defined function. Your version does have more functionality, but it's mostly unneeded
Last edited by zammer990 (2012-08-10 22:25:44)
Offline
Seil wrote:
Well...
Um...
I guess this topic deserves to be closed...
But how?
You just report the topic with the button at the bottom, with the reason for closure ("i'm the owner this topic is useless" etc) and a moderator will close it
Offline
zammer990 wrote:
Seil wrote:
Well...
Um...
I guess this topic deserves to be closed...
But how?You just report the topic with the button at the bottom, with the reason for closure ("i'm the owner this topic is useless" etc) and a moderator will close it
Yeah!
Offline