The Daily Click ::. Forums ::. Klik Coding Help ::. MMF 1.5's "replace colour" action
 

Post Reply  Post Oekaki 
 

Posted By Message

DistantJ [FZ Games]



Registered
  02/08/2004
Points
  855
11th August, 2004 at 16:03:37 -

Hey guys, I was just looking at MMF 1.5's "replace colour" action, and I'm interested. It's something I've always wanted to do in a game, change certain colours and all, and will come in especially handy in a current project, but I want to know a few things about it.

Does it permanantly replace the colour? What I mean is, when you replace a colour, if you want to replace a colour again do you have to replace the colour which it was replaced with, or can you just select it's original colour?

Also, can you 'reset' the colour back to how it was at the start, or do you have to replace it back again?

Thanks.

 
http://www.fzgames.com

DistantJ [FZ Games]



Registered
  02/08/2004
Points
  855
11th August, 2004 at 17:48:58 -

Hm, well that's not TOO bad. I could make my character a sort of generic colour, like lime green or something, and replace the colour at the beginning of the frame, that way I know that when I want to set it back to the normal colour I can be sure it'll be the exact same colour. I'm a perfectionist like that, lol. Or I could just colour them using the MMF pallete, lol.

Thanks for the info.

 
http://www.fzgames.com

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
11th August, 2004 at 18:44:54 -

When you replace a colour in an active object, it permeamently replaces the colour in all animations and frames, so the action can take a while if an object has lots of big animations and frames.
Also, because duplicates share the same images, replace colour will affect ALL of one kind of object. (It would be a massive waste of memory if each duplicate kept its own image in memory!)

 
- Tigerworks

RapidFlash

Savior of the Universe

Registered
  14/05/2002
Points
  2712
11th August, 2004 at 22:51:16 -

Phizzy pretty much covered it, but this might help you some more: http://www.create-games.com/article.asp?id=1304

 
http://www.klik-me.com

DistantJ [FZ Games]



Registered
  02/08/2004
Points
  855
14th August, 2004 at 16:54:45 -

Thankyou. Sounds okay to me. I'm kinda wanting my object to flash crazy colours, but it doesn't have many animation frames anyway, so do ya think it'll be okay?

Here's a little idea... What if I keep a single frame active object which resembles it outside of the playfield, and use the "Get RGB at" function when returning to it's normal colour? Sound good?

One more question, does the "Get RGB at" count pixels from the top left or from the hot spot?

 
http://www.fzgames.com

DistantJ [FZ Games]



Registered
  02/08/2004
Points
  855
14th August, 2004 at 17:27:52 -

Hm, this isn't quite what I hoped for. I was hoping to have a character(with shading) flash random colours but it's not really quite cut out for that I see. I'm sure I can easily do costume changing though, so it should come in handy in the future.

It's so annoying how you can't set the R,G,B to 3 separate values! If it wasn't for that I could have easily done it(as in Set Vaulu A to R, B to G, C to B, et cetera), but MMF seems to wanna take it as a single value with commas. Very annoying...

Maybe I can separate the numbers using the string parser... But before I get complicated, is there any extension that can do this easier?

Image Edited by the Author.

 
http://www.fzgames.com

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
14th August, 2004 at 20:02:05 -

Can't you use MMF's GetRGB, GetRed, GetGreen and GetBlue expressions?

 
- Tigerworks
   

Post Reply



 



Advertisement

Worth A Click