The Daily Click ::. Forums ::. Klik Coding Help ::. Individually replace color??
 

Post Reply  Post Oekaki 
 

Posted By Message

Solgryn

Solgryn dot org

Registered
  20/12/2008
Points
  12572

GOTW Winner!VIP MemberWii OwnerIt's-a me, Mario!The Cake is a LieGOTM 2ND PLACE! - APRIL 2009GOTM 2ND PLACE - JUNE 2009PS3 OwnerKlikCast #15 Compo Winner!LOL Sign
You've Been Circy'd!GOTM WINNER - JANUARY 2010I am an April FoolGOTW MARCH 2010 WINNER!Santa Hat
3rd February, 2010 at 16:24:47 -

Are there any ways to individually replace the color of the same active? Like if its on layer 1 it's blue and if its layer 2 it's red?

I tried with loops, but the active>replace color can't be set individually.. Any extension??

 
www.Solgryn.org

Image

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
3rd February, 2010 at 17:10:47 -

I think maybe using a pixel shader it might be possible, depending on exactly what it is you are trying to do.
There are no extensions for it that I know of.

 
n/a

Solgryn

Solgryn dot org

Registered
  20/12/2008
Points
  12572

GOTW Winner!VIP MemberWii OwnerIt's-a me, Mario!The Cake is a LieGOTM 2ND PLACE! - APRIL 2009GOTM 2ND PLACE - JUNE 2009PS3 OwnerKlikCast #15 Compo Winner!LOL Sign
You've Been Circy'd!GOTM WINNER - JANUARY 2010I am an April FoolGOTW MARCH 2010 WINNER!Santa Hat
3rd February, 2010 at 21:05:57 -

I am trying to have the same active object have different colors when on different layers.. I have multiple of this object. For example a spike on each layer.

I'm not using HWA

 
www.Solgryn.org

Image

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
5th February, 2010 at 16:54:22 -


Originally Posted by Solgryn
I am trying to have the same active object have different colors when on different layers.. I have multiple of this object. For example a spike on each layer.

I'm not using HWA



I believe the answer is no. I tried doing something before where when one monster was affected by something it had a certain color changed but even with fastloops and sorcery ALL of the similar copies of the object's color were changed.

If you can find a way to do it, let us know though!

 
--

"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!

Xgoff



Registered
  22/02/2009
Points
  135
5th February, 2010 at 18:12:47 -

duplicate objects all share the same image set

replace color makes modifications to that set, and in fact it would be a bug if you found a way to do this on a per-instance basis

so no, you can't, unless you have duplicated animations and have objects on layer 1 use animation 1 and objects on layer 2 use animation 2 (which itself is limited). shaders could solve this to an extent but this depends on how many colors you need to change, as when writing a shader you have to determine ahead of time how many colors you need to change.

something like this could be possible if attempts to modify one of an instance's animation frame actually copied that frame into a local store for the object instance; it would use a local version of a given frame instead of the shared version, if it existed. that has the potential of being somewhat slow though, especially if they were huge sprites. there would also still need to be actions to modify the main bank if you DID want to change a frame for all instances, since if you think copying a frame could be slow for one object...

... this is kinda why i'm behind mmf3 being rewritten from scratch and making data global to all frames by default. so in effect, active object image banks wouldn't have to be tied to just one active object "class", and during runtime they could switch between banks

 
Image
   

Post Reply



 



Advertisement

Worth A Click