Quantcast
Channel: Twine Forum
Viewing all articles
Browse latest Browse all 3830

Using javascript to extend or edit an already existing story without touching the original twee code

$
0
0
by experimenting i have figured out that i can edit variables and make them keep thier value between passages via
$(document).click(function(){

   state.history[0].variables.<variablenamehere>=<value>

});
but i would like to know how deep i can go before i actually need to edit the source code of the story using only JavaScript to create additional passages. The reason i dont want to edit the original story is because this extension is going to be developed separately and im hoping to package it up into something like a javascript bookmarklet that can be run at the beginning of the story to add the extension to it.

Viewing all articles
Browse latest Browse all 3830

Latest Images

Trending Articles



Latest Images