Help with Turtle Extension block definition

I am redoing the Turtle Extension from here: https://github.com/microsoft/pxt-screen-turtle
I had some specific needs for multiple “turtles”, cartesian coordinate system and limited number of blocks.
Overall I have it working.
The issue is in creating the turtle.
You need to drag out the block and then insert a sprite into it.
Like this:


For ease of use what I would like is to have the “sprite of kind player” block already embedded in the original block, so that there is one less step and less confusion with the students.
Problem is I can not figure out a way to create a block like that.

Anyone have a suggestion?
My Turtle extension is available here: https://github.com/mr-coxall/turtle-logo/
Thanks

if you do:

//% blockId=turtleFromSprite block="turtle of $sprite"
//% sprite.shadow=spritescreate

you’ll get

image

Thanks so much that worked perfectly.

Any chance you might know how to place a user defined image inside the block?
I would love for it to have the turtle pre-loaded as well.
Screen Shot 2021-02-24 at 4.42.06 PM

Thanks

Not supported at this time but I like the idea :slight_smile: Could probably do pretty reasonably with default values for named assets as default values for images, but this is a little more complex as the image is nested within the spritecreate block / it would be setting the default deeper into the block

I just want to confirm that you think it might be possible to do with a default value to the image and then assign it to the sprite?

I did find this about “Hidden Blocks”. I could get hidden blocks working, but once I tried it with Sprites, I couls not get it working.

Thanks

It is currently not possible, but might be something we could think about adding support for in the future.