add swap palete block, it would be easier to swap paletes in sprites with
switch palete [ff0000] > [0000ff] + :: looks
add swap palete block, it would be easier to swap paletes in sprites with
switch palete [ff0000] > [0000ff] + :: looks
wdym???
Is this a feature request? Why is it in Development? And what does it mean?
probly
swap the pallete, one color on the sprite gets switched to another
It is similar to the replace block
yes
I'm kinda surprised none of you know how easy it already is to do this in Snap!.
Costume before:
Run this:
Costume after:
You can use
switch to costume
script again, you get the original colors back.
Well, so now you have a choice. You can decide to learn something new, or you can decide to be proud of not learning it.
(Sorry, I've been moderating the damn forum all day and I'm grumpy.)
This here forum is supposed to be for people like you to ask questions like that!
So, in this example, we are mapping over the pixels of a costume. Each pixel is a four-item list of red, green, blue, opacity, each in the range [0-255].
The reporter in the first input to map is . When you give ITEM a list of indices, it reports a list of the items at those positions:
Simpler example:
Does that answer your question? Or are you asking how MAP knows where an empty input slot is in the reporter input? That's just part of the magic of CALL, which really does a lot of complicated stuff. Our hope is that people will be able to understand the metaphor of putting something into an empty box without worrying about how it's implemented. But if the empty slot business is what's keeping you away from MAP, you can instead do this:
If I'm still misunderstanding the question, please try again.
hahaha. I'm not a bot, honest!
Any time you want to modify the items of a list, and you're tempted to write a for each item
script, think if you can't use MAP instead. After a while it'll become a habit. :~)
how do you change the color of a certain color on the sprite
thank
thanks
Also,the color block is actually made by hacking the xml(i need %clr inputs)
That's what I tried to do, but it took about half a second, and I had to do a lot of them, making it too slow. My end solution was to use graphic effects.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.