0 votes

Hello. I want to make something like:

1- You write a text in "LineEdit" node and press enter,
2- Then the text you've written appears at the bottom, on the "Label" node (i guess) with different letters.

For example let's say that you write "allegory". When you press enter, it will be shown as "@ll£g0ry".

I know it sounds stupid but that's the main piece of the actual idea :)

But I can't even transfer the text yet. Changing letters is the second part. Can you guys help me with that?

asked Oct 19, 2019 in Engine by cilginosman (12 points)

To have the text from one node go to another node, reference one node from an attached script, and use signals where necessary.

For example, a script attached to a LineEdit node, with a Label node and a regular Button node:

var text
# The Label node
var label = $Label

# This is an emitted signal from the Button
func _on_Button_pressed():
      text = change_text (get_text())
      label.set_text(text)

The Button signal can be set from the Inspector.

Please log in or register to answer this question.

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.