How to Change and Store Player Name And Call it in text
Posted: Sun Dec 25, 2022 7:42 am
Hello, sorry for asking this as I feel like this is a rather simple question. I'm trying to create a visual novel and it seems like i'm getting stuck right at the start. I've watched the tutorials and googled around for an answer, but I can't find anything solid to implement in my code. I'm trying to give the player an opportunity at the start of the game to enter in a name (I'm using a text input sequence within a line of dialogue)
This is what my dialogue entry for this line looks like, with the text input sequence and the script.
I'm unsure if how I have it currently formatted is working or not since I can't see what the player name is in runtime. In addition to this, I'm hoping that I can call the player name in the following message and have it change depending on what the user inputs, but I don't know how to go about doing that. And will I need to save this input name to some secondary script or variable to make it persistent or will this keep it permanently updated? If anyone could provide insight I would greatly appreciate it, sorry for the nooby question, but thanks for your time.
This is what my dialogue entry for this line looks like, with the text input sequence and the script.
I'm unsure if how I have it currently formatted is working or not since I can't see what the player name is in runtime. In addition to this, I'm hoping that I can call the player name in the following message and have it change depending on what the user inputs, but I don't know how to go about doing that. And will I need to save this input name to some secondary script or variable to make it persistent or will this keep it permanently updated? If anyone could provide insight I would greatly appreciate it, sorry for the nooby question, but thanks for your time.