I’ve been looking at a couple choice-based systems – most particularly Varytale and ChoiceScript – and I’m wondering if anyone has any experience with their support of text-entry.
I know ChoiceScript has text boxes where the user can type in something like a name:
…but can you base any logic on what they’ve actually typed? Does Varytale or any other system have similar support for input other than ‘choose one of the following’?
I’m not looking for anything particularly complex – simple string comparison might be sufficient.
You can certainly do string comparisons in ChoiceScript. You can also extract characters from a string by using an index number in brackets, like this:
*temp foo
*input_text foo
The first letter of your response is: ${foo#1}
Note that ChoiceScript string indices are 1-based. Finally, you can use “length(foo)” to get the length of a string.