I miss a way to change the "sprite only" aspect of a custom block

I often change my ming about the fact that a block is only for one sprite or not and this is painful to do.
I did not even find a way to move a piece of script from one definition to the other.

I know the might be problem with variables, and I may have to adjust this script.

Yes, people suggest this a lot, but it's hard to implement, which is why we haven't done it yet.

I've looked at the code, and it honestly doesn't seem too hard to implement (well, sprite to global anyway).

Take it up with Jens; I'm just telling you what he always tells me.

you can change a block's scope (local / global) using metaprogramming in v9, but only if the block is not in use anywhere. Changing a block's scope leads to all kinds of unexpected and hard-to-manage conflicts down the road. It's almost always better / safer / more convenient to make another block with the other scope and select the instances to exchange / switch over manually from case to case.

Also, to tell you a little secret, global is mostly what you (should) want, whereas local is what you think you should want, but really don't :slight_smile:

Hey, you're the OOP guy! I hardly ever make sprite-local blocks. :~)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.