It looks like you're new here. If you want to get involved, click one of these buttons!
(set: $example to (a:"Example A","Example B","Example C")<br />(set: $x to (either:0,1,2))
(print: $example[$x])
, Twine will output one of the three strings in the array. So far so good, but how do I CHANGE the string at $example[$x]
? I thought it would have been something like (set: $example[$x] to "Example D")
, but that gives me the error "I can't give undefined a new value." $example's 1st
instead of $example[0]
, but how do I do that with a variable? Is it possible?
Comments
If you read the 1.1.0 changes: New Features section of the Harlowe project overview you will see that the above syntax has been extended to also allow the use of $variables in the place of 2nd The following example is based on both of the above.