Twine Version: 1.4.2
Story Format: Sugarcube 2.35
I know maybe it’s a pretty noob question, but I haven’t found the answer.
I have an array with several random numbers and I need to track if the value of another variable equals one of the numbers of that array.
<<set $array to [2, 8, 13, 24, 35, 46]>> <<set $number to random (1, 50)>> I tried: <<if $number eq $array>> You got a number right <</if>> and also <<if $number is either ($array)>> You got a number right <</if>>
But nothing worked.
I’m sorry if this has already been answered, but I haven’t found it.