Is it possible to selectively "color" over a spritemap's color?


(Quang Tran) #1

I have a playable character sprite, who can buy and equip some armor. When the character equips it, I’d like for the character’s sprite to change color. But I only want their armor to change color, and not their face/hair, etc. I’m aware of setting a spritemap’s color attribute, but it seems to apply to the whole sprite.

Perhaps my memory is fuzzy, but I remember some pixel games I’ve played before where you could selectively choose their hair and skin color. How is that done?


(Zachary Lewis) #2

Think of it like a paper doll.

The easiest way to do this is to separate your sprite up into multiple parts. You’d have an image for your body, and image for your hair and an image for your armor. You can group them together into a single GraphicList to make positioning and updating easier on you.

From there, you’d use the color property you’d previously mentioned to tint the desired images.


(Quang Tran) #3

So that’s how it’s done! Thanks for the help.