Discuss Scratch
- Discussion Forums
- » Suggestions
- » costume name
- koopa_land
-
Scratcher
100+ posts
costume name
when GF clicked
delete (all v) of [costume name v]
switch costume to [the first costume v]
repeat (length of costume like 2 if there are 2 costumes ::looks)
add ([costume name v] of [this sprite v]) to [costume names v]
next costume
end
Then Use
(item (costume #) of [costume names v])
or try
when I start as a clone
set [costume name v] to (item (costume #) of [costume names v])
For the clone so I'm unsupport it
Last edited by koopa_land (Aug. 14, 2015 09:43:51)
- koopa_land
-
Scratcher
100+ posts
costume name
Whoops I forgot but I'm going to Unsupport it Because There is a WorkaroundDid you meanRead the above posts, that workaround doesn't work for clones which is why this was suggested.(costume name :: looks)
Workaround([Costume name v] of [wanted sprite (really) v])
- Cream_E_Cookie
-
Scratcher
1000+ posts
costume name
Technically workaroundable:What if you have a billion costumes.set [costume name v] to (item (costume #) of [costume names v]
Support, it doesn't work for clones
- Krodon
-
Scratcher
16 posts
costume name
Support, I need could use it easily for a text engine.
I did use the workaround, but it was a bit confusing and took a few attempts to try and get all the letters, numbers, and spacing working correctly, though I believe Scratch was meant to be simple, and it is logical for a reporter block to be able to check it's own costume name, even if it is a clone.
I did use the workaround, but it was a bit confusing and took a few attempts to try and get all the letters, numbers, and spacing working correctly, though I believe Scratch was meant to be simple, and it is logical for a reporter block to be able to check it's own costume name, even if it is a clone.
Last edited by Krodon (Feb. 6, 2016 21:24:22)
- johnkershaw
-
Teacher
2 posts
costume name
I'm building a project for my students to help them understand logic gates. I have a gate that can be any of the gates when clicked. Its costumes are named AND, OR, NAND, XOR etc. Why can I not access those costume names directly? Yes, I can create a list and mirror all the names into there, but it's hardly elegant, and adds a tonne of cognitive load my students don't need.
Sprites should be able to access their own attributes directly.
Sprites should be able to access their own attributes directly.
- TheLogFather
-
Scratcher
1000+ posts
costume name
I'm building a project for my students to help them understand logic gates. I have a gate that can be any of the gates when clicked. Its costumes are named AND, OR, NAND, XOR etc. Why can I not access those costume names directly? Yes, I can create a list and mirror all the names into there, but it's hardly elegant, and adds a tonne of cognitive load my students don't need.If Scratch was meant to be a ‘serious’ language for creating ‘grown up’ games/projects then I would agree.
Sprites should be able to access their own attributes directly.
However, I think there is a potential argument that the “cognitive load” might be considered part of the point… i.e. you have to actually think about how to develop a solution to such a problem using the toolset you have.
Personally, I suspect that could be a more generically useful thing to learn than much of the CS teaching that goes on these days, which tries to prepare students for the way modern computer languages work, and they way you're ‘meant’ to use them, ‘best practice’, etc… (Here I'm exposing one of my pet peeves… I guess I might be disagreeing with your statement above, and suggesting that it might be precisely the kind of cognitive load they need, and prepares for a future which could be somewhat different, computationally speaking, from the environment we have today…? Having said that, though, I do recognise that it's going to depend to some degree on what you're trying to do at the time…)
There's a similar question over the lack of a “previous costume” block (though the solution is obviously far simpler in that case, which, again, could be part of the point).
I can't pretend that above was ever really the reason the Scratch Team never included the “costume name” block (even though it does exist internally in Scratch, and works fine, but is just missing an entry in the block palette), but I think it's worth thinking about…
Note that if you're not using clones then you *do* have the blue "([costume name v] of [sprite v])" sensor block available to use for what you want. It's only if you're using clones that you're missing the capability to access the costume name in a clean/obvious way.
Last edited by TheLogFather (April 3, 2017 19:21:57)
- Green_yoshi
-
Scratcher
56 posts
costume name
define (costume #)
set [Costume] to (join [Numer of] (costume #))
say (join (costume #) (join [Means the number of] (☁ The costume number))) for (2) secs
- 2011Nintendo3DS
-
Scratcher
48 posts
costume name
how i can name the costume to the similar costume name
find similar costume name to costume [ v] from sprite [ v] :: looks
- JJtheJJpro
-
Scratcher
5 posts
costume name
I found a way, and this should 100% work.
1. Go on a different sprite you don't want to use this on.
2. Sensing ->
3. Set the sprite name to the sprite you want it on.
4. Duplicate that block and put it in the sprite you want.
5. Go to that sprite and you see it there.
Please respond if you got confused.
1. Go on a different sprite you don't want to use this on.
2. Sensing ->
([costume name v] of [SpriteName v])and drag that block onto the sprite you don't want to use it on.
3. Set the sprite name to the sprite you want it on.
4. Duplicate that block and put it in the sprite you want.
5. Go to that sprite and you see it there.
Please respond if you got confused.
- Botcho_Otkho
-
Scratcher
1000+ posts
costume name
Can you at least try the script before stating it as a workaround?define (costume #)
set [Costume] to (join [Numer of] (costume #))
say (join (costume #) (join [Means the number of] (☁ The costume number))) for (2) secs
how i can name the costume to the similar costume nameDon't thread hijack.
find similar costume name to costume [ v] from sprite [ v] :: looks
I found a way, and this should 100% work.You may mean “this should 50% work”, since it doesn't work for clones.
1. Go on a different sprite you don't want to use this on.
2. Sensing ->([costume name v] of [SpriteName v])and drag that block onto the sprite you don't want to use it on.
3. Set the sprite name to the sprite you want it on.
4. Duplicate that block and put it in the sprite you want.
5. Go to that sprite and you see it there.
Please respond if you got confused.
___
Support, the workaround only works for normal sprites and not for clones.
Last edited by Botcho_Otkho (April 25, 2018 14:23:50)
- qwerty_wasd_gone
-
Scratcher
1000+ posts
costume name
How to do it?
(costume [name v]::looks)Also, how did you manage to even find this
Last edited by qwerty_wasd_gone (Feb. 11, 2023 03:57:30)
- medians
-
Scratcher
1000+ posts
costume name
How to do it?Please do not necropost. This was implemented in Scratch 3.0. In 2.0, you have to drag the block selecting the same sprite from another sprite/the stage, and it will work.
Or if the sprite was the only sprite/the last created one, you can drag it out from sensing.
Last edited by medians (Feb. 11, 2023 03:07:01)
- GUYWHOLOVESCODE
-
Scratcher
500+ posts
costume name
This block exists already in Sensing.
I'm a nincompoop, I didn't look at initial dates. I apologize for joining this and we really need to get this topic closed.
([backdrop # v] of [stage v])The second dropdown allows selection of other sprites, giving you options including size, costume, etc. from the first one once you pick a sprite.
Or maybe add ‘myself’ as an option in the sensing block?This block exists in Looks.([costume name v] of [myself v])
(costume[number v]::looks)That dropdown? Yeah, the other option is “name”
I'm a nincompoop, I didn't look at initial dates. I apologize for joining this and we really need to get this topic closed.
Last edited by GUYWHOLOVESCODE (Feb. 11, 2023 03:29:18)
- medians
-
Scratcher
1000+ posts
costume name
That dropdown? Yeah, the other option is “name”That didn't exist at the time. In fact this suggestion should be closed because it was implemented nearly 6 years later. At the time there was also no backdrop block (you had to use the sensing reporter to get the backdrop # or drag the backdrop # block to a sprite since it could only be accessed from the stage).
Last edited by medians (Feb. 11, 2023 03:32:52)
- Discussion Forums
- » Suggestions
-
» costume name















