Hello. I'm using Twine to make some study aids for my students, and I'm stuck trying to make something that allows students to put a series of images in any order they like. A friend has told me it's madness to try this project in Twine, and I should use Javascript instead. But I know the basics of the former and not the latter, and the semester's starting soon!
So here's basically what I am trying to accomplish.
The user will be presented with six images:
[X] [Y] [Z] [A] [D] [C]
and then asked to choose the image that seems like the best beginning of a narrative. "Make a story," that sort of thing. So if the user clicks [A] I need two things to happen:
1: [A] is stored as a variable, $first for ease of reference. So $first = [A]
2: [A] is removed from the screen, so only five options are left.
Repeat until user has chosen all six cards.
The problems I'm running into are varied, but seem (to me) to hinge on the choices being images. Since it's a visual exercise, I really do need the images at every stage. I've looked into using arrays, but I can't figure out how to get the information in the arrays to be tied to the particular images without a bunch of <<if>> statements so complicated I... might as well do what I started to do (you don't want to know how awful/complicated/terrible my first attempt was, I promise you).
At this point I'm open to pretty much anything that would simplify matters for me. I have a bunch of other projects I want to do before the semester starts as well, hence my reluctance to start learning Javascript from scratch (something I'm intending to do, but I'd rather not have a project with a deadline rely on my learning everything in time).
Just tell me if I've left out any important information, too.
Comments
[list type=decimal]
What header (story format) are you using?
Are you using image passages (embedded images) or external images?
Are you using image passages (embedded images) or external images?
1: It should be in Sugarcane for now. I don't really have any preferences for the format for this one (I usually use Jonah, but opted not to this time because of the past pages being just a scroll away).
2: I have embedded image passages I'm using.
Let me know if you have any issues or questions.
That is, I'm asking the "player" (student) to make a story using six tarot cards, so in my first iteration I had $first = "fool". Now I have $fool = 1 instead. That let me use if statements to only display cards in the selection screens if they == 0 (which I set in the start screen). If they've been selected they must be a non-zero number.
I want to look at what you did, though, because I need to learn how to handle arrays despite this having worked out.
Here's a link to what I did, though: http://www.philome.la/cuchlann/tarot-ordering-test1 (I put them up on my philomela so my friends can test them out as well.
Here's my .tws as well if anyone wants to see how it went. It looks like brute force repetitive crap [well, I guess it was], but it took almost no time at all to make once I figured it out). https://www.dropbox.com/s/n5t9ntvt41s9e1j/tarot_ordering2.tws