ink icon indicating copy to clipboard operation
ink copied to clipboard

Allowing A Player To Name Their Character

Open egyptthecreator opened this issue 1 year ago • 1 comments

Discussed in https://github.com/inkle/ink/discussions/914

Originally posted by egyptthecreator September 14, 2024 I want to allow a player to pick their name for the duration of a playthrough.

Is there a way to create a text box that flags the player's input as a variable to recall throughout the story?

egyptthecreator avatar Sep 15 '24 02:09 egyptthecreator

premek's answer is the correct one.

The way I'd typically do something like this would be to create an external function (of the "action" variety - i.e., not lookAheadSafe) which then is bound to code that will pop up an edittext dialog. You'll have to stop the story flow, of course.

Once the dialog has been closed, extract the chosen name from the dialog, set the name variable in your Ink story, and then continue processing the story.

michaeloa avatar Sep 28 '24 23:09 michaeloa