Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to sense when a sprite is a certain costume.
- c321cayden
-
Scratcher
5 posts
How to sense when a sprite is a certain costume.
I'm new to scratch and Im trying to make a game where it can sense what costume the sprite is, and I havent found a solution on it. If anyone knows how that would be very much appreciated!
- awesome-llama
-
Scratcher
1000+ posts
How to sense when a sprite is a certain costume.
Use this block:
It can be set to either name or number. The block would then output the current costume of the sprite/clone it is in.
If you want to know of the costume from a different sprite, use this block:

(costume [name v]::looks)
It can be set to either name or number. The block would then output the current costume of the sprite/clone it is in.
If you want to know of the costume from a different sprite, use this block:
([costume name v] of [Sprite1 v])

Last edited by awesome-llama (March 30, 2021 07:15:48)
- BrandonGamingAV80
-
Scratcher
100+ posts
How to sense when a sprite is a certain costume.
I'm new to scratch and Im trying to make a game where it can sense what costume the sprite is, and I havent found a solution on it. If anyone knows how that would be very much appreciated!
Hi! Welcome to Scratch!
To sense or detect what costume a sprite is on, Scratch actually already added
a block for you to do that.
You can use :
(costume (name v) :: looksfor a sprite
And :
(backdrop (name v) :: looksfor a backdrop!
Both of the block is on the look's block.
Thanks!

- Yesssnosssirrr
-
Scratcher
2 posts
How to sense when a sprite is a certain costume.
For example, you could get a repeat until (this is mostly for animating) from the control, then go to operators, drag out a =, go to looks, drag out a costume number, put it in the left side of the =, then type in the number you want it to stop at.
- Waffle_Esports
-
Scratcher
26 posts
How to sense when a sprite is a certain costume.
Hi! When I use a costume detector, I use this script:
Hope this helps you!
if <(costume #) = []> then
end
Hope this helps you!
- c321cayden
-
Scratcher
5 posts
How to sense when a sprite is a certain costume.
Thank you all so much! This really helped, I figured out a script and it is working. Thanks!
- 123Hawkwing123
-
Scratcher
1 post
How to sense when a sprite is a certain costume.
This helped me too. Thank you scratchers!
- Discussion Forums
- » Help with Scripts
-
» How to sense when a sprite is a certain costume.