0 votes
by (130 points)
hi, i want the player to be able to type in the name of the players choice. at 1st i made it work in sugarcube, then i noticed that all the variables was showing and none of them were working, so i tested it in harlowe format, the variables were working in the harlowe format but not the textbox, i've been looking into to this but no matter were i looked i could not find a solution that wouldn't take hours to program in a keybord into the game just for the player to put in a simple name.

i'm new to twine but i'm a fast learner, i'm not seeking any complicated answers. is there a code in harlowe format that lets the player to type in 2-10 letters? if yes, what code is it? and if no, why isn't there such a code in harlowe format? there's such a code in sugarcube so why not in harlowe?

1 Answer

+2 votes
by (159k points)

Please use the Question Tags to state the name and full version number of the Story Format you are using, as answers can vary based on this information.

Neither series of Harlowe (1.x or 2.x) comes with a built-in TextBox (or TextArea) so you are going to have to use code to abuse or hack the relevant story format's engine to achieve the result you want.

If you are using Harlowe 1.x then Allowing users to input correct answers in HTML Text Box thread on the Old Forum Archive contains information on how to abuse the story format's existing functionality do what you want..

If you are using Harlowe 2.x then the A way to have a text box on the page rather than an input box question contains information about a hypothetical Javascript hack you can use to achieve the same result.

why isn't there such a code in harlowe format

Because it's developer hasn't decided  to add it, so if you want such a feature then I strongly suggest you add a request for one on the Issues page of the story format's repository.

made it work in sugarcube, then i noticed that all the variables was showing and none of them were working

Could you explain in more detail what you meant by the "none of them were working" part of the above statement, so we can determine if there is a bug in that story format or if it was just a misunderstanding of how things work.

by (130 points)
thx for the info
...