Discuss Scratch

DreadFromDoors2424
Scratcher
16 posts

How to switch to a random specific costume.

Hi! What I want to know is how do I change the costume to a specific set of random ones that aren't in order? (So not 1-10 but 1, 4, 6, or 8 for example)

Last edited by DreadFromDoors2424 (Feb. 24, 2025 23:04:53)

legendary34678
Scratcher
1000+ posts

How to switch to a random specific costume.

You can do this:

switch costume to (letter (pick random (1) to (4)) of [1468])
DreadFromDoors2424
Scratcher
16 posts

How to switch to a random specific costume.

legendary34678 wrote:

You can do this:

switch costume to (letter (pick random (1) to (4)) of [1468])

Thank you! This helped a lot!
legendary34678
Scratcher
1000+ posts

How to switch to a random specific costume.

No problem! Just make sure that you don't have any costumes whose names are numbers from 1 to 9 because the switch costume block will switch to costumes that match the name first before the costume number. If you want to pick out of a list of names, you can also fill a list and then do this:

switch costume to (item (pick random (1) to (length of [costume names v] :: list)) of [costume names v] :: list)
Zifowk
Scratcher
100+ posts

How to switch to a random specific costume.

you can do what @legendary34678 said make a list and add all the costume names you want in their then switch the costume to pick random 1 to the length of (how many) and it will choose a random specific costume!
DreadFromDoors2424
Scratcher
16 posts

How to switch to a random specific costume.

legendary34678 wrote:

No problem! Just make sure that you don't have any costumes whose names are numbers from 1 to 9 because the switch costume block will switch to costumes that match the name first before the costume number. If you want to pick out of a list of names, you can also fill a list and then do this:

switch costume to (item (pick random (1) to (length of [costume names v] :: list)) of [costume names v] :: list)


Nah, its fine. I also figured out how to do two digit numbers myself i dont need anymore help, but thanks.

Powered by DjangoBB