0 votes
by (120 points)
I'm trying to make my story aesthetically appealing and the prompt I'm using just isn't nice looking.
I'm making this game for a class assignment and there are a few of us trying to figure this out, so help is greatly appreciated

 

this is my current code:

(set: $name to (prompt: "Enter your name:", ""))
 

I'd really like to get it to just be a text box on the first screen

 

thanks in advance

1 Answer

0 votes
by (159k points)

Harlowe's developer has deliberately designed the story format so that it restricts access to it's engine's internal workings, and they have decided not to implement a JavaScript API for the story format.

Both of these decisions make it difficult to extend the story format's core functionality, like implementing a Text Field (HTML input element) that persists it's value to a story variable, without resorting to using JavaScript to hack into the story format's engine to gain access to it's internals.

This question has been asked a number of times before and I encourage you (and the others) to visit Harlowe project's Issues page to add your votes (and comments) to the existing embedding text boxes as an alternative to (prompt:) issue. Hopefully this may result in more input related macros being added to the story format.

note: there is a hypothetical thought exercise in the A way to have a text box on the page rather than an input box? question which contains more information about this topic.

...