write name of character in variable

can i do this? what is the metod?
can i save variable in external file?

One way to get a text from the user is too use the Text entry object : Put it on the scene ( it is invisible but you still need to put it on the scene ), then when you want the player to give a name, activate it using the associated action. When the player has finished ( For example, when he press Enter ), deactivate the Text entry object with another action, and you can get the text written by the player using the expression TextEntreObject.GetString() ( In general, uses a text editor to look at all the expressions provided by an object or an extension ).

There is a small example showing how to use the Text Entry object.

Yes, uses actions in the “XML files” category.

i try , but my file is similar to example, but my file and example not go, in the example if i write , the text modify in base to write, but not go

Maybe it is related to a bug ( which only occurs on Linux in the editor ).
Can you compile your game and try if it is still not working?

yes i have compiled and work, i try on ubuntu later, now i have use debian
yes i try on ubuntu the bug is present

I’d love to expand a bit on this one if you don’t mind.

I’m attempting to get input from the user and then store that in a global variable which later can be printed out in another scene.

To be fair, I’m not even able to print it out in the same scene, so I guess there’s something wrong with the way I’m attempting to store the value.

I can print it out in the same scene using:

Do=Name.String() to the text of Output

Where Name is my Text Entry Object and Output is my Text Object.

However, when I try something like this:

Do=Name.String() to the text of global variable UserName


Do=GlobalVariableString(UserName) to the text of PlayerName

where UserName is my global variable and PlayerName is the text object I want to write to, I only get “0” printed.

Any thoughts?

First, you can try to open the debugger to see if the variable UserName has a correct value or not. If the value is correct, then the problem is in the last action. Otherwise, the action changing the text of the UserName global variable is faulty. :slight_smile:

Thanks, I was just using some conditions that didn’t really make any sense. It’s always something simple that cause problems :slight_smile:

For future reference, if someone wants to capture the user input in one scene and use it in another, something like the below will work fine.