So I'm working on colors and titles in my scoreboard and I was curious as to how I could add rainbow text effects, pulsing colors, and stuff such as that. I've been super eager to learn this but never thought to ask here, I just searched google. So yeah, how do I add effects to make rainbow or pulsing color effects.
You might find [URL="https://github.com/Mysterypancake1/GMod-Rainbows/blob/master/rainbow.lua#L48-L61"]this helpful[/URL]
[editline]21st July 2016[/editline]
Unless you're trying to do DLabel coloring or something like that- if you want a DLabel to cycle through every color then in the DLabel's [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/PANEL/Think]PANEL:Think[/url] function you could try [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/DLabel/SetTextColor]DLabel:SetTextColor[/url] with the color being [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Global/HSVToColor]HSVToColor[/url] with the saturation and value set at 1 and the hue being different depending on the time
E.G.
[CODE]
function somelabel:Think()
self:SetTextColor( HSVToColor( RealTime() * 5 % 360, 1, 1 ) ) -- make the 5 a bigger number for faster color changing
end
[/CODE]
[editline]21st July 2016[/editline]
But if you want each of the DLabel's letters to be a different color or something then you'll either have to create a different one for each letter or just use the DrawRainbowText function I linked before
I'll try it, thank you!
Sorry, you need to Log In to post a reply to this thread.