Tremulous Forum
Mods => Modding Center => Topic started by: Shifty on November 17, 2010, 04:11:52 am
-
I was looking through some hud files recently and I found that in some huds have this kinda thing:
cvartest cg_whatever
showcvar { 1 }
commented out. Is this used to create cvars such as whether or not to make the radar fullscreen, eg /cg_fullscreenscanner 1 or:
cvartest cg_fullscreenscanner
showcvar { 1 }
?
because I have tried that but it never seems to work for me. Is there something I am doing wrong?
Thanks
-
Create a new cvar
seta cg_cHairColor "1"
for example.
itemDef
{
name "chompers"
rect 312 232 16 16
visible 1
cvartest cg_cHairColor
showCvar { 1 }
decoration
forecolor 1.0 0.0 0.0 0.6
style WINDOW_STYLE_SHADER
background "gfx/2d/crosshair-alien.tga"
}
In this example the item will be shown only if cg_cHairColor equals to 1. There's also hideCvar that does the opposite.
-
Thanks, Ill try that.