Text object alpha BGE python for fade in/out 2.79
Animate the alpha of GameObject.color

Tested using gamelogic module template, with a mouse sensor on text object. Clicking 10 times makes the text object "fade away".



def main(cont):
    own = cont.owner
    # color vector xyzw  ~ rgba
    own.color.w -= 0.1
    own.text = str(own.color)