Trying to make a password type input #95
-
I'm still getting the hang of Squiffy and I'm still trying to learn and add new things to my future games. My current issue is that, I'm trying to adapt a text field for changing a character name to be a password type input without making it bulky. The following is a snippet of what I'm working with.
When ran, and the right "password" is input, it opens a new section that isn't what is specified. I don't know if I'm missing something or just doing it completely wrong. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hello, If Change if (squiffy.get("Q1") == 'Sandman') squiffy.story.go("Section 2") For testing purposes, I added a message to the "Query" section to print something when the password didn't match. <p><input type="text" style="text-transform: capitalize; color: black" id="Alpha" size="15"><br> [[Enter]](JS 1)</p>
[[JS 1]]:
squiffy.set("Q1", jQuery("#Alpha").val().replace(/^\w|\s\w/g, function(t) { return t.toUpperCase() })); squiffy.story.go("Query");
[[Query]]:
if (squiffy.get("Q1") == 'Sandman') squiffy.story.go("Section 2")
This will print if Q1 doesn't match the password.
[[Section 2]]:
@clear
Section Showing PS I notice |
Beta Was this translation helpful? Give feedback.
Okay, I had time to test things, and it looks like this is all you need to include the "onkeyup" part: