Discuss Scratch

FancyFoxy
Scratcher
500+ posts

Put reporters + booleans in dropdowns...

I sometimes make custom blocks where one of the inputs is the variable name and the block does whatever to that variable, but I have to do this:
define add (add) to (var)
if <(var) = [money]> then
change [money v] by (add)
else
if <(var) = [gems]> then
change [gems v] by (add)
else
...
end
end
Just an example. It'd be much easier to do this:
define add (add) to (var)
change (var) by (add)

Last edited by FancyFoxy (July 25, 2017 01:01:01)

Sheep_maker
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

Duplicate I believe
Charles12310
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

Sheep_maker wrote:

Duplicate I believe
Yes, but this is not just about reporters, but rather reporters AND BOOLEANS, so I think we should keep this thread.
Charles12310
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

Yes. I Support. One example would be:

when green flag clicked
ask [What key do you want to press?] and wait
wait until <key (answer) pressed?>
...
Sheep_maker
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

Charles12310 wrote:

Sheep_maker wrote:

Duplicate I believe
Yes, but this is not just about reporters, but rather reporters AND BOOLEANS, so I think we should keep this thread.
Booleans are reporters that only report true or false, and dropdowns that accept reporters also accept booleans, so specifying booleans doesn't really make difference. I doubt when implementing the suggestion that the ST would let reporters in all dropdowns but booleans in some; even so there's this workaround:
(join<...>[])

Last edited by Sheep_maker (July 25, 2017 00:56:06)

Charles12310
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

Sheep_maker wrote:

Charles12310 wrote:

Sheep_maker wrote:

Duplicate I believe
Yes, but this is not just about reporters, but rather reporters AND BOOLEANS, so I think we should keep this thread.
Booleans are reporters than only report true or false, and dropdowns that accept reporters also accept booleans, so specifying booleans doesn't really make difference. I doubt when implementing the suggestion that the ST would let reporters in all dropdowns but booleans in some; even so there's this workaround:
(join<...>[])
Actually, reporters are different than Booleans. Booleans state if a condition is true or false. A reporter states a piece of information about something else, including things you can input in it.
Charles12310
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

FancyFoxy wrote:

I sometimes make custom blocks where one of the inputs is the variable name and the block does whatever to that variable, but I have to do this:
define add (add) to (var)
if <(var) = [money]> then
change [money v] by (add)
else
if <(var) = [gems]> then
change [gems v] by (add)
else
...
end
end
Just an example. It'd be much easier to do this:
define add (add) to (var)
change (var) by (add)
Yeah, I don't like it when I have to do all of that at the top. I mean, what if I have over 100 variables?
dancebouy
Scratcher
23 posts

Put reporters + booleans in dropdowns...

I was going to suggest this.
cul8er
Scratcher
500+ posts

Put reporters + booleans in dropdowns...

Charles12310 wrote:

Sheep_maker wrote:

Booleans are reporters than only report true or false, and dropdowns that accept reporters also accept booleans, so specifying booleans doesn't really make difference. I doubt when implementing the suggestion that the ST would let reporters in all dropdowns but booleans in some; even so there's this workaround:
(join<...>[])
Actually, reporters are different than Booleans. Booleans state if a condition is true or false. A reporter states a piece of information about something else, including things you can input in it.

SO…

All booleans are reporters

BUT!

Not all reporters are booleans.
Charles12310
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

cul8er wrote:

Charles12310 wrote:

Sheep_maker wrote:

Booleans are reporters than only report true or false, and dropdowns that accept reporters also accept booleans, so specifying booleans doesn't really make difference. I doubt when implementing the suggestion that the ST would let reporters in all dropdowns but booleans in some; even so there's this workaround:
(join<...>[])
Actually, reporters are different than Booleans. Booleans state if a condition is true or false. A reporter states a piece of information about something else, including things you can input in it.

SO…

All booleans are reporters

BUT!

Not all reporters are booleans.
It doesn't mean this topic is a duplicate.

As I said, the other mentions reporters. This mentions reporters AND BOOLEANS. Booleans is not an excuse for reporters. They have an almost completely different function than reporters.
Sheep_maker
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

Charles12310 wrote:

As I said, the other mentions reporters. This mentions reporters AND BOOLEANS. Booleans is not an excuse for reporters. They have an almost completely different function than reporters.
One can assume the other topic would also allow booleans in dropdowns since current dropdowns already accept both reporters and booleans
Charles12310
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

Well, this still doesn't convince me that this is a duplicate.

Anyways, back to subject.

I just found out something. You can put reporters and Booleans in ANY dropdown inputs using this: http://liam4.github.io/scrap-mod/scrap.html

The editor is almost the same as the official editor. The differences are you can put a color input on a custom block including a dropdown input for numbers and text.

Then just save it, put it in a file, and then upload it here.

However, you can't change the custom blocks after that for interfere with features on the other editor that the official editor doesn't have, or you will have to do the procedure all over again.
Charles12310
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

FancyFoxy wrote:

I sometimes make custom blocks where one of the inputs is the variable name and the block does whatever to that variable, but I have to do this:
define add (add) to (var)
if <(var) = [money]> then
change [money v] by (add)
else
if <(var) = [gems]> then
change [gems v] by (add)
else
...
end
end
Just an example. It'd be much easier to do this:
define add (add) to (var)
change (var) by (add)
And this is another reason why I want reporters/Booleans to be placed in dropdown inputs.
MineLox92Videos
Scratcher
100+ posts

Put reporters + booleans in dropdowns...

Support. It will sweep away the need to use hacked blocks. And not everyone knows to do it.

Last edited by MineLox92Videos (July 25, 2017 23:30:26)

Charles12310
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

Charles12310 wrote:

Well, this still doesn't convince me that this is a duplicate.

Anyways, back to subject.

I just found out something. You can put reporters and Booleans in ANY dropdown inputs using this: http://liam4.github.io/scrap-mod/scrap.html

The editor is almost the same as the official editor. The differences are you can put a color input on a custom block including a dropdown input for numbers and text.

Then just save it, put it in a file, and then upload it here.

However, you can't change the custom blocks after that for interfere with features on the other editor that the official editor doesn't have, or you will have to do the procedure all over again.
Though I don't really recommend this, because:
Terms Of Use:
4.4 You may only submit user-generated projects that were created with (1) the Scratch website editor or (2) an unmodified copy of the Scratch editor compiled from the source code described in Section 5.3. You may not upload any projects that were created, by you or by anyone else, with a modified version of the Scratch editor.
Botcho_Otkho
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

Got it what you mean,support,it's very annoying to do it by hacking scratch.
Botcho_Otkho
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

Charles12310 wrote:

Charles12310 wrote:

Well, this still doesn't convince me that this is a duplicate.

Anyways, back to subject.

I just found out something. You can put reporters and Booleans in ANY dropdown inputs using this: http://liam4.github.io/scrap-mod/scrap.html

The editor is almost the same as the official editor. The differences are you can put a color input on a custom block including a dropdown input for numbers and text.

Then just save it, put it in a file, and then upload it here.

However, you can't change the custom blocks after that for interfere with features on the other editor that the official editor doesn't have, or you will have to do the procedure all over again.
Though I don't really recommend this, because:
Terms Of Use:
4.4 You may only submit user-generated projects that were created with (1) the Scratch website editor or (2) an unmodified copy of the Scratch editor compiled from the source code described in Section 5.3. You may not upload any projects that were created, by you or by anyone else, with a modified version of the Scratch editor.
If this suggestion will be considerated and then added on scratch,it will not be anymore banned. Also,this is not considerate “modified scratch editor”,because you're not doing something like… maybe… editing a pre-made scratch block. You're only adding a reporter.
BotanAI
Scratcher
100+ posts

Put reporters + booleans in dropdowns...

+1. Would be extremely useful for allowing players to pick a control scheme- wasd, arrow keys, custom- basically, they choose what buttons they want to use for everything.
Charles12310
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

bump

<<[bump v] received? :: events> = <true :: operators >>
Botcho_Otkho
Scratcher
1000+ posts

Put reporters + booleans in dropdowns...

Support,it would help a lot with keys that are not in the keys list,such as SHIFT,CTRL,TAB etc.

Powered by DjangoBB