Discuss Scratch

TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

I should make a hat block at the beginning that is only called when the project first loads to help avoid any duplicate block issues. I also need to make the blocks not make duplicate reporters. That shouldn't be too hard…

my latest extension: 2d vector math
TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

You can view an image of how custom arguments work here: http://i.cubeupload.com/DYZKyM.png

Essentially, there are three argument types: string, number, and boolean. String input names are surrounded with brackets [], numbers are surrounded with parentheses (), and booleans are surrounded with less than and greater than signs <>. The underscore _ is used to escape characters, so any character right after an underscore will simply be displayed. Underscores don't do anything inside an input name, the only character that means anything other than its literal value is the ending character for the set. So sadly you can't name a number input as “nachos (with cheese!).” If an argument name isn't closed it is still generated so “count of (bananas” will make a block with an input called “bananas”.

my latest extension: 2d vector math
Jonathan50
Scratcher
1000+ posts

Custom reporters make me happy

Cool, so far!

Not yet a Knight of the Mu Calculus.
TheMasterKing107
Scratcher
36 posts

Custom reporters make me happy

This seems cool. It is a bit hard for New Scratchers to understand, buts its cool. Maybe we can use it to recreate the user id block.

Last edited by TheMasterKing107 (Sept. 10, 2015 16:53:29)


When gf clicked
set [Scratch v] to (current website::color sensing)
Look to the [future v] of (Scratch) ::color looks
if <(Scratch) does not [exist v]::color sensing
Say [Oh-no] for [however longer Scratch still has to exist]::color looks
TheMasterKing107
Scratcher
36 posts

Custom reporters make me happy

Sometimes it glitches and ruins every reporter in the project.

When gf clicked
set [Scratch v] to (current website::color sensing)
Look to the [future v] of (Scratch) ::color looks
if <(Scratch) does not [exist v]::color sensing
Say [Oh-no] for [however longer Scratch still has to exist]::color looks
TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

TheMasterKing107 wrote:

Sometimes it glitches and ruins every reporter in the project.
Really? Could you please tell me what you do when that happens? I'm not really actively working on this right now (too much school), but I definitely want to fix any glitches.

my latest extension: 2d vector math
TheMasterKing107
Scratcher
36 posts

Custom reporters make me happy

I found that if I use a return block that isn't under its define block, every reporter in the project doesn't show its value. The reporters still work, they just don't show a value when you click them.

When gf clicked
set [Scratch v] to (current website::color sensing)
Look to the [future v] of (Scratch) ::color looks
if <(Scratch) does not [exist v]::color sensing
Say [Oh-no] for [however longer Scratch still has to exist]::color looks
TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

TheMasterKing107 wrote:

I found that if I use a return block that isn't under its define block, every reporter in the project doesn't show its value. The reporters still work, they just don't show a value when you click them.
Ah. This can be fixed quickly by putting a return block right under every define block. Everything will then start working again. I don't think there's any real way to prevent this glitch from happening though because there really is no way to do this except for generated stack return blocks for every defined reporter and the reporter won't be able to report something until the script under its hat encounters a return block for that reporter.

my latest extension: 2d vector math
liam48D
Scratcher
1000+ posts

Custom reporters make me happy

oh my goodness this looks fancyyyyyy

202e-202e-202e-202e-202e UNI-CODE~~~~~
TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

liam48D wrote:

oh my goodness this looks fancyyyyyy
It's actually a big mess and the code probably blinds those who follow the true word of ECMAScript.

It does work mostly though so that's good.

my latest extension: 2d vector math
liam48D
Scratcher
1000+ posts

Custom reporters make me happy

You should make the return block a cap block, just use ‘f’ instead of ‘ ’ in the block descriptor.

202e-202e-202e-202e-202e UNI-CODE~~~~~
TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

liam48D wrote:

You should make the return block a cap block, just use ‘f’ instead of ‘ ’ in the block descriptor.
I will do that eventually… I will just have to find where the block creation thing is. I'm too lazy to do that right now though.

my latest extension: 2d vector math
liam48D
Scratcher
1000+ posts

Custom reporters make me happy

TheMonsterOfTheDeep wrote:

liam48D wrote:

You should make the return block a cap block, just use ‘f’ instead of ‘ ’ in the block descriptor.
I will do that eventually… I will just have to find where the block creation thing is. I'm too lazy to do that right now though.
E.g:

ext.myStack = function() {
    console.log("MWAHAHAHAHA");
};
ext.myCap = function() {
    console.log("THERE SHALL BE NO MORE STACK BLOCKS MWAHAHAHAHA");
};
descriptor = {
    blocks: [
        [' ', 'this is a stack', 'myStack'],
        ['f', 'this is a cap', 'myCap']
    ]
};

202e-202e-202e-202e-202e UNI-CODE~~~~~
TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

liam48D wrote:

TheMonsterOfTheDeep wrote:

liam48D wrote:

You should make the return block a cap block, just use ‘f’ instead of ‘ ’ in the block descriptor.
I will do that eventually… I will just have to find where the block creation thing is. I'm too lazy to do that right now though.
E.g:

ext.myStack = function() {
    console.log("MWAHAHAHAHA");
};
ext.myCap = function() {
    console.log("THERE SHALL BE NO MORE STACK BLOCKS MWAHAHAHAHA");
};
descriptor = {
    blocks: [
        [' ', 'this is a stack', 'myStack'],
        ['f', 'this is a cap', 'myCap']
    ]
};
Yes, I get that. I'm saying I'm too lazy to look through the code for where I create the new reporters and their associated blocks so I'm not going to do that yet.

Of course, I've probably expended more effort explaining why I don't want to enhance my code than I would expend simply doing the enhancements, but I don't really care.

my latest extension: 2d vector math
ev3coolexit987654
Scratcher
1000+ posts

Custom reporters make me happy

Is this still alive?
TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

ev3coolexit987654 wrote:

Is this still alive?
To some extent. It is actually really broken right now and I would like to fix it and clean up the scripts and implement the dialog for creating custom reporters.

I may work on it this week…

probably not :(

my latest extension: 2d vector math
U_W_N
Scratcher
15 posts

Custom reporters make me happy

TheMonsterOfTheDeep wrote:

I have finally come up with a good Scratch extension. I'm not sure if anybody else has done this yet, but I have started working on an extension which allows for the creation of custom reporters.

You can view a screenshot of my progress so far: http://i.cubeupload.com/lCByn0.png

I hope to make a dedicated button overlayed over the editor for adding reporters as well as some other things, including parameters inside the reporter itself.
Dy155
Scratcher
98 posts

Custom reporters make me happy

Give me the link. I want to try custom reporters.

when I receive [no friends v]
cry :: looks

when I receive [friends v]
smile :: looks
be in a [happy v] mood :: looks
TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

Dy155 wrote:

Give me the link. I want to try custom reporters.
http://scratchx.org/?url=http://themonsterfromthedeep.github.io/scratch-extensions/custom-reporters/script.js#scratch

It's (sort of) broken right now though. I really need to fix it.

my latest extension: 2d vector math
superben100
Scratcher
1000+ posts

Custom reporters make me happy

Can you post the source code?

Hello there!
I've been a Scratcher for nine years now, and I'm always happy to help!
I'm not around too often, but I check in here from time to time.
Let me know if you need anything!
|| Probably vibing to “Try” - Lawrence ||

Powered by DjangoBB