Alpha doesn't work

Posted By: Roy

Alpha doesn't work - 06/01/10 17:36

Hello,

I've just written the simplest of functions, and it doesn't work...
I was trying to create a window with an alpha channel. The window is a sprite.
The action is:

action env_Glass01()
{
set(me, TRANSLUCENT);
my.alpha = 50;
}

This works, but as soon as I set the alpha below 50, the window becomes invisible. All values higher than 50 work fine.
Does anyone know how this is possible?

Thanks,
Roy

PS. I have version 7.84
Posted By: Widi

Re: Alpha doesn't work - 06/01/10 17:40

What do you mean with "window"? You dont can add a action to a "window".
You use panels or you mean the enginewindow?
Posted By: Roy

Re: Alpha doesn't work - 06/01/10 17:42

I mean a window, like in a house.
It's a transparent glass plate, through which you can look wink

Posted By: Quad

Re: Alpha doesn't work - 06/01/10 17:43

he means window as in building windows grin

check d3d_alpharef from the manual
Posted By: Liamissimo

Re: Alpha doesn't work - 06/01/10 17:43

I think it is an action attached to an entity like a glass or?
maybe u just cant see it below 50?
Posted By: Roy

Re: Alpha doesn't work - 06/01/10 17:47

Thanks Quadraxas, it works!
By setting that variable to 0, I can use every alpha value.
Isn't it somewhat strange that d3d_alpharef is by default set to 270? Does it have a reason?
Posted By: h34dl4g

Re: Alpha doesn't work - 06/02/10 16:56

Originally Posted By: Roy

Isn't it somewhat strange that d3d_alpharef is by default set to 270? Does it have a reason?


Default 270?
Its default is 128 i think, since its only possible between 0 and 255.
Why 128? Because its just the middle^^
© 2024 lite-C Forums