I want to figure out how to make a Stat Check function efficiently without having to make a new page every time to do so. Basically, I want a random number generator randomly select a number between 1 and 100. Then I want it to check that to a variable set in the Twine to be compared to that number, and if it's less than the generated number, then it moves you to one passage, If it's not then it goes to another. I want to do this using a JS script, but I don't know how to make "Passage" variables interact with "Script" variables. I also want it to basically be summoned using one passage line of code. Can someone help me?
Comments
Well, you can do this in Twine code by just creating this passage (say, by naming it "summon"): and then invoking it using the shorthand <<display>>: But <<goto>> currently requires installing <<timedgoto>> to use.
You could probably put it in a macro... Then you'd just: The cheat is that it's actually making the check before you click the link so the result of your click is preordained but unknown rather than unresolved.