I'm working on a Twine comic. When I was doing linear-narrative tests, I got a lot of success out of Leon's replace macros; it's been good for advancing from panel to panel on the same page, as well as nifty multi-stage panel effects. But it's time to figure out how to get choice in there, so I'm migrating fully over to SugarCube. I've run into a couple problems and was wondering if I could get some help.(If you want an idea of the basic functionality I'm working with, and what I have functioning in SugarCane, here's an example (downloadable from my dropbox, since it's a little too big to attach to the post): https://www.dropbox.com/s/h2mp77q7aruw2da/kbd-sugarcube.html?dl=0. As a structural note: each panel is its own passage, they do whatever they do <<replacelink>>-wise and then <<display>> the next panel where it needs to go.)
The main issue I was hoping SugarCube could fix is this: there are times I'd want to provide the player with a panel containing a few options of what to click on; this would change what panels are shown subsequently, add panels somewhere else on the page, things like that. I was really jazzed about using SugarCube's <<click>> macro, until I realized it only takes text as arguments and only outputs links with straight text insideso my pipe dreams of <<click [img[image]]>>, <<click "[img[image]">, and <<click "<img src='www.internet.biz/image.gif' /"> are all moot. I'd really like to find some way of working around that limitation.
A key aspect of this functionality is that once the choice is clicked it needs to remove itself, or itself and the other choicesthat part I mostly figured out, with <<click>>s that destroy themselves by replacing the <div> they live inside. But again, click's a no-go. I felt pretty clever at fixing that particular contingency with
<div id="choices"><<replacelink>>[img[choice-a]]<<becomes>><<replace "#choices">><<display panel-a1>><</replace>><</replacelink>></div>
Sohere is my wishful idea of how it works:
<<click [img[choice-a]>><<replace "#choices">><<display panel-a-p1>><</replace>><</click>>
<<click [img[choice-b]>><<replace "#choices">><<display panel-b-p1>><</replace>><</click>>
<<click [img[choice-c]>><<replace "#choices">><<display panel-c-p1>><</replace>><</click>>
I feel kinda cruddy for a "here's an abstract problem with a probably esoteric solution" sort of post, but I've hit a wall and felt like reaching out. Let me know if I haven't explained myself well.