Hey
I had some trouble while setting the alpha value of some huds by using the "fadeovertime()" function (sometimes when 2 funcs change the alpha value of a same hud, it kinda "flashes", or become transparent/opaque in a short time), so I made this little one which seems to work fine.
PHP Code:
//call the function like this:
//thread _alphahud(level.hud,true);
//hud = your hud
//show = boolean (true, hud fades to opaque; false, it fades to transparent)
//you can also add a time variable in the function to edit it at your own
_alphahud(hud,show)
{
self endon("disconnect");
for(i=0;i<20;i++)
{
if(show == true)
{
hud.alpha += 0.05;
if(hud.alpha == 1)
break;
}
else
{
hud.alpha -= 0.05;
if(hud.alpha == 0)
break;
}
wait .05;
}
return;
}