Greetings,
I've recently started using Twine 2 Harlowe and I'm having a blast! Such a great engine! But I cannot understand how to make the final feature to my first project.
The thing I'm working on is a deck manipulating assistant. I have several decks of cards, described as arrays with text elements:
These are put into an empty passage and loaded on the first passage with the help of
The cards are usually manipulated this way:
And I move this card to discard pile on click
But sometimes I need to pin the card, so I move it to $pinned array.
So, the question is:
How can I later move any of the elements from $pinned to any discard array?
I can show all the elements of $pinned, but how can I make a click button for each of these elements, so that I can move one of them to another array? I was thinking of trying to make some sort of a loop for $pinned's length, but not sure how to and whether it is worth it.
Thank you in advance!
I've recently started using Twine 2 Harlowe and I'm having a blast! Such a great engine! But I cannot understand how to make the final feature to my first project.
The thing I'm working on is a deck manipulating assistant. I have several decks of cards, described as arrays with text elements:
(set: $deck1 to (a: "cardtext1","cardtext2"...) (set: $deck2 to (a: "cardtext1","cardtext2"...) (set: $deck3 to (a: "cardtext1","cardtext2"...)
These are put into an empty passage and loaded on the first passage with the help of
(display: "passagewitharrays")
The cards are usually manipulated this way:
(set: $t to (either:...$deck1)) (set: $deck1 to $deck1 - (a: $t)) (print: $t)
And I move this card to discard pile on click
(set: $discardofdeck1 to $discardofdeck1 + (a: $t))
But sometimes I need to pin the card, so I move it to $pinned array.
So, the question is:
How can I later move any of the elements from $pinned to any discard array?
I can show all the elements of $pinned, but how can I make a click button for each of these elements, so that I can move one of them to another array? I was thinking of trying to make some sort of a loop for $pinned's length, but not sure how to and whether it is worth it.
Thank you in advance!