Discuss Scratch
- dogeiscut
-
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
-
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
-
500+ posts
Being able to "group" sprites together
It could work with blocks, i was thinking it would be a menu option or somthing but this allows multiple sprites to be grouped. 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
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
-
100+ posts
Being able to "group" sprites together
What do you mean by joint and solid?
- dogeiscut
-
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
-
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
-
500+ posts
Being able to "group" sprites together
no, i think you need to re-read it slower 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 dogeiscut (Nov. 27, 2019 19:35:54)
- miniepicness
-
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
-
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
-
500+ posts
Being able to "group" sprites together
no 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]
- --Explosion--
-
1000+ posts
Being able to "group" sprites together
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. 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.
- dogeiscut
-
500+ posts
Being able to "group" sprites together
cough….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. 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.
cough cough
“Sprites grouped together would rotate and move the same”
no
- ResExsention
-
1000+ posts
Being able to "group" sprites together
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. 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.
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
-
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
-
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
-
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
-
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
-
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