Sprite made up of moving parts

I am looking for project examples of sprites made up of moving parts, like a person walking. (Snap! Reference Manual v. 5, p. 9 refers to Nesting Sprites: Anchors and Parts). The description of how to make such a sprite of sprits wasn’t that clear to me, so your help locating examples is appreciated.

Hi, welcome to the forum!

If you go to the open dialog (file menu > open...) and click the big Examples button, one of them is the swimmer that's shown in the manual.

The way to set up a nesting is, if you have sprites Part and Main, first put Part where you want it relative to Main on the stage. Then grab the thumbnail of Part down in the Sprite Corral below the stage, drag it onto the stage until it's over Main, at which time you'll see a gold halo around Main. Then let go and the connection will be made.

I didn't know you could do that

I think we should write a quiz to go with the manual. :~P

There is a video about it by Jens, "Nestable Sprites for Scratch", from 2009. And there is "Nested sprites in Berkeley Snap! How do I use sprite nesting?" video (which at the beginning shows a short clip from the Jens' 2009 video before showing how to nest three sticks as a chain) posted by me in 2015.

At the time the video was made, it was possible to change your mind (i.e. putting Part sightly closer or away from Main), but now you need a) first to de-attach Part from Main, b) correct the relative position and c) then attach it again to Main. In my video three sticks are attached as chain to each other, i.e. the middle one acts both as Part to the first stick and as Main to the third stick.

you don't need to detach a part from its anchor to arrange it differently. Instead you can right-click on the part and select "move", that'll let you adjust its position without needing to detach it.

Oh, nice to know. Great!

bh, thank you for pointing me to the example of the swimmer. Your explanation helped me quickly construct a rowboat with hull and oars. Now I get it. Position all parts on stage, then drag thumbnails of the oars onto the hull in the stage until there is a halo around the hull and let go. I needed to adjust the pivot and used Jen’s suggestion to control-click the part to adjust without detaching.

Going further, is it possible to export an aggregate sprite as a whole, such as the swimmer or rowboat, keeping the main and parts together, for import into another project? For example, move a bird (consisting of body, legs, wings) from a barnyard project to a flocking simulation project. I know it is possible to export an individual sprite (including code and costume), but how to do that with the aggregate sprite?

You should be able to export a composite sprite by just exporting the root anchor (the sprite all the other parts end up being attached to).

Oh my . . . what a wonderful, elegant solution. Thanks, Jens.