Howdy, Stranger!

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

[noob] Accessing twine variables from javascript

Hi, I'm a Twine noob tinkering with Twine 1.4.

So I'm trying to set a value in a Script node using a prerender method, and then want to access that as a variable from a Twine passage <<print $whatever>>.

It looks like setting state.history[0].variables["whatever"]="something" will set $whatever to "something". Is this how it works? Or is there some other mechanics for sharing data between "pure" js and twine?

I'm just shooting from the hip here.

Sign In or Register to comment.