Still planning my October game. Writing it in Twine. Here are my notes on arrays in Twine:
(a: "gold", "frankincense", "myrrh") or alternatively, more readable:
You can also set it to randomly determine the order using shuffle.
(set: $a to (a: 1,2,3,4,5,6))
(print: (shuffled: ...$a))
You can also set it to rotate through the set.
(rotated: 1, 'A','B','C','D') is equal to (a: 'D','A','B','C').
You can adjust the number: (rotated: -2, etc etc etc)
You can pull values out of an array so that they can't be used again by using this structure:
(move: $a's 1st into $variable)
More info: https://twine2.neocities.org/1.html#type_array and https://twine2.neocities.org/1.html#type_dataset
And here’s my notes on how I’m using them:
Main room. Boolean for whether a task is complete, four total. Visually represent it by selecting the correct image and displaying that for the player. Select a task that has yet to be completed. Takes you to the task screen/image, and after ten repetitions, back to main room with the task now blue instead of red. When all tasks are completed, sleep.
Sleep. Randomly generated story beat. Replenish sets and reshuffle. Advance day tracker. Each new day has a new set of arrays to be added to the set.
Conversation: New conversation for each day.
Each task. Zoom in on the photos and the tasks escalate from 1st repetition to 10th repetition. Array of images to select from. Shuffle the set. Pull values out so they can’t be reused.