Dynamic Color Changes

RosalinaGalaxer

  • Posts: 239
Is there a way to slowly change the color of a character's hair (not all at once, from the roots out) with the Stencyl engine? I don't see a way to do this with pure animation, as I'd want to do this while the player is running around, so the animations wouldn't flow right.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

merrak

  • *
  • Posts: 2521
You could have the hair be a separate image that overlays the character and unmask parts of the image as the new color fills in the old one. I don't see defining the behavior of the mask to be a trivial task, though. If your character art is lined up right, you could maybe have a circle mask that expands in radius.

At some point getting all of that to work will take longer than just drawing all the frames by hand and hoping your players appreciate the effort that went into the effect.

RosalinaGalaxer

  • Posts: 239
So have the main color be the part of the actual main actor, and then have a second actor that gets revealed as time goes on?

What blocks would that need, just to get me going?
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

merrak

  • *
  • Posts: 2521
So have the main color be the part of the actual main actor, and then have a second actor that gets revealed as time goes on?

What blocks would that need, just to get me going?

I was imagining using the Image API. The hair would have to be an image instance that is attached to the actor. You can then mask/unmask parts of the hair image as the color changes.

RosalinaGalaxer

  • Posts: 239
Is it possible to animate an image instance? That should be possible if you constantly take the image of an animating actor, right?
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

merrak

  • *
  • Posts: 2521
Is it possible to animate an image instance? That should be possible if you constantly take the image of an animating actor, right?

It's possible, but you'll need to handle swapping frames yourself. Taking the image of an animating actor should work. You'll also need to keep an eye on performance, since Image API works in software.