English Hudtxt change colors

4 replies
Goto Page
To the start Previous 1 Next To the start
05.07.13 02:42:16 am
Up
superpegamento
User
Offline Off
I need that my hud text changes colors automatically

MY HUD:
Code:
1
2
3
4
addhook("second" , "hudtxt")
function hudtxt()
parse('hudtxt 1 "©255252211WT" 10 190')
end
05.07.13 07:55:50 am
Up
Jynxxx
User
Offline Off
Code:
1
2
3
4
5
6
table1 = {255000000, 255255255, 000255000, 255000255}

addhook("second", "hudtxt")
function hudtxt()
     parse('hudtxt 1 "©"..table1[math.random(1,4)].."WT" 10 190')
end


Something like this.
05.07.13 06:35:30 pm
Up
superpegamento
User
Offline Off
user Jynxxx has written:
Code:
1
2
3
4
5
6
table1 = {255000000, 255255255, 000255000, 255000255}

addhook("second", "hudtxt")
function hudtxt()
     parse('hudtxt 1 "©"..table1[math.random(1,4)].."WT" 10 190')
end


Something like this.


the hook fails
06.07.13 03:19:45 am
Up
MikuAuahDark
User
Offline Off
use cs2d cmd hudtxtcolorfade to change the hud color smoothy
use cs2d cmd hudtxt/cs2d cmd hudtxt2 to change the hud color directly
file cs2d LuaJIT for Dedicated Server (13) JIT POWER! | Know your Lua errors! | Part of LÖVE development team since 11.3
06.07.13 04:46:31 am
Up
pbeloto
User
Offline Off
Code:
1
2
3
4
5
6
7
8
addhook("second","_second")
function _second(id)
r = math.random(100,255)
g = math.random(100,255)
b = math.random(100,255)
parse('hudtxt 1 "WT" 10 190 1')
parse('hudtxtcolorfade 0 1 5000 '..r..' '..g..' '..b)
end
To the start Previous 1 Next To the start