Twine Lists

Twine Version: 2.3.14
Story Format: Harlowe

Wondering if it’s possible to have a table of buttons, each with its own value, that when clicked, adds/removes the value to a variable (each value in a list separated by commas).

You could use an Array variable to store the list of “things”, a link to add each thing to that list, and a Named Hook combined with the (rerun:) macro to output the ‘current’ contents of that variable.

(set: $list to (a:))\
Current List: [(print: (joined: ",", ...$list))]<list|

(link-repeat: "Add Apple to List")[{
	(set: $list to it + (a: "Apple"))
	(rerun: ?list)
}]
(link-repeat: "Add Banana to List")[{
	(set: $list to it + (a: "Banana"))
	(rerun: ?list)
}]

see: (set:), (a:), (link-repeat:), Named Hook, (rerun:), (joined:), and (print:).