Putting costumes into a list?

I would just like to know the easiest & correct way to put costumes into a list,
Thank You.

Just like putting anything in a list: IN FRONT OF to do it functionally, or ADD to do it imperatively. If you're asking how to get a handle on a costume in the first place, use the MY block in Sensing to ask for MY [COSTUMES].

Actually, there's a much easier way:


This block returns a list of the sprite's costumes, so you already have them in a list :slight_smile:

1 Like

Well, if what you want is precisely a list of your own costumes, yes.

Thanks for the replies, so I used the "my costumes" block in...
"for each item of list(my costumes)" block
and it works just fine,
but now I am wondering why the...
"for each item of list" block
seems to be in the "cases library " and not in the "list-utilities library"...
which seems a little unintuitive to me.

I would have inserted script pics to make this clearer but apparently I'm not allowed to at this juncture.
Hope this makes sense.

Probably something in the cases library depends on it. Many libraries have blocks that are for internal use rather than for users of that library to use.

Anyway, as of 5.0, FOR EACH becomes a primitive, so you don't have to worry about where to find it. :slight_smile: Meanwhile, use the "Import Tools" option in the File menu to get a bunch of blocks that are always useful.

Oh... O.K.