About 'LineEdit - Text From The Player'!

In this video (objectives)…

1 Create a LineEdit Node 2 Create a TextureButton Node 3 Connect Signals 4 Move between functions

After watching (learning outcomes)…

Take the player's input and change the displayed text to match it.

(Unique Video Reference: 4_LL_GDT)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

Hi there!

Curious about the methodology for getting the variable from the text box to the story text.

Best practices and all that, but I was fiddling about trying to figure out a more direct way to get the properties assigned, and as it turns out

$Blackboard/StoryText.text = $Blackboard/TextBox.text

Will do the trick.

Likewise,

_on_TextBox_text_entered($Blackboard/TextBox.text)

For the the button works quite well as well. So, rather than invoking the get_text() method, a direct assignment of the active property works just fine.

Was it to introduce the idea of member functions or something? Just curious about the methodology.

And Yann, I love your sense of humor. It’s making the videos quite enjoyable.

1 Like

It was partly to introduce member functions, yeah. And it was partly a way of making sure that it was as readable as possible so that people who weren’t comfortable with coding yet might have an easier time understanding what they were doing.

Glad you’re enjoying the course! :smiley:

1 Like

I don’t even see the “get_text” function in the editor?
Just using TextBox.text worked fine though.
Godot v 3.0.6

Privacy & Terms