Hey im trying to make a game where based on user input the game gives them a result of perfected, good or incorrect.
In this function I'm trying to change the color of the text based on what is in the text but i really don't know what I'm doing.
extends RichTextLabel
export (Color,RGB) var text_color
func ready():
setmodulate(text_color)
pass
func textcolorchanger():
if "Perfected" in text:
textcolor = Color(0,255,0)
elif "Good" in text:
textcolor = Color(100,200,0)
elif "Incorrect" in text:
textcolor = Color(200,0,0)
pass
func onLineEdittextentered(newtext):
_textcolor_changer()
Also if you can i would also like to know how to make the text fade out couple seconds after it appears?
Thanks guys.