When making an image in the GIMP 2.2.7, with TGA alpha channel, when I set the object's alpha at 50, it, for some odd reason, was 100% visible. My script (part of it):
Code:
panel flare2
{
layer = 28;
alpha = 25; // 50% transparent for some reason
flags = transparent;
}
The bmap is set through a function and the bmap is a TGA file with alpha channel. The same thing also occurs with text using fonts that have alpha channel:
Code:
text beta_version_markers
{
pos_x = 192;
pos_y = 0;
layer = 35;
font = digital_octagon_bold_double;
string = "BETA - VERSION 1\nBETA - VERSION 1";
flags = visible, transparent;
alpha = 25; // 50% transparent for some reason
}
How do I know that an alpha of 25 is actually 50 and that 50 is fully transparent? Try using a black background and a white bmap and set the alpha accordingly. Take a screenshot (using the print screen key as using F6, because of the JPG stuff, will mess it up) of it. 50 has the bmap's color as very close to 255 for the r, g, and b colors. Using 25 gets you closer to 128 for r, g, and b. Normally, 50 should use 128 and 25 should use 64.
To reproduce:
1. Create an image, with alpha channel that is all white and fully visible and of substantial size (like 256x256).
2. Write a script to make the bmap transparent and set the alpha to 50.
3. Run the engine in windowed mode (full screen may cause problems) and take a screenshot using the prtscr key to the right of the F12 key.
4. Open MSPaint and paste the screenshot in there.
5. Use the eye dropper tool and select the white.
6. Set the alpha in the script to 25 and repeat steps 3 to 5.
7. Set the alpha to other values as you please.
8. Create another image, without alpha channel that is all white and repeat steps 2 though 7. This time, alpha works like it should.