Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Max Costume
- han614698
-
Scratcher
1000+ posts
Max Costume
Is there any possible way I could detect how many costumes are in the sprite?
- TheAnomalousPseudo
-
Scratcher
1000+ posts
Max Costume
set [foo v] to [2]
switch costume to [costume2 v]
repeat until <(costume#) = [1]>
next costume
change [foo v] by [1]
end
However this won't work for 1 costume.
Last edited by TheAnomalousPseudo (May 6, 2021 12:58:11)
- han614698
-
Scratcher
1000+ posts
Max Costume
What variable stores the end result?set [foo v] to [2]
switch costume to [costume2 v]
repeat until <(costume#) = [1]>
next costume
change [foo v] by [1]
end
However this won't work for 1 costume.
- PersonalPi
-
Scratcher
22 posts
Max Costume
switch costume to [whichever costume is last]
set [costume amount] to (costume #)
- TheAnomalousPseudo
-
Scratcher
1000+ posts
Max Costume
Wait no…At the top, change set foo to 2 to set foo to 1, otherwise you'll get 1+ final costume#
- Yusei-Fudo
-
Scratcher
1000+ posts
Max Costume
set [foo v] to [2]
switch costume to [costume2 v]
repeat until <(costume#) = [1]>
next costume
change [foo v] by [1]
end
However this won't work for 1 costume.
You can do this that, just needed a bit more script
:- Discussion Forums
- » Help with Scripts
-
» Max Costume


