User blog:MugenLover10/Transformation Problem!

I'm having a bit of trouble! I'm giving my character the ability to transform, but i only want this to happen on certain palettes. How would i do this? This is the animation he uses when using the transform command.