The Daily Click ::. Forums ::. Klik Coding Help ::. make object to change color
 

Post Reply  Post Oekaki 
 

Posted By Message

columbo borgi :C



Registered
  07/12/2003
Points
  296

VIP Member
7th January, 2010 at 17:14:18 -

yo there klikkers

Image
i want an object to change color. i mean, if it gets hit, i should be turn red, or anything else. i mean, every pixel should turn red on that object which are not transparent.Image
i tried to use ink effect, but those are depending the bast colours of the object.Image
and that would be the best, if it could be done without any extension.Image

and i want this effect not to be permanent. i mean, i want to remove this colourchanging thingy.

thanks for youre replys, :C ;>

Edited by columbo borgi :C

 
:C

Ricky

loves Left For Dead 2

Registered
  28/12/2006
Points
  4075

Has Donated, Thank You!Game of the Week WinnerVIP MemberWii OwnerHero of TimeGOTM Winner! - November 2009I am an April Fool
7th January, 2010 at 20:24:10 -

You could just have it have a red animation

 
-

Rob Westbrook



Registered
  25/05/2007
Points
  193

360 OwnerVIP Member
8th January, 2010 at 01:05:33 -

If you're using GF2 or MMF2, the HWA beta builds have a feature that lets you do that easily.

 
There are 10 types of people in the world: Those who understand binary and those who don't.

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
8th January, 2010 at 03:31:46 -

I don't know about HWA, but here's anoter way to do it with the overlay and alpha objects.
http://www.mediafire.com/file/ymnnchjydmi/RedExample.rar
>>Left click with the mouse to see the effect<<

It saves 50 images/seconds, wich might seem inefficient, but I tried it with a 320x240 pxls object and still got full frames/seconds. Plus, you should make make it only work when your object's animation changed, not all the time like in this example.

I don't have the time to comment it right now, so if something is unclear, just send me a PM.

Edited by Spitznagl

 
...

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
8th January, 2010 at 13:53:30 -

If I understand you correctly the best thing to use is MMF2's color replacer. It's built in and I use it all the time and it's awesome. Right now I use it for when my guys get diseased so their skin turns green and when they get cured it goes back to normal. Much better than an ink effect that messes with every color in the sprite.

You just go to (I think) animation -> replace color -> and then you give it the exact RGB value for the color you want to replace on your object and the exact RGB values for what you want it to change to. When you do this it'll replace every instance of that color in every single pixel in the whole sprite. Every animation too. It's so helpful!

When you want to change it back again, just do the opposite. There are some minor limitations to using this I've discovered through trial and error and here on the boards: First, replacing colors causes a TINY delay when it happens. It's very small but it's there. Secondly, if you have more than one instance of the same object it'll replace EVERY instance of that object's colors. It can't just change the colors of the one object, it does them all. Even if you use fastloops it doesn't matter. The last thing is that the effect doesn't carry over from frame to frame if you want that, so in that case I usually make an event right at the top of the event list that does it right away.

Also make sure that you just replace the color once (maybe you could turn a flag on or something to prevent it from continuously replacing the object's color). If you by accident have it constantly replacing the colors it'll cause a big slowdown.

I'd try this method out if I were you.

Edited by Del Duio

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

columbo borgi :C



Registered
  07/12/2003
Points
  296

VIP Member
15th January, 2010 at 17:47:36 -

thanks for your replies dudes!
i just wanted to make the object change its color for a while and turn back to nomal without adding an additional animation.
i did not want to add a new animation because the object should stay at the animaion as it is. so while he is walking, he should be walking for a while as red.
it'd work as the blinking while the enemy gets some damge.

 
:C

nim



Registered
  17/05/2002
Points
  7234
16th January, 2010 at 04:02:11 -

Use Del Duio's method, or use HWA (Complex Softwares shader pack -> Hue)

 
//

columbo borgi :C



Registered
  07/12/2003
Points
  296

VIP Member
18th January, 2010 at 01:34:36 -


Originally Posted by nim
Use Del Duio's method, or use HWA (Complex Softwares shader pack -> Hue)



i afraid a bit of that HWA version :C

 
:C
   

Post Reply



 



Advertisement

Worth A Click