0 votes

I am trying to do a password system where another node will appear if the length of the lineedit has not reached 8 characters.
What i've done is:

func _on_Sprite2_text_entered(new_text):
var length = len(new_text)
if length < 8:
    get_node("Sprite1").appear()
else:
    pass 

(sprite 1 is the one I want to appear while sprite 2 is the lineedit).

in Engine by (59 points)

1 Answer

0 votes

https://docs.godotengine.org/en/stable/classes/class_canvasitem.html#class-canvasitem-property-visible

    get_node("Sprite1").visible = true
else:
    get_node("Sprite1").visible = false
by (1,667 points)

I tried doing that but nothing would happen. I placed that under the if length < 8:. Is that where it was meant to go? Sorry I'm new at all of this haha

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.