When a sprite is renamed, update all the times it’s used (rename all)

Right now if you rename a sprite every time you use that sprite’s name before the rename will not update breaking every block it was in

To fix this you need to meticulously rename every single block in the entire project to use the new name

So to fix this add a “rename all” option like with variables that updates every instance of that string within the project

It's kind of too bad that we use sprites' names so much in the first place. That's really a holdover from Scratch, in which sprites aren't first class.

But yeah, given that we rely on names, and that we allow renaming, I agree that the same issues arise as with variable renaming.

Also it only behaves incorrectly after you add another sprite to the project making for even more confusion as you might forget you renamed that sprite likely because it doesn’t update the sprite list until then

I don’t see much of a way to identify a sprite other than from its name as the sprite itself would probably be difficult to distinguish between others
Maybe you had a different way of looking at it?

Have you used lists in Scratch? Where we have those ⌸ list-type input slots, they have a menu of list names. In that context it's hard to imagine how you might identify a list other than from its name! But in Snap!, when you do need to name a list, you do it by putting the list in a variable. It could be the same way with sprites; instead of having a GUI button to make a sprite, there'd be a reporter that reports a new sprite, and if you want to name it, you assign it to a variable.

I was just about to say that, but now that I think about it that would take a lot longer than just clicking the sprite name

It would take a little longer, maybe, but you're just recapitulating the arguments we had with kids accustomed to Scratch when we took out the Make a List button. The huge gain in expressive power is worth it.

Maybe both could be implemented to make everyone happy

All blocks that use sprite names also support putting the sprites themselves in those slots so there wouldn’t be any harm in keeping both

I made a demo of how this could work using metaprogramming!
https://snap.berkeley.edu/snap/snap.html#present:Username=cookieclickerer33&ProjectName=First%20class%20sprites

image

yeah… I’ve had that EXACT SITUATION happen to me before. It’s related to the join block, for some reason it like sets up an entire other sprite sometimes and then doesn’t let script vars pass

Wait that’s the wrong variable.. let me fix that

I don’t really know of another way to delete the block after a sprite is deleted other than using an independent script

Well uh

I seem to have come to the realization that you kinda can’t do this as sprites aren’t lists, blocks, or texts they cannot be put into report blocks

Eh?
untitled script pic (2)

That uses the name of the sprite, that’s the exact issue we’re trying to overcome

If you're looking to programatically create a sprite, you can do the following:
Untitled script pic (1)

That’s what I did!

Oh. That's different from what you said! You said you can't report a sprite, but you clearly can.

So, what you really want is a A NEW SPRITE reporter. (Then you can write the part about giving it a name, as you've done, supposing it needs one.)

not exactly, in a list sprites can be items, but outside of a list sprites cannot exist individually (exept for that block)
so theres no real way to report a sprite without using its name at some point

What other method are you looking for ?

Can you give a simple example?

the way a sprite is in a list where its not just the name of the sprite, it IS the sprite
the object block needs the sprite name

if thats not what you ment then this discussion turned into finding a way to get a sprite without using its name

Treating clones separately (as it's easy to get a reference to clone as I'm sure you know how to)...

...what other unique property of a sprite are you wanting to use as a reference to it?

that peciceley is what we are discussing! a unique way to identify a sprite that is not its name!