"Create own block" dropdown list

id: 18928

category: Suggestions

posts: 333

han614698 han614698 loading
Mockups.

Support, this would help with variating custom blocks more
medians medians loading
when [front v] key pressed
nam049499 nam049499 loading
define eat murak
Support. Scratch hasn't changed much in the custom blocks category, and I'm ready to try out something new.
support, could make scratch easier to use. maybe good for big projects that need custom blocks
This is a way to send this topic ballooning up to the top of the first page, but it has a name. It's a useful name. It's the most epic name. It's called the BUMP.
Icefan13 Icefan13 loading
Everyone do the Bring Up My Post (and don't do it like a ghost)

idk, I needed a rhyme
qwerty116 qwerty116 loading
SUPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTTTTTT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Example:

when green flag clicked
skill issue [1 of 4 v]

define skill issue (text from dropdown)
if <(skill issue) = 1>
repeat (2000)
turn cw (1) degrees
end
end

qwerty116 wrote:

SUPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTTTTTT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Example:

when green flag clicked
skill issue [1 of 4 v]

define skill issue (text from dropdown)
if <(skill issue) = 1>
repeat (2000)
turn cw (1) degrees
end
end

Please be constructive when you share your feedback about a suggestion instead of just sending “support” or “no support”. The reason this is a discussion topic and not a poll is because the Scratch Team wants to see what the community thinks about suggestions and add them to the platform if they see valid and constructive reasons from the community.

But don’t worry, everybody makes mistakes every once in a while - feel free to share your thoughts about this suggestion in a new post.



Support. I definitely believe that this will be useful, as you can already add numbers, text, and boolean values into custom blocks, which are all things you can enter in other Scratch blocks as well. The only other thing apart from those three with you can “customize” in a block is the dropdown feature, and that is also, ironically, the only one missing from custom blocks. Since the whole purpose of custom blocks are so you can invent your own block taking inspiration from the others and to shorten code, I think this would be a really useful feature.

I feel like the example that was given in the OP is already wonderful, as it perfectly shows for which purpose this can be used, which is mainly for platformers or other games involving movement (I don't see a lot of ways this feature could be used in animations and other game types, such as simulators, but anything is possible, I suppose).

Me_Tis wrote:

My suggestion is simple: that when you create your own block, along with boolean, string and number input, you were allowed to do a dropdown list like this:
define move [direcion]▾
if <(direction)=[up]>
point in direction (0 v)
move (10) steps
end
if <(direction)=[right]>
point in direction (180 v)
move (10) steps
end
if <(direction)=[up]>
point in direction (90 v)
move (10) steps
end
if <(direction)=[left]>
point in direction (-90 v)
move (10) steps
end

end
when green flag clicked
move [down v]

You would create it like this:
https://www.dropbox.com/s/4t3sqpemud3e0y1/Dropdown%20list.png?dl=0

I would find this very useful (though admittedly my example wasn't very useful)
Any suggestions, improvements or just support?

PS this can be likened to enums in other programming languages.

UPDATE:
I know that this is possible through workarounds, but the entire premise behind scratch is to make programming easy, so a workaround isn't really a solution.
I am suggesting this because I think it will make some things easier, whereas using the workaround makes things harder, and may be intimidating to new programmers.
Yeah. I added new options in quote.
Conduit7 Conduit7 loading
support, this would be a super helpful optimization for custom blocks
Oofahman Oofahman loading
Lot's of support! But what if we could add dropdowns to dropdowns? Kinda similar to the elif block
[stuff v] [Option1 v]
Support/bump! This would be a very useful feature because then you wouldn't have to use inputs for dropdowns. If you use inputs, you might type it in wrong and mess up your code. Using dropdowns, custom blocks would become even more useful! One thing I am wondering about though is if there will be two dropdown features added for custom blocks, as there are two types of dropdowns, one where you can put in an input alternatively, and one that is only a dropdown:

([stuff v]) // Dropdown only

((stuff v)) // Input or Dropdown

I'm also kind of wondering how you would enter the dropdown inputs. I guess the ST would have to create some sort of dropdown editor. I saw on the main post a link to an image of how you would add it, but the image is unavailable for me so I have no idea.

It would also be interesting if we could have special dropdowns for things like costumes or variables, but we'll see what happens.

Overall I think this would be a great feature to add to Scratch.
Pikachuf1 Pikachuf1 loading
support, I can see how this could be very useful
Seon8 Seon8 loading
I like it! It’s not totally necessary and there are definitely workarounds but I think it’s worth it to change anyway. It would help when sharing custom blocks for others to use so they know the right inputs.
Cordongreen Cordongreen loading
say [Wow, this topic was alive since the year I was born]

qwerty116Open in Ocular wrote:

SUPORT!
Example:

when green flag clicked
skill issue [1 of 4 v]

define skill issue (text from dropdown)
if <(skill issue) = 1>
repeat (2000)
turn cw (1) degrees
end
end
when [key v] pressed on gamepad ::extension hat
say (button pressed on keypad ::extension)
bsteichman bsteichman loading
Support! I’ve wanted this to be here so many times
yes i am sure this would be useful cause it works better then having to make
a variable and all that. so yeah! support.
define confirm
if <cool> then
say [support]
end
This needs to be bumped.
BUMP

InfinityLoopGaming wrote:

This needs to be bumped.
BUMP
whoah stop with the trash talk will you?
when trash talk starts
stop [voice (trash talk) v]

super_Calvin wrote:

InfinityLoopGaming wrote:

This needs to be bumped.
BUMP
whoah stop with the trash talk will you?
when trash talk starts
stop [voice (trash talk) v]
He isn't trash-talking is he simply just bumping the post and bringing it up to the front page

super_Calvin wrote:

InfinityLoopGaming wrote:

This needs to be bumped.
BUMP
whoah stop with the trash talk will you?
when trash talk starts
stop [voice (trash talk) v]
how am i trash talking

randomguy3513 wrote:

super_Calvin wrote:

InfinityLoopGaming wrote:

This needs to be bumped.
BUMP
whoah stop with the trash talk will you?
when trash talk starts
stop [voice (trash talk) v]
He isn't trash-talking is he simply just bumping the post and bringing it up to the front page
2 things, i read it wrong and you reply to like all my discussion activity.
say [disscusion content] for (4) secs
wait until <[(username)] = [Randomguy3513]> replies
check reply
show (reply)
wait until <[(read?)] = [yes]>
if <posts of: <[(Randomguy3513)] = [large amount]> then
ask [why?]
end

super_Calvin wrote:

randomguy3513 wrote:

super_Calvin wrote:

InfinityLoopGaming wrote:

This needs to be bumped.
BUMP
whoah stop with the trash talk will you?
when trash talk starts
stop [voice (trash talk) v]
He isn't trash-talking is he simply just bumping the post and bringing it up to the front page
2 things, i read it wrong and you reply to like all my discussion activity.
what do you mean?
the define block is a hat
define block thingy
but why not we make hat, cap, c type, E type blocks instead of the original stack blocks?
block ::custom hat
block {
} ::custom
block{
}{
} ::custom
block ::custom cap
that will be good
zomboss1_1 zomboss1_1 loading
I support this idea. A way to improve it though: what do you were to list all the drop downs at once, and then have a special block that will add in the code for just once drop down, and you'd do this for every dropdown option, so you don't have a ton of seperate, disorganized blocks for a single dropdown?
4601167 4601167 loading
mine has more info on it

4601167 wrote:

mine has more info on it
That topic is closed and is a duplicate
Also it seems extremely similar to this post so it doesn't give much more information
medians medians loading
Yeah this would be nicer than having an input and having to check if it's invalid or not.
when green flag clicked
set [page v] to [1]
medians medians loading

medians wrote:

when green flag clicked
set [page v] to [1]

RedReadyOPERA wrote:

the define block is a hat
define block thingy
but why not we make hat, cap, c type, E type blocks instead of the original stack blocks?
block ::custom hat
block {
} ::custom
block{
}{
} ::custom
block ::custom cap
that will be good
Awesome! Looks good!
medians medians loading

medians wrote:

medians wrote:

when green flag clicked
set [page v] to [1]
Yeah it would be nice if there was an option in this, where you can copy over the dropdowns of other blocks.
If you don't get what I mean by this:

And the block in the custom block will do the last run dropdown (if there is none it will be blank).
Edit:
Maybe like this?
set (dropdown1 ::custom) to [0] //if dropdown1 is not a real variable, this will do nothing.
PkmnQ PkmnQ loading

medians wrote:


Having the dropdown look the same in the definition and the custom block implies that you can select from the dropdown, which is kind of weird but does nothing.
medians medians loading

PkmnQ wrote:

medians wrote:


Having the dropdown look the same in the definition and the custom block implies that you can select from the dropdown, which is kind of weird but does nothing.
Yea I realized that after. I think it should be only in the definition now. Though I think there should be an option to add dropdown options from other blocks and making your own too.
when green flag clicked
be confused
wonder if it's coming to norml scratch
Look:
Dropdown [hi v]
Use v to use dropdown in BBcode and the blocks
made an image for any-input, text, numeric, label text, boolean, dropdown/list, branch, and color input.

Crispydogs101 wrote:

RedReadyOPERA wrote:

the define block is a hat
define block thingy
but why not we make hat, cap, c type, E type blocks instead of the original stack blocks?
block ::custom hat
block {
} ::custom
block{
}{
} ::custom
block ::custom cap
that will be good
Awesome! Looks good!
for hat and cap, there would have to be a toggle, but they would conflict with eachother, as capped hat is useless. but branches would be an input that simply is a bit complex, requiring a new system in the define block
heres that
branched input can be moved, so for example, the goto random position block could be first!
multiple branches can be inserted, too.
Craftgenix1 Craftgenix1 loading

BigBlueBlock wrote:

Me_Tis wrote:

My suggestion is simple: that when you create your own block, along with boolean, string and number input, you were allowed to do a dropdown list like this:
define move [direcion]
if <(direction)=[up]>
point in direction (0 v)
move (10) steps
end
if <(direction)=[down]>
point in direction (180 v)
move (10) steps
end
when green flag clicked
move [down v]
I would find this very useful (though admittedly my example wasn't very useful)
Any suggestions, improvements or just support?
%d They will be added in future!
I think this is an amazing idea, and this can have a: if is (dropdown option) run: (code), and when you put a dropdown option on a custom block, the dropdown will display the dropdowns that it is hooked up to, such as variable dropdowns, lists, the if is, and more!
medians medians loading
Yeah it should definitely be like this:


And you'll be able to get dropdowns from other blocks as well.

Me_Tis wrote:

-cut-
define move [direcion]▾
if <(direction)=[up]> then
point in direction (0 v)
move (10) steps
end
if <(direction)=[down]> then
point in direction (180 v)
move (10) steps
end
when green flag clicked
move [down v]::custom
-cut-
fix