LarkSS Posted November 21, 2006 Report Share Posted November 21, 2006 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 More sharing options...
USC Posted November 21, 2006 Report Share Posted November 21, 2006 Well, there's a tutorial on the site here... http://sfghq.emulationzone.org/view_info.php?sec=4&id=142 ...Maybe check through that a bit? Although, I think part of the problem is that for MMF, black is the transparent color. Try doing something like blue instead, and see what that does. 1 Link to comment Share on other sites More sharing options...
LarkSS Posted November 21, 2006 Author Report Share Posted November 21, 2006 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, 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 More sharing options...
USC Posted November 21, 2006 Report Share Posted November 21, 2006 Oh, I see. Well, I'll link you to another article... http://www.create-games.com/article.asp?id=1304 Read the second method, I think that's what you want. Edit : Well, you already figured it out. Good. Link to comment Share on other sites More sharing options...
Felik Posted November 21, 2006 Report Share Posted November 21, 2006 And where is evil slingerland with his sarcasm and angriness? Shining Supersonic would be cool. I'm going to try color replacement too. Link to comment Share on other sites More sharing options...
DizzyDoo Posted November 21, 2006 Report Share Posted November 21, 2006 And where is evil slingerland with his sarcasm and angriness? Well, that was uncalled for... Anyway, I hadn't seen that tutorial on the site either. Useful... Link to comment Share on other sites More sharing options...
Recommended Posts