getting a player's name
I want to make a dialogue based game, sort of like Episode but simpler, and my story's fine except for one problem. I don't know how to get the player's name. Is there some way to get input in the Inkle editor? Like I want to set a variable whose value is equal to the player name, then be able to use that variable in a sentence. Can someone please let me know how to do this? Oh, and I'm using Unity in addition to Inkle, but separately.
Hi! One way is getting the input in Unity and sending the name to Ink. From Unity you can set a variable in Ink, or from Ink you can execute an external function to get the name from Unity. I have no experience getting input from the player directly in Ink without using Unity.
in Unity
What if I want a story that doesn't depend on Unity? If there is no text input field supported, a multiple choice selection would be fine with me. But for the purpose of this issue, I think one should be added to the next version of the Ink spec, and implemented in the Inky viewer.
In theory, I could just have a list of choices for the variable. This works if you only ever want to do this once. But what if I want to use this function more than once? There seems to be no way to return from a stitch to a variable divert target. Functions don't allow choices inside them. That would be the easiest way of implementing it.
One way is getting the input in Unity and sending the name to Ink
This answer was ideal for my purposes, very happy to hear it's supported already. It would have helped to have a link on where to read about doing that.. so for new readers here it is: https://github.com/inkle/ink/blob/master/Documentation/RunningYourInk.md#settinggetting-ink-variables
What if I want a story that doesn't depend on Unity?
I think that you would need to write something outside of Ink, but you could use the JavaScript library or one of two Godot plugins available - inkgd looks more recently maintained, for example? I think that basically the Inky GUI is intended for testing your choices, conditions etc and not for running a live game