Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

Is there a way to determine the 1st character of a variable's output?

$
0
0
Kind of an awkward phrasing, I know.

Here is what I want to do:
I have $variable (which, if it helps, is set to a numerical character.) and I want to make several (if:)'s that link to different passages depending on the first character of the variable.
What I have been TRYING to do, which hasn't been working is
(if: $variable's 1st is 1)[(go-to:"PASSAGE1")](else-if:$variable's 1st is 2)[(go-to:"PASSAGE2")]
, etc, etc
I have also tried
(if: 1st of $variable is 1)[(go-to:"PASSAGE1")]

I could set up an individual (if:$variable is 10) (if:$variable is 11) etc but I have...a lot of numbers there.

Is there any way that I can do this without resorting to making an (if:) for every number?
Thanks

Viewing all articles
Browse latest Browse all 1844

Trending Articles