How do I change color using the engine?

0 favourites
  • 2 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • Like on this asset, is there a way to use the engine to change the color blue to another color like, green, red, yellow, etc (Only the color blue though)

    gyazo.com/f4f4da702b40d680b63b5d7737292cd9

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The easiest way to accomplish that, would be to import the image as a Sprite Object. Then make multiple frames of the Sprite Object and use the bucket tool to fill in the Blue areas with other colors. Then untick the Loop option, so the animation does not play/loop. Along with setting the animation speed to 0, so the animation will not play at all.

    Then in the events, set the corresponding Animation frame you want in each scenario, using the "Set frame" Event. For example, if frame three of the Sprite Object is the image with Yellow where the Blue currently is. Then just use Set Frame, and put 3 as the value for the frame.

    You can change it using an effect filter as well. If you wanted to get real fancy. You could separate the blue section, then create two separate sprites, with the blue section layered on top of the other. Maybe using an event to set it as a child, or simple pin it to the sprite layered below it?

    Then add the Tint Effect to the sprite on top, containing the blue sections. Then use Events in the event sheet to manipulate the Tint values to whatever colors you want, when certain conditions are met in game.

    There are always many ways to accomplish one single idea. Depends on if you want to keep it simple, or complicate it. I usually go the simple route, unless it's something that really has need to be something more complex.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)