Twine Q&A - Recent questions tagged halp
http://twinery.org/questions/tag/halp
Powered by Question2AnswerHow do you take the highest number out of a set of four variables?
http://twinery.org/questions/283/how-do-you-take-the-highest-number-out-of-set-of-four-variables
Throughout the beginning of my story, dependent on the choices you make different numerical variables go ul and down. I was hoping that there would be some way to take the highest number out of the four variables, and depending on which variable it was set a fifth variable to display that. In case I didn't explain that clear enough, here's an example:<br />
<br />
You have four variables. $cat $dog $onion and $ilikecheese. As the story progresses their numerical values increase at different rates. At a set point in the story it will take whichever variable is the highest and variable number five $zebra to be a specific word based on which of the first four variables it was that was highest.<br />
<br />
The only problem with this is in the case that two or more variables have equal numerical values, so I was also curious if there is some way to take the ones that are tied for highest and then randomly select one of them to treat as highest. <br />
<br />
Thanks in advance for the help, I couldn't for the life of me figure out how to do this myself.http://twinery.org/questions/283/how-do-you-take-the-highest-number-out-of-set-of-four-variablesSat, 24 Jun 2017 00:47:52 +0000