Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Replace Color in MMF1


LarkSS

Recommended Posts

Hey.

I'm trying to change the palette of a sprite in-game using the color replacer in MMF. I can't seem to get it to work using a calculation though. I thought that maybe I'd need to enter the R,G,B so as a test I tried to change a black color to white. The action said "Replace color 1,1,1 with 255,255,255". It doesn't work. =/ Instead it changes the transparent color with red. I tried several other things and it does me no good. Does anyone know how to use the Color Replacer with calculations?

Link to comment
Share on other sites

I'm surprised that after the time I've spent in the tutorials section, I overlooked that. =P Thanks, I'll look it over and see if it solves my problem.

Edit: I see the difference between that method and mines. Apparently instead of using a calculation, they used custom color to input a value and it works. Thanks USC for showing me this. I was pretty stuck there.

Below is a double post that has been automagically merged into the original.

Sorry for the double post, but it's to show that I have another problem.

It works great and all, but I can't seem to restore the colors back to normal after they've been changed unless I say to replace the colors it has been changed to with the default. Problem is that I want the sprite to change to 5 different colors and I'd have to do one heck of a lot of color checking just to make it change to a different color. I tried killing and recreating the object, but the colors are still swapped. I believe I could make a work around if someone could help me in figuring out how to use the calculation part of the color swapper so I may be able to add equations instead of set numbers.

Edit: Problem solved. =D I relized that it didn't want me to input the red, then green, then blue, but a special number that represented all three and MMF can do it with the GetRGB(R,G,B) command. I also don't need to use any calculations like I thought as I can have a palette object off screen with the normal and current palette of the sprite, so I can retrieve the current color and replace it with the original.

Btw, this means that using that method you can do more advanced color changing like making Super Sonic fade from yellow to white and back again.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...