+2 votes
by (690 points)
I want a player to type their own name, but all I can figure out is adding a digital 'keyboard" out of many passages and links. I've played Twine stories that have a place for you to type your name, so I know it's possible.

2 Answers

0 votes
by (159k points)

Harlowe has no built-in support for allowing a player to enter information into text input field and unfortunately the csalzman's text input hack mentioned in this comment on the old forum no longer works with recent version of Harlowe 2. This story format also has no documented Javascript API so there is no official way to use Javascript to update a Harlowe 2 story variable using Javascript.

You could try using the (prompt:) macro.

by (690 points)
thanks anyways... :(
by (560 points)

Greyelf is right, (prompt:) is the way to go.

(set: $name to (prompt: "Your name is...", "Casper the friendly ghost"))

 

0 votes
by (270 points)

Did you check this video by Dan Cox? 

https://www.youtube.com/watch?v=MvMmcccZytY

He mentions the (prompt: ) macro but also modal windows. Maybe it can be useful.

...