Discuss Scratch
- Discussion Forums
- » Suggestions
- » Attribute Blocks
- DataLabGames
-
Scratcher
100+ posts
Attribute Blocks
This idea is sort of like selectors in Minecraft commands.
One of those blocks would look something like this when put inside a
Basically, it's a new type of block that can be put into places where sprites are needed. Some examples of those blocks are
This new type of block could be used for projects where cloning is needed.
Here is some examples of these blocks:
The first block tells the value of a variable of a certain sprite. The second outputs true if the boolean input is true for that sprite. The last can be inserted into places where sprites are needed (see above). I can think of many things that I can do with this new category of blocks.
One of those blocks would look something like this when put inside a
(distance to [ ])Block:
(distance to ([nearest v] [clone v] of [this sprite v]))(Sorry I'm not good with scratchblocks4)
Basically, it's a new type of block that can be put into places where sprites are needed. Some examples of those blocks are
go to [ v]and
([ v] of [Sprite1 v])
This new type of block could be used for projects where cloning is needed.
Here is some examples of these blocks:
(value of (variable v) of [nearest v] [clone v] of [this sprite v])
<<> true for [nearest v] [clone v] of [this sprite v]?>
([nearest v] [clone v] of [this sprite v])
The first block tells the value of a variable of a certain sprite. The second outputs true if the boolean input is true for that sprite. The last can be inserted into places where sprites are needed (see above). I can think of many things that I can do with this new category of blocks.
- hedgehog_blue
-
Scratcher
1000+ posts
Attribute Blocks
So all blocks that have a sprite name as the input can use this block.
But what happens when you do this:
([x position v] of ([nearest v] [clone v] of [this sprite v]::sensing))
point towards ([nearest v] [clone v] of [this sprite v]::sensing)
create clone of ([nearest v] [clone v] of [this sprite v]::sensing)
But what happens when you do this:
set [variable v] to ([nearest v] [clone v] of [this sprite v]::sensing)What value would the variable contain (what would you see when you show the variable reporter)? Would it be able to point towards the correct sprite/clone?
point towards (variable)
say ([nearest v] [clone v] of [this sprite v]::sensing)What would the sprite say?
Last edited by hedgehog_blue (April 21, 2020 06:52:46)
- DataLabGames
-
Scratcher
100+ posts
Attribute Blocks
So all blocks that have a sprite name as the input can use this block.([x position v] of ([nearest v] [clone v] of [this sprite v]::sensing))
point towards ([nearest v] [clone v] of [this sprite v]::sensing)
create clone of ([nearest v] [clone v] of [this sprite v]::sensing)
But what happens when you do this:set [variable v] to ([nearest v] [clone v] of [this sprite v]::sensing)or
point towards (variable)say ([nearest v] [clone v] of [this sprite v]::sensing)What value would the variable contain (what would you see when you show the variable reporter)?
What would the sprite say?
This new type of block isn't exactly a reporter or a boolean. It would be like something that you can only put inside the places where sprites are needed.
- hedgehog_blue
-
Scratcher
1000+ posts
Attribute Blocks
This new type of block isn't exactly a reporter or a boolean. It would be like something that you can only put inside the places where sprites are needed.Would you be able to set a variable to the output of it or use it as an input to a custom block? These would be useful.
define point and glide to (sprite or clone)
point towards (sprite or clone::custom)
glide (1) seconds towards (sprite or clone::custom)::motion
point and glide to ([nearest v] [clone v] of [this sprite v]::sensing)
- DataLabGames
-
Scratcher
100+ posts
Attribute Blocks
I honestly don't know. Maybe, maybe not. I just had this idea, and it's not fully developed. Maybe that could be added as another thing that this new category could do?This new type of block isn't exactly a reporter or a boolean. It would be like something that you can only put inside the places where sprites are needed.Would you be able to set a variable to the output of it or use it as an input to a custom block? These would be useful.define point and glide to (sprite or clone)
point towards (sprite or clone::custom)
glide (1) seconds towards (sprite or clone::custom)::motion
point and glide to ([nearest v] [clone v] of [this sprite v]::sensing)
- Discussion Forums
- » Suggestions
-
» Attribute Blocks

