Discuss Scratch
- Discussion Forums
- » Suggestions
- » Better Custom Blocks
- AHypnoman
- Scratcher
1000+ posts
Better Custom Blocks
Yeah, I like this Idea. Tho I think it should be kept short. It's hard to balance practicality and comprehensibility. I would take practicality first, Tho others would disagree.That would be good. so, wouldreturn value [] :: custom-arg capbe good?
~ AHypnoman (Use Shift+Down Arrow to see the rest of my signature)
I am an evil kumquat, and your siggy looks tasty…
Hello there, I'm AHypnoman, If you write my name remember to capitalize the “H”. “When you don't create things, you become defined by your tastes rather than ability. your tastes only narrow & exclude people. so create.” I write though as tho.
According to the Chrome Console, my viewbox attribute is “Garbage”. Very nice, Chrome.
#TrendyHashtag
Gib internneeet
Play Retorquebit!
- Marc92020
- Scratcher
1000+ posts
Better Custom Blocks
Yeah I don't think that. I think it should be good.No, because first of all report might make you think it reports a player, and also it should be a cap block, and it shouldn't be red.Very good. But what aboutThat would be good. so, wouldreturn value [] :: custom-arg capbe good?report [] :: custom-arg cap
Also, return value sounds like it would only return a number
Last edited by Marc92020 (Dec. 28, 2020 17:45:42)
- ForumHelperNanoPiex
- Scratcher
500+ posts
Better Custom Blocks
Value can be letters, symbols, ect. any character.Yeah I don't think that. I think it should be good.No, because first of all report might make you think it reports a player, and also it should be a cap block, and it shouldn't be red.Very good. But what aboutThat would be good. so, wouldreturn value [] :: custom-arg capbe good?report [] :: custom-arg cap
Also, return value sounds like it would only return a number
- gosoccerboy5
- Scratcher
1000+ posts
Better Custom Blocks
People could probably easily figure out that it can return words
- Marc92020
- Scratcher
1000+ posts
Better Custom Blocks
or how about justValue can be letters, symbols, ect. any character.Yeah I don't think that. I think it should be good.No, because first of all report might make you think it reports a player, and also it should be a cap block, and it shouldn't be red.Very good. But what aboutThat would be good. so, wouldreturn value [] :: custom-arg capbe good?report [] :: custom-arg cap
Also, return value sounds like it would only return a number
return [] :: custom-arg cap
- ForumHelperNanoPiex
- Scratcher
500+ posts
Better Custom Blocks
Yeah, if you know about variables. it just gets known. People could probably easily figure out that it can return words
XD I'll have to put that in my siggy.
- gosoccerboy5
- Scratcher
1000+ posts
Better Custom Blocks
I think most of the recent discussion was around or how about justalternatives for that.return [] :: custom-arg cap
- AHypnoman
- Scratcher
1000+ posts
Better Custom Blocks
Yes. I'd prefer that. It's quite simple and quite understandable. Perfect for Scratch! or how about justreturn [] :: custom-arg cap
Last edited by AHypnoman (Dec. 28, 2020 18:17:10)
~ AHypnoman (Use Shift+Down Arrow to see the rest of my signature)
I am an evil kumquat, and your siggy looks tasty…
Hello there, I'm AHypnoman, If you write my name remember to capitalize the “H”. “When you don't create things, you become defined by your tastes rather than ability. your tastes only narrow & exclude people. so create.” I write though as tho.
According to the Chrome Console, my viewbox attribute is “Garbage”. Very nice, Chrome.
#TrendyHashtag
Gib internneeet
Play Retorquebit!
- ForumHelperNanoPiex
- Scratcher
500+ posts
Better Custom Blocks
Yes. I'd prefer that. It's quite simple and quite understandable. Perfect for Scratch! or how about justreturn [] :: custom-arg cap
negative ninjaI think most of the recent discussion was around or how about justalternatives for that.return [] :: custom-arg cap
- AHypnoman
- Scratcher
1000+ posts
Better Custom Blocks
Sorry, I can’t see to whom or to what you are referring to, and what you mean by “negative ninja”. Could you please explain?Yes. I'd prefer that. It's quite simple and quite understandable. Perfect for Scratch! or how about justreturn [] :: custom-arg capnegative ninjaI think most of the recent discussion was around or how about justalternatives for that.return [] :: custom-arg cap
~ AHypnoman (Use Shift+Down Arrow to see the rest of my signature)
I am an evil kumquat, and your siggy looks tasty…
Hello there, I'm AHypnoman, If you write my name remember to capitalize the “H”. “When you don't create things, you become defined by your tastes rather than ability. your tastes only narrow & exclude people. so create.” I write though as tho.
According to the Chrome Console, my viewbox attribute is “Garbage”. Very nice, Chrome.
#TrendyHashtag
Gib internneeet
Play Retorquebit!
- ForumHelperNanoPiex
- Scratcher
500+ posts
Better Custom Blocks
The second paragraph is because you should read that because it has a thing you should read, sorry if I sound rude. Negative ninja means that two or more posts are the exact opposite.Sorry, I can’t see to whom or to what you are referring to, and what you mean by “negative ninja”. Could you please explain?Yes. I'd prefer that. It's quite simple and quite understandable. Perfect for Scratch! or how about justreturn [] :: custom-arg capnegative ninjaI think most of the recent discussion was around or how about justalternatives for that.return [] :: custom-arg cap
- AHypnoman
- Scratcher
1000+ posts
Better Custom Blocks
Ah. Thank you for the clarity. Now let's get back on topic.The second paragraph is because you should read that because it has a thing you should read, sorry if I sound rude. Negative ninja means that two or more posts are the exact opposite.Sorry, I can’t see to whom or to what you are referring to, and what you mean by “negative ninja”. Could you please explain?Yes. I'd prefer that. It's quite simple and quite understandable. Perfect for Scratch! or how about justreturn [] :: custom-arg capnegative ninjaI think most of the recent discussion was around or how about justalternatives for that.return [] :: custom-arg cap
~ AHypnoman (Use Shift+Down Arrow to see the rest of my signature)
I am an evil kumquat, and your siggy looks tasty…
Hello there, I'm AHypnoman, If you write my name remember to capitalize the “H”. “When you don't create things, you become defined by your tastes rather than ability. your tastes only narrow & exclude people. so create.” I write though as tho.
According to the Chrome Console, my viewbox attribute is “Garbage”. Very nice, Chrome.
#TrendyHashtag
Gib internneeet
Play Retorquebit!
- Nintendoisgood
- Scratcher
24 posts
Better Custom Blocks
Okay, the way I am doing it now each of the stack blocks that should be used in a custom reporter (or custom operator) definition are in the same color and available from the More Blocks palette when the Stage is selected (and one or more custom Remember how Scratch would run the script from the sprite using it?reporters operators have been made). Because these blocks are not custom blocks themselves, they won't be the same color as a custom block or definition hat (they won't be purple).
Instead of doing anything to prevent people from using normal blocks, which will ultimately fail (someone will hack them in), just tell users to not use them unless absolutely necessary. Then you could have a list of blocks not to use, like:
"Don't use:
motion blocks
event blocks
sound blocks
pen blocks
looks blocks
hat blocks
cap blocks
create clone of
any custom blocks using these
unless absolutely necessary"if <> then //color=grey
end
if <> then //color=grey
else
end
report [ ] // category=grey
stop [ ] // the report block will have a flat bottom like stop this script (like in the first mock up)
repeat () // color=grey
end
repeat until <> // color=grey
end
There is no restriction on using other blocks, but the recommended blocks are these (all the same color), the input values from the define hat (dark blue reporters), Scratch's built-in operators (light green reporters), and the new local variables and set/change blocks.
A custom operator can have its own variable(s).
Once a local variable is made, two stack blocks, unique to each custom operator, appear in the palette below that operator and its variable(s).(i) // category=grey
set [i v] to [0] // category=grey
change [i v] by (1) // category=grey
These are also the same color as the recommended control blocks.
A triangle button shows/hides the local variables and set/change blocks. One ▶ for each; the button is in the palette in front of the operator. It faces down ▼ when open.
One operator is open at a time; others close automatically. When open, appearing below a custom operator are: its local variables, its set/change blocks, and its add a variable button.
To accommodate making custom boolean blocks, the checkbox to Run without screen refresh is changed to Cast as boolean. When checked, the appearance of the custom block changes to boolean (<>) in the New/Edit Block window and, after OK is clicked, in the palette and in the definition hat. The script in a definition is unchanged by checking the box. (The flat bottom report block stays the same.) If casting does not give the desired report value, a Scratcher will have to update their script.
All operators are global: they can be used in stage scripts and in sprite scripts. So the custom operators also appear in the More Blocks palette of each sprite (below any sprite-specific custom blocks). In the sprite palette, the triangle button is not present. The operator can only be opened from the Stage, where its definition is kept.
Mock up is still in the works.
Uh… the forums don’t use the comment syntax anymore. They use the :: syntax.
Signed,
Nintendoisgood
Ctrl Shift Down to see the rest of me siggy
<;\) :: motion> // This is Timothy. He protects me from pesky kumquats.
when flag clicked
forever
go to [Nintendoisgood v]
follow [Nintendoisgood v] :: control
end
Every project of mine is made on a Mac Mini and an iPad Air 2.
RiiTag:
https://tag.rc24.xyz/user/969476634044428329
;
- PATSATDAT
- Scratcher
1000+ posts
Better Custom Blocks
We dont want it to be a cap blockNo, because first of all report might make you think it reports a player, and also it should be a cap block, and it shouldn't be red.Very good. But what aboutThat would be good. so, wouldreturn value [] :: custom-arg capbe good?Report []
define (delete and report item (num ::custom) of (list ::custom)
return (item (num ::custom) of (list ::custom)) ::custom
delete (num ::custom) of (list ::custom)
- -LekkerGames-
- Scratcher
67 posts
Better Custom Blocks
ive been asking for this for a long time. 100% support.
when i wake up::hat , events
if <(year) = (2020)> then
go back to bed::motion
else
think [I am happy it is not 2020] for (2) secs
go back to bed::motion
end
- ninjaMAR
- Scratcher
1000+ posts
Better Custom Blocks
Why ive been asking for this for a long time. 100% support.
- ReversedServers
- Scratcher
66 posts
Better Custom Blocks
i dont think that the reporter would be inside the custom blocks, but the reporter maker would be a seperate thing.
★ they/it aroace enby ★ pisces ★ rhombicosidodecahedron fan ★ frog ★
(っ◔◡◔)っ ♥ respect the LGBTQ+ community!! ♥
【by reading this you've been sili-conned!!】
join the c-volution https://scratch.mit.edu/studios/31306636/comments/
https://www.youtube.com/watch?v=_hjRvZYkAgA&vl=en
HAPPY BIRTHDAGN VIEW-MONSTER ONE OF THE BEST LEMON DEMON ALBUMS AUGUST 1 YEAHHHH
- mazzadoobry
- Scratcher
100+ posts
Better Custom Blocks
Agree and Support.
I like scratch.
I would never say
I don't like scratch.
Lol read from top to bottom, then bottom to top.
window.document.getElementById(“follow-button”).addEventListener(click, clicked)
function clicked() {
console.log(“Thank you!”)
alert(“Lol”)
}
CANVAS IS A CONTAINER FOR GRAPHICS
- Hearst10
- Scratcher
100+ posts
Better Custom Blocks
we haven't come to a decision about that, but if it is a cap in the release with this feature, you can use -snip-
We dont want it to be a cap blockdefine (delete and report item (num ::custom-arg) of (list ::custom-arg) :: custom)
return (item (num :: custom-arg) of (list ::custom-arg)) ::custom-arg
delete (num ::custom-arg) of (list ::custom-arg)
define (delete and report item (num ::custom-arg) of (list ::custom-arg) :: custom)
use temporary var ((report) :: grey){
set [report v] to (item (num :: custom-arg) of [list v] :: list)
delete (num ::custom-arg) of (list ::custom-arg)
return (report) :: custom-arg cap} :: variables
also, to get the blue color, use
:: custom-arg
um… I would not like that -snip-
I don't understand i dont think that the reporter would be inside the custom blocks, but the reporter maker would be a seperate thing.
Last edited by Hearst10 (Jan. 3, 2021 21:34:46)
Moving from Scratch? Don't learn C or Java, try Snap!