View Single Post
Author Message
NatalyaAF
Senior Member
Join Date: Dec 2008
Old 05-17-2010 , 09:43   Changing Sprite Alpha in-Game
Reply With Quote #1

I'm trying to get a car's brake lights get brighter when the player presses the brakes. It detects when the player is hitting the brakes or not which is good. Problem is I don't know how to make the sprites brighter or not.

Here is the code trying to make them brighter:

PHP Code:
        new car_index g_CarIndex[car];
        new 
max g_CarLightQuantity[car_index];
        if (
max 0)
        {
            new 
buffer 0;
            
decl light;
            do
            {
                
light g_CarLights[car_index][buffer];
                
SetVariantString("255");
                
AcceptEntityInput(light"Alpha"lightlight0);
                
buffer += 1;
            } while (
buffer max);
        } 
I can't get the alpha to go up to 255. (They spawn at only 100.) I can get them to turn off when the player exits the car, but I can't change their brightness.
NatalyaAF is offline