Discuss Scratch
- dogeiscut
-
Scratcher
500+ posts
Being able to "group" sprites together
Much like the vector editor grouping tool, being able to group sprites would making projects with alot of sprites more organized . Sprites grouped together would rotate and move the same, but when dragged around would stay together and stay on the same layer relative to eachother. it would also be cool to be able to create “joints” on sprited to link 2 sprites on a join and would rotate on the origin of the joint.
- qucchia
-
Scratcher
100+ posts
Being able to "group" sprites together
This sounds like an interesting concept. How would it work? For example, would there be blocks like this?
group [myself v] with [Sprite1 v] ::pen
ungroup [myself v] with [Sprite1 v] ::pen
- dogeiscut
-
Scratcher
500+ posts
Being able to "group" sprites together
This sounds like an interesting concept. How would it work? For example, would there be blocks like this?It could work with blocks, i was thinking it would be a menu option or somthing but this allows multiple sprites to be grouped.group [myself v] with [Sprite1 v] ::pen
ungroup [myself v] with [Sprite1 v] ::pen
it would also be more like:
set group type to [joint v] ::pen
set group type to [solid v] ::pen
group [myself v] with [Sprite1 v] ::pen
ungroup [myself v] with [Sprite1 v] ::pen
objects cant group them selves to the same object multiple times
- qucchia
-
Scratcher
100+ posts
Being able to "group" sprites together
What do you mean by joint and solid?
- dogeiscut
-
Scratcher
500+ posts
Being able to "group" sprites together
it would also be cool to be able to create “joints” on sprited to link 2 sprites on a join and would rotate on the origin of the joint.
- Seth_Zaw
-
Scratcher
100+ posts
Being able to "group" sprites together
Workaround:
when green flag clicked
forever
go to x: (([x position v] of [sprite v]) + (x distance)) y: (([y position v] of [sprite v]) + (y distance))
point in direction ([direction v] of [sprite v])
set size to ([size v] of [sprite v])%
switch costume to ([costume name v] of [sprite v])
end
when this sprite clicked
repeat until <not <mouse down?>>
go to [mouse-pointer v]
set [x distance v] to (([x position v] of [sprite v]) - (x position))
set [y distance v] to (([y position v] of [sprite v]) - (y position))
end
Last edited by Seth_Zaw (Nov. 27, 2019 19:27:08)
- dogeiscut
-
Scratcher
500+ posts
Being able to "group" sprites together
Workaround:no, i think you need to re-read it slowerwhen green flag clicked
forever
go to x: (([x position v] of [sprite v]) + (x distance)) y: (([y position v] of [sprite v]) + (y distance))
point in direction ([direction v] of [sprite v])
set size to ([size v] of [sprite v])%
switch costume to ([costume name v] of [sprite v])
end
when this sprite clicked
repeat until <not <mouse down?>>
go to [mouse-pointer v]
set [x distance v] to (([x position v] of [sprite v]) - (x position))
set [y distance v] to (([y position v] of [sprite v]) - (y position))
end
Last edited by dogeiscut (Nov. 27, 2019 19:35:54)
- miniepicness
-
Scratcher
1000+ posts
Being able to "group" sprites together
This sounds exactly like parenting sprites in Snap, and I heard they're getting comments soon eventually.
Last edited by miniepicness (Nov. 27, 2019 19:47:59)
- Seth_Zaw
-
Scratcher
100+ posts
Being able to "group" sprites together
Workaround (fixed)
when green flag clicked
forever
if <(grouped?) = [1]> then
go to x: (([x position v] of (sprite)) + (x distance)) y: (([y position v] of (sprite)) + (y distance))
point in direction ([direction v] of (sprite))
set size to ([size v] of (sprite))%
switch costume to ([costume name v] of(sprite))
end
end
when this sprite clicked
repeat until <not <mouse down?>>
go to [mouse-pointer v]
set [x distance v] to (([x position v] of [sprite v]) - (x position))
set [y distance v] to (([y position v] of [sprite v]) - (y position))
end
define group with (sprite)
set [grouped v] to [1]
set [sprite v] to (sprite)
define ungroup with (sprite)
set [grouped v] to [0]
- dogeiscut
-
Scratcher
500+ posts
Being able to "group" sprites together
Workaround (fixed)nowhen green flag clicked
forever
if <(grouped?) = [1]> then
go to x: (([x position v] of (sprite)) + (x distance)) y: (([y position v] of (sprite)) + (y distance))
point in direction ([direction v] of (sprite))
set size to ([size v] of (sprite))%
switch costume to ([costume name v] of(sprite))
end
end
when this sprite clicked
repeat until <not <mouse down?>>
go to [mouse-pointer v]
set [x distance v] to (([x position v] of [sprite v]) - (x position))
set [y distance v] to (([y position v] of [sprite v]) - (y position))
end
define group with (sprite)
set [grouped v] to [1]
set [sprite v] to (sprite)
define ungroup with (sprite)
set [grouped v] to [0]
- --Explosion--
-
Scratcher
1000+ posts
Being able to "group" sprites together
Much like the vector editor grouping tool, being able to group sprites would making projects with alot of sprites more organized . Sprites grouped together would rotate and move the same, but when dragged around would stay together and stay on the same layer relative to eachother. it would also be cool to be able to create “joints” on sprited to link 2 sprites on a join and would rotate on the origin of the joint.Intesesting concept, but there is a REALLY easy workaround for this and that is to just make both sprites in the same costume, I din't see what would be different about this suggestion than just making one costume.
- dogeiscut
-
Scratcher
500+ posts
Being able to "group" sprites together
cough….Much like the vector editor grouping tool, being able to group sprites would making projects with alot of sprites more organized . Sprites grouped together would rotate and move the same, but when dragged around would stay together and stay on the same layer relative to eachother. it would also be cool to be able to create “joints” on sprited to link 2 sprites on a join and would rotate on the origin of the joint.Intesesting concept, but there is a REALLY easy workaround for this and that is to just make both sprites in the same costume, I din't see what would be different about this suggestion than just making one costume.
cough cough
“Sprites grouped together would rotate and move the same”
no
- ResExsention
-
New Scratcher
1000+ posts
Being able to "group" sprites together
Much like the vector editor grouping tool, being able to group sprites would making projects with alot of sprites more organized . Sprites grouped together would rotate and move the same, but when dragged around would stay together and stay on the same layer relative to eachother. it would also be cool to be able to create “joints” on sprited to link 2 sprites on a join and would rotate on the origin of the joint.Intesesting concept, but there is a REALLY easy workaround for this and that is to just make both sprites in the same costume, I din't see what would be different about this suggestion than just making one costume.
Won't work.
What if you're trying to make a battleship with tons of turrets? How would you ensure that rounds get fired out of individual guns, not from the center of the sprite?
- qucchia
-
Scratcher
100+ posts
Being able to "group" sprites together
If you want, I could create a project with some custom blocks you could use to group sprites together.
- ResExsention
-
New Scratcher
1000+ posts
Being able to "group" sprites together
If you want, I could create a project with some custom blocks you could use to group sprites together.
Would be pretty interesting. I'd like to see it, thanks.
- awesome5185
-
Scratcher
1000+ posts
Being able to "group" sprites together
Support, most photo editing/art software has this feature. It's also very useful for not accidentally moving an individual sprite/keeping things organised.
- qucchia
-
Scratcher
100+ posts
Being able to "group" sprites together
ok, I'll have a go at making it.
By the way, how would size and direction work? Would all sprites change freely or would the group have to turn and grow as a whole? If the second option, how would the centre of rotation be determined?
By the way, how would size and direction work? Would all sprites change freely or would the group have to turn and grow as a whole? If the second option, how would the centre of rotation be determined?
- ResExsention
-
New Scratcher
1000+ posts
Being able to "group" sprites together
ok, I'll have a go at making it.
By the way, how would size and direction work? Would all sprites change freely or would the group have to turn and grow as a whole? If the second option, how would the centre of rotation be determined?
That's specifically why this should be a built in feature, not a workaround…
Yes, they would move relative to each other, and the center of rotation would obviously be the middle.
Thanks






