Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make a sprite appear when a costume is at a certain number
- exmster
- Scratcher
20 posts
How to make a sprite appear when a costume is at a certain number
I'm trying to make dialogue and I want one of my characters to appear when a costume number is at 8. How can I do this?
Thank you!
Thank you!
- P0rpleStar
- Scratcher
100+ posts
How to make a sprite appear when a costume is at a certain number
if <(costume #) = [8]> then
show
end
-The "not so officially" registered forum stalker, VanillaVibes (AKA P0rpleStar)
Want to see an example of the type of projects I do or want to know more about me? Go join and visit my fan club!
https://scratch.mit.edu/studios/28729865/
- rushiingwater
- Scratcher
21 posts
How to make a sprite appear when a costume is at a certain number
like the dude did above, but also if its another sprite
if <[(costume #)] = [the number]> then
broadcast [ show sprite]
end
charlie/xeo/lila
it/its
- exmster
- Scratcher
20 posts
How to make a sprite appear when a costume is at a certain number
Thank you!
- Venus, your fellow Yuri and Eclair Cookie simp
- Venus, your fellow Yuri and Eclair Cookie simp
Last edited by exmster (March 17, 2022 13:44:02)
- exmster
- Scratcher
20 posts
How to make a sprite appear when a costume is at a certain number
UPDATE: It didn't work. I tried the broadcast one for another sprite. If you want to look inside, please do! Thank you!
https://scratch.mit.edu/projects/653813976/
https://scratch.mit.edu/projects/653813976/
- P0rpleStar
- Scratcher
100+ posts
How to make a sprite appear when a costume is at a certain number
Oooooh I see what you mean now. Okay so here's what you should (I think) do:
In the text sprite:
In sayori's sprite:
In the text sprite:
forever
if <(costume #) = [8]> then
broadcast [Show sayori]
end
end
In sayori's sprite:
when I receive [Show sayori]
set [ghost] effect to (100)
repeat (10)
change [ghost] effect by (-10)
end
-The "not so officially" registered forum stalker, VanillaVibes (AKA P0rpleStar)
Want to see an example of the type of projects I do or want to know more about me? Go join and visit my fan club!
https://scratch.mit.edu/studios/28729865/
- P0rpleStar
- Scratcher
100+ posts
How to make a sprite appear when a costume is at a certain number
actually wait, that's wrong. that would create a loop. Lemme just remix the project for you.
-The "not so officially" registered forum stalker, VanillaVibes (AKA P0rpleStar)
Want to see an example of the type of projects I do or want to know more about me? Go join and visit my fan club!
https://scratch.mit.edu/studios/28729865/
- P0rpleStar
- Scratcher
100+ posts
How to make a sprite appear when a costume is at a certain number
Here you go! I added a few blocks of code that check every time a new message appears.
https://scratch.mit.edu/projects/661478602
https://scratch.mit.edu/projects/661478602
-The "not so officially" registered forum stalker, VanillaVibes (AKA P0rpleStar)
Want to see an example of the type of projects I do or want to know more about me? Go join and visit my fan club!
https://scratch.mit.edu/studios/28729865/
- Enigma_Ezra
- Scratcher
500+ posts
How to make a sprite appear when a costume is at a certain number
Okay, so you want to detect a sprite's costume and then want to show ANOTHER sprite?
If NO, then put this code in the sprite you want to detect the costume:
If you want to have a sprite show when another sprite's costume is 8, then use this code IN THE SPRITE YOU WANT TO SHOW:
I put the letters in caps only to mean that they are very important, not because I am mad or something.
If NO, then put this code in the sprite you want to detect the costume:
when green flag clicked
forever
if <(costume #) = [8]> then
show
else
hide
end
end
If you want to have a sprite show when another sprite's costume is 8, then use this code IN THE SPRITE YOU WANT TO SHOW:
wait until <([costume # v] of [Sprite1 v]) = [8]>
show
I put the letters in caps only to mean that they are very important, not because I am mad or something.
Last edited by Enigma_Ezra (March 17, 2022 14:38:04)
To enter signature navigation: highlight this and press shift + down / up arrow keyEnigma_Ezra
Nickname: Ezra
Experienced branding designer → logos, intros, banners, thumbnails
GlowShop 3.0
The Nebulartsy Shop
Everything Shop 2.0
The Bug Squishers 2.0
Knightbot63's Product Shop 2.0
78ch3's Everything Shop
———————
About Me:
I've been a Scratcher for over 3 years. I've been front-paged twice. I have a total of over 30k views over these years, getting an incredible boost (both views and follows) from making friends, being involved in forums, working in shops in the Request forum page, and especially my Rock, Paper, Scissors game. If you wanna talk, contact me on my profile!
- deck26
- Scratcher
1000+ posts
How to make a sprite appear when a costume is at a certain number
But you don't need a broadcast - use a sensing block
wait until <([costume name v] of [Sprite1 v]) = [whatever]> // or use the costume number option
- Enigma_Ezra
- Scratcher
500+ posts
How to make a sprite appear when a costume is at a certain number
Oh yea! Forgot about that. Thanks! But you don't need a broadcast - use a sensing blockwait until <([costume name v] of [Sprite1 v]) = [whatever]> // or use the costume number option
To enter signature navigation: highlight this and press shift + down / up arrow keyEnigma_Ezra
Nickname: Ezra
Experienced branding designer → logos, intros, banners, thumbnails
GlowShop 3.0
The Nebulartsy Shop
Everything Shop 2.0
The Bug Squishers 2.0
Knightbot63's Product Shop 2.0
78ch3's Everything Shop
———————
About Me:
I've been a Scratcher for over 3 years. I've been front-paged twice. I have a total of over 30k views over these years, getting an incredible boost (both views and follows) from making friends, being involved in forums, working in shops in the Request forum page, and especially my Rock, Paper, Scissors game. If you wanna talk, contact me on my profile!
- Discussion Forums
- » Help with Scripts
- » How to make a sprite appear when a costume is at a certain number