Hello, I have a question!
I have two scenes - CharacterCreation.tscn and Game.tscn
In CharacterCreation.tscn I have a LineEdit for input nickname, there is it's code:
extends LineEdit
var Name = "PLAYER"
func ready() -> void:
grabfocus()
connect("textentered", self, "ontextentered")
func onNameInputtextentered(newtext):
Name = newtext
I send this script in autoloading and name it - PlayerNameNODE
In Game.tscn I have a label and there must be player name:
func _ready():
print("Your name is - ", PlayerNameNODE.Name)
But when I'm trying to get varibale from script it takes name from this string
var Name = "PLAYER"
So the name always is "PLAYER", no matter what actual player input.