• Flashing Dlabel?
    2 replies, posted
If I where to assign some text to a DLabel could I make the text color flash? If so, how would I go about doing it? I have no idea how you would do it.
-snip- I'm pretty sure you can by using [lua] math.abs(math.sin(CurTime()*5)*255) [/lua] I don't use it very much, but the greater the number you multiply CurTime() by, I believe it speeds up how fast it goes. Without math.abs it will go into negative numbers.
-snip- EDIT: Fixed by doing: [CODE] timer.Create("ChangePanelColor", 0.1, 0, function() local flash = math.abs(math.sin(CurTime()*6)*255) want:SetTextColor(Color(flash, flash, flash)) end) [/CODE]
Sorry, you need to Log In to post a reply to this thread.