How to allow the player to rename their character? #875
-
Is there a built in way to do this or do I need to create a new scene with a LineEdit node? Is it possible to make any character's name a variable instead? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
You would need to build your own input UI to capture user input like that. And you can make a Dialogic definition to store that result in and use the definition anywhere in Dialogic. In addition there seems to be a bug if you're using the DialogNode directly rather than instantiating it via code (Dialogic.start(timeline_name)). So be sure to start the Dialog via code!~! |
Beta Was this translation helpful? Give feedback.
-
Okay so I have a problem. Once I set the variable it doesn't change. For example. I have [MCName] set to John at the beginning. I then ask the player to rename the character. I change_scene to new node that has a LineEdit function. When the text is entered I'm calling:
But when [MCName] speaks, it is still set to John. |
Beta Was this translation helpful? Give feedback.
-
Removing the answered tag since the solution doesn't actually work. |
Beta Was this translation helpful? Give feedback.
-
Okay I figured out the issue. My code was working well, but you can't call Dialogic from the Dialogic node if you change the variables. Calling it from code works fine. |
Beta Was this translation helpful? Give feedback.
You would need to build your own input UI to capture user input like that.
And you can make a Dialogic definition to store that result in and use the definition anywhere in Dialogic.
In addition there seems to be a bug if you're using the DialogNode directly rather than instantiating it via code (Dialogic.start(timeline_name)). So be sure to start the Dialog via code!~!