I have used Dan Cox's tutorial on Working with Google Sheets in Twine to be able to log gameplay data from my game.
Now, however, I need to do the reverse: instead of porting data out of Twine into Google Sheets, I need to be able to pull from Sheets into Twine. This is for a research project, and in order to map each gameplay onto the right subject/player, I need to have each log in with a specific ID.
Unfortunately, I can't just use a simple array with a pre-set list of IDs for the user to log-in and check against; I need to be able to dynamically update the list of IDs without updating the Twine game itself. If I DO use an array in Twine, I can get the conditional and log-in to work just fine; I just can't get it to work with an external array.
I don't really have code, because absolutely nothing works. Here's the static array that works, if that helps.
$validIDs to [
<<textbox "$codename" "" autofocus>>
<<button "Log In">>
<<set $codename to $codename.trim().toLowerCase().replace(/\s\s+/g, "")>>
Incorrect codename. Please try again.\