Discuss Scratch

JachiiStudios
Scratcher
23 posts

Costume switches to costume number instead of name

I'm making a text script and i have costumes named 1, 2, 3, etc. but when i want it to switch to, for example, letter 1 of 123,
switch costume to (letter (1) of [123])
it switches to the first costume (A) instead of the costume named 1.

Does somebody know a workaround?
deck26
Scratcher
1000+ posts

Costume switches to costume number instead of name

I would recommend not using numbers for costume names. It's easy enough to have things like C1, C2 etc so it is clear which is a name and which is a costume number. May be a bit of a pain to sort it out for this project but worth it and next time you can just avoid using numbers.
JachiiStudios
Scratcher
23 posts

Costume switches to costume number instead of name

deck26 wrote:

I would recommend not using numbers for costume names. It's easy enough to have things like C1, C2 etc so it is clear which is a name and which is a costume number. May be a bit of a pain to sort it out for this project but worth it and next time you can just avoid using numbers.
I guess i can add an if else statement to check if the thing is bigger than 10. since any single digit number is never bigger than 9 and text is bigger than numbers in scratch, i can do something like this
if <(letter (index) of (text)) > [10]> then 


switch costume to (letter (index) of (text))

else
switch costume to (join [C] (letter (index) of (text)))
end
thanks for the help!
JachiiStudios
Scratcher
23 posts

Costume switches to costume number instead of name

deck26 wrote:

I would recommend not using numbers for costume names. It's easy enough to have things like C1, C2 etc so it is clear which is a name and which is a costume number. May be a bit of a pain to sort it out for this project but worth it and next time you can just avoid using numbers.
nevermind, it turns out i just didnt even have the number costumes but then it works, it switches to the costume name, not number haha

Powered by DjangoBB