How do I make a hue changer for sprites?

Get help using Construct 2

Post » Tue Jun 02, 2015 2:13 pm

Hallo! :)
I have a sprite with many animations, with platformer behavior
I want to make a customization menu but there's a problem:
It would be a bit long to make every animation with different colors so i'm searching for a way that Player chooses a hue color and "Construct" automatically applies the hue to all of the animations.
If it is possible, I want to make a slider for that too, something like Ctrl+U in Photoshop.
B
5
Posts: 18
Reputation: 263

Post » Tue Jun 02, 2015 2:31 pm

Try the "Adjust HSL" effect.
B
18
S
5
Posts: 48
Reputation: 1,136

Post » Tue Jun 02, 2015 2:35 pm

Change the animation of the animation is possible, and yes you can create a slider for that. I found a tutorial for this here in the forum once, if I happen to find it I'll post the link here for you.
However, keep in mind 2 things.
1st, note that changing the HUE of the animation will change the color of the whole sprite, so it's not going to be a good idea if there are parts of the sprite that should remain the same. For instance if you want to change the color only of the shirt of a character, adjusting the HUE won't work. In this cases you will have to go through creating lots of sprites in different colors.
2nd, try and check if the device for which you are developing the game can handle the Fx effect for WebGL, it would be really bad if after all that work the colors couldn't change because of software limitations.
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Tue Jun 02, 2015 2:37 pm

Here: effects-rgbrighter-and-fog_t113014
This might help
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Tue Jun 02, 2015 2:52 pm

Thank for reply
@RayKi I want to apply the effect to the whole sprite and there isn't a part that i want to keep. I want to publish it for web (PC).
And an important question! How can i work with effects? I mean where should i apply them? Should i install them? and ...
Please help me using effects
B
5
Posts: 18
Reputation: 263

Post » Tue Jun 02, 2015 3:39 pm

Well in that case is quite simple. Working with effects works the same way as working with behaviors, you just use the properties menu on the left of the screen to add the effects that you want on your sprite, in your game it would be the "Adjust HSL". And then in the event sheet you create the conditions and events that will change the effect.

add action > select the object you have applied the effect > Under appearance select "Set effect parameter"
The "Index" is 0 for Hue, 1 for saturation, and 2 for luminosity.
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Tue Jun 02, 2015 7:43 pm

Message: Shahriar is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
RayKi wrote:Here:
This might help

Thank you so much
I used that effect but there are 2 problems:
1-Numbers next to the sliders don't change, :|
2-I want to know if there's a way to save changes made, because i've made a customization layout and after i change the color and i go to the main game layout, Construct loads the first sprite and the effects won't be applied
B
5
Posts: 18
Reputation: 263

Post » Wed Jun 03, 2015 9:27 am

Just save the values on a global variable and apply them on the start of every layout
B
17
S
7
Posts: 280
Reputation: 2,522


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests