I’m trying to make a game with lights that slowly change colors like RGB lights you see in a gamer’s room. But I can’t find any tutorial on how to do it. Does anyone know how to do it?
IDK about lights but i know about color
You use color conversion extension
https://wiki.gdevelop.io/gdevelop5/extensions/color-conversion/
To convert RGB to HSL
Hue Saturation Lightness
I do not remember exactly but its easy to check
Saturation you need at 100
Lightness at 50 or 100 but lets assume 50
And Hue can be anything from 0 to 360
So H 360 S 100 L 50
Now instead of 360 you put there some number variable lets call it HuVar from Hue Variable
And now you change somethings color to
ColorConversion::HslToRgb(HuVar, 100, 50)
In separate event you add 2 actions
Change variable HuVar add 1
Change variable HuVar set to mod(HuVar,360)
And now it will cycle trough all colors