Howdy, Stranger!

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

Appending functions/objects to Twine

I've got a handful of JS functions/objects that I want to be able to easily access in both authoring passages and from the JavaScript console. Currently I'm kind of hacking things by tacking stuff onto the Tale object, but this seems not great, both for organizational reasons and for having to prepend everything with tale.*.

Is there a good way of going about this that I'm overlooking? Is this getting into the territory of creating my own version of engine.js?

Comments

  • if you create objects in the story javascript as window.* then you can access them anywhere without using any prefix. That's about as far as I know.
Sign In or Register to comment.