How do I know what the hat blocks of a sprite's scripts are?

I need that info for a reason.

make a block that does nothing and put it at the top of the script to indicate the hat block. i don't think you can arbitrarily get hat blocks or manipulate them.
if you can't set the code in the sprite, i think scisnap has some primitives to load/save sprites, you might be able to "save" a sprite as text and read the xml

neither of these solutions are great though, there's probably something better for your particular situation. what are you trying to do?

to emulate snap in snap i need a list of all hat blocks im my scripts

you don't need a list of hat blocks for that. why would you?

to trigger scripts

you can trigger scripts without hat blocks, create some regular blocks that do the same thing as the hat, and either have the user replace them or change them out during whatever process you use to load them in

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