Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: rizwanash on June 27, 2019, 07:16:00 AM
-
Hey guys,
I have a Tiles Setup like Stack game and i would like to create a color effect like it.
How to create a Color palette like Stack Game in Playmaker. There is a Video on YouTube, He is doing that via this line of code.
(http://bravewarrior.co/wp-content/uploads/2019/06/Screen-Shot-2019-06-27-at-4.12.15-PM.png)
Here is the Video:
Thank you in advance.
-
Hi.
I made action to set the hsv which stands for hue, saturation, Brightness (Volume)
also you can set the alpha if needed.
In the hue you can adjust the color.
You can get that value by doing :
Level Divide by 100 (float divide or float operator)
the use 'Float Modulo' (Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181))
in Dividend you place the result from above and Diviser should be 1
Then use that result in hue.
-
Hey,
Thank you so much for your time, Can i get a little more detail on it, I am new here. How can i adjust the color? Thanks
-
Hi.
You can set the color by using 'Material Set Color'
So first do the actions i mentioned on my earlier post, then you can set that color to the material
-
I have tiles in every level, they are different in numbers, so if i count tiles, it shows in debug how many tiles are in levels but i only get 0 for dividing by 100. I am using Float operator and i am converting Global Int of TilesCount. am i missing some steps here ? Thanks
-
Hi.
Can you show your fsm, states, actions so i can see what the issue is.
Can you try the action 'Convert Int To Float' action instead of converting directly in the action (to see if you have the same result).
-
Hi,
You should cut down the problem in smaller chunck and put it back up when you have each part working on its own.
Make a system can return a color within a defined range, let's say the range is 0 to 10, and a hsv color between say 40 and 80 in Hue ( using HSV actions on the ecosystem is key here, you got that right?)
this means that you need to remap a value ranging from 0 to 10 to a value ranging from ( using the custom action floatremap on the ecosystem)
so 0 ->40 and 10 -> 80
Now, as you change the value ranging from 0 to 10, you should have your hue moving from 40 to 80, and thus you get a color associated with that 0-10 range.
That would be your first step. Once you have that working, you can then use that logic within your game, and you will likely adjust the ranges, but that's already tweaking.
Let me know how you progress on this.
Bye,
Jean
-
Hi Jean, I used a C# Script with a custom shader for that, also djaydino helped with custom actions.
-
Hi,
ok, Cool!
Bye,
Jean
-
Mark this as Solved too.