It looks like you're new here. If you want to get involved, click one of these buttons!
/* Usage: <<rolldice dice side>> */ macros.add("rolldice", { version : { major : 1, minor : 0, revision : 0 }, handler : function () { var mavar; var dice = this.args[0]; var side = this.args[1]; mavar = random(dice, side * dice); state.active.variables["roll"]=mavar; } });Passage
<<set $roll to null>> <<click "Roll dice">><<rolldice 1 6>><<replace "#dice">><<print $roll>><</replace>><</click>> You roll a: <span id = "dice"><<print $roll>></span> <<rolldice 3 4>> <<print $roll>>
Comments
I have nocited an another bug.
modifications in passage are saved. But not in 'Edit story javascript' and change format is not memorized.
As a example i change macros.add to Macro.add (SugarCube2) if i quit Twine my modifications are not memorized.
Yes. I can verify that, as least some of the time, non-story map changes (e.g. Edit Story JavaScript, Edit Story Stylesheet, Snap to Grid, etc) are not being saved. (issue tracker: issue #155)