Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Goto a new passage with JavaScript

Twine 2.0.11 - Harlowe 1.2.2.
I'm using JavaScript to score points in a multiple choice test. I want to go to a PASS passage if the score is high enough and to a FAIL passage if it isn't, and I'm not sure how to use a JavsScript variable to determine which passage to go to. Please help. Thank you in advance.

Comments

  • I forgot to mention: the multiple choice test is composed of radio buttons.
  • edited January 2017
    Neither the released version (v1.2.2) nor the beta version (v2.0.0) of Harlowe currently has a documented Javascript API, and the story format has been deliberately designed to restrict access to it's internal state (variables) and functionality.

    To do what you want you would need to use Javascript Scope Escalation hacks to access Harlowe's State and Engine modules, and there is no guaranty that those hacks would not fail to work in a future version of Harlowe.

    If you are comfortable with the risks involved with bypassing Harlowe's design then you should look at the definition of the setHarloweVariable method used by Furkle Industries Cycling Link.
  • Thanks for the information, greyelf! I appreciate the time you take to help us.
Sign In or Register to comment.