How would you get the player's name, that they typed, and store it to be used later on in dialogue.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Webber

Okay, having trouble getting the code down for this one. I don’t know too much about working with storing stuff like this. Here’s a nice example to explain what I mean:

Player types in their name: Bob
The game replies: Hello, Bob.
The game then says: How are you doing, Bob?

So basically able to save and reuse the entered name.

:bust_in_silhouette: Reply From: wakry

Look for global variables. basically they are variables that can be accessed in any script. so let’s say you have a global variable named “PlayerName” then in the script where you create this dialog you keep calling it.

also Singletons might be another way of doing it Singletons (Autoload) — Godot Engine (stable) documentation in English