scrAlpha

Edits the image_alpha value of the object until it is equal to alpha_val

 Script

///Image Alpha Change
/* changes the alpha to alpha_val over time
to use this apply values to these variables:
alpha = (boolean) 
    enables/disables the script
alpha_val = (double)
    the final alpha value of the object
alpha_dev = (double)
    the rate at which the object goes to alpha_val
*/
if (alpha) {
    var xm = abs(image_alpha - alpha_dev);
    if image_alpha < alpha_val { 
        if (xm >= alpha_val) { 
            image_alpha = alpha_val; alpha = false
        } else {
            image_alpha += alpha_dev 
        }
    } else if image_alpha > alpha_val {
        if (xm <= alpha_val) { 
            image_alpha = alpha_val; alpha = false
        } else {
            image_alpha -= alpha_dev 
        }
    }
    
}