Hello! I'm ecstatic to have found Twine! I am
very inexperienced when it comes to JavaScript and HTML, but I've fond that they provide me with the widest range of customization options. I was able to quickly format the story layout (font, text size, margins, alignment, etc) by modifying the stylesheet found while using Snowman 1.1.
I've been using this code to set the name variable in the 'starting point' passage.
<%var character_name = prompt("Enter Your Character's Name");%>
I'd like to use variables that allow the player to set their own character name for the duration of the game. For example, if the variable was 'character_name' and the player typed Steve' as their character's name. All the 'character_name' text would be replaced.
JavaScript text would read. "Hello, 'character_name'."
The player then inputs 'Steve' into the text box.
CYOA text then reads. "Hello, Steve."
Comments
Set the name: Reference the name:
As small aside. Snowman uses _.template(), so you have three different template hooks you can use within normal passages (not Story JavaScript). For example: