Archeia

twine

Nov 28th, 2017
181
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Javascript:
  2. if (typeof window.CustomScripts == "undefined") {
  3.     window.CustomScripts = {
  4.         updateVariable(inputName) {
  5.             // Get the value from the input textbox at time of click.
  6.             var value = $("input[name='" + inputName + "']")[0].value;
  7.             // Update the variable.
  8.             State.variables[inputName] = value;
  9.         }
  10.     };
  11. };
  12.  
  13. Passage Code:
  14.  
  15.  
  16. "What is your name?"
  17.  
  18. "My name is...
  19. (set: $fname to "")
  20. <input type="text" name="fname" value="">
  21. <button type="submit" onclick="CustomScripts.updateVariable('fname')">yes...that is my name...</button>"
  22.  
  23.  
  24.  
  25. (if: $fname is not "")[[Proceed->Act 0: Class Select]]
RAW Paste Data