I'm using the adventures format from github that I found here and from what I've read so far I can't find an answer to my question but it's also a little specific so I didn't really expect to find it.
I'm using the changing player's name with a html text box and I was wondering if it was possible for the second passage to react to the input depending on whether or not the player actually put in a name. I want it to say something like "if you won't give your name I'll assign one to you".
I think the best way would to be using an if true statement like 'if ==' but I just don't know what I'd put after that.
my code for the first passage works and it is thus
<%story.config.displayCharacterPanel = false;%>
[... story text ...]
<input onchange="character.name = this.value">
[[Give your name|001]]
I put vvv in the second passage to see if it would work but it did not, so I'm wondering what a competent person would suggest for this.
<% if (character.name = this.value == "") {
%> [input response for blank input box] <%
} %>
I also want it to show the chosen name (if the player leaves the box blank) in the little character panel but if it's left blank the panel will be blank as well.
Alternatively, how would I go about making it show one response for a lack of input and something else for input. An if else statement? That's what I'm thinking but I don't entirely know.
If <%= character.name %> is used even when there's no input it'll show the default name but the panel will still be blank so there's something wrong there there. Edit: turns out even with input the name still doesn't show up on the character panel but it does change the default name when printing it to screen, so that's wonky. I was apparently setting it to blank >.> my bad
Also, as a side question, I understand that this format is based off of snowman and I was wondering if someone can link me to its documentation? I'm pretty shiznit with javascript and all that jazz so I was looking for the macros and shiz with example usage but I can't really figure out how to and github is like a giant maze for me in general so trying to figure out snowman's github is like two pegs worse. I just want examples of what I can do with it all to supplement adventure's documentation which is very thin.