Twine Version: 2.3.5
Story Format: Harlowe 3.1.0
So I have this array and I want to set a specific variable to the value of one of the items in this array. The array is a list of names (John, George, Mary, Todd, etc…) and the variable is $teammate. I want to be able to have the variable pick a specific spot from that list and set it to the name of that teammate. Here’s what I’ve tried so far:
(set: $teammate to $name[1])
I’ve also tried:
(set: $teammate to (print: $name[1]))
And I’ve tried rewriting either of the above, putting various things in quotes. So, like:
(set: $teammate to “$name[1]”)
or…
(set: $teammate to “(print: $name[1])”)
and even…
(set: $teammate to (print: “$name[1]”))
Nothing so far has worked, so either I’m overlooking something with these commands or I’m using the wrong things to do this.
Please help!