First, have you checked if SelectionTexture is != NULL? Second, are width and height valid (>0)? Third, is LMode valid? Fourth, alpha has to be between 0 and 100, as Hummel said. I guess you want a half translucent pixel, so use 50. Fifth, are AX and AY inside the bounds of the bitmap, as Superku said?

I would at least try the following to make sure that it doesn't crash the program:

Code:
BMAP* SelectionTexture = bmap_createblack(width, height, 8888);
if (SelectionTexture != NULL)
{
    var LMode = bmap_lock(SelectionTexture, 0);
    if (LMode > 0)
    {
        var LPixel = pixel_for_vec(vector(255, 0, 0), 50, LMode);
        pixel_to_bmap(AX, AY, SelectionTexture, LPixel);
        
        bmap_unlock(SelectionTexture);
    }
}



Originally Posted By: Hummel
Doesn't GS always use values in the range [0..100] for alpha? (which is kinda stupid if you ask me)
I find it very intuitive, if you ask me, since 100% means "fully opaque"... in all Corel products, it is vice versa, they take 100% for "completely translucent" and whenever I type in alpha values, I mess up with those. Anyways, it would be cooler if Gamestudio would take 0...1, because it reensembles the alpha blending factor. But that would be counter intuitive again and everything would have to be changed, too.

Last edited by HeelX; 08/19/12 08:51.