Is it possible to have a chance to fail something?
I know about the:
*rand variable_here 5 10
script, but is it possible to do something akin to this:
Your character has to have at least 60 dexterity to pick the option “Jump over the river” but a dexterity of 80 to actually move on from it. They select the option with exactly 60 dexterity, so they are able to attempt. The game rolls a set of numbers to determine if the player wins the roll. Since his dexterity is 60, he fails and the river washes him away to a different chapter setting than the one he would have gotten to if he won.
He tries again after he beats the game, reaching this choice with a dexterity of 60. The game rolls a set of numbers and he gets lucky and wins the roll this time, crossing the river and making it to a new chapter he missed out on before.
A second player comes along with 90 dexterity. Since his dexterity is over 80, he doesn’t have to attempt the roll and goes on.
Is the preceding scenario at all possible to code into a ChoiceScript game? If so, I would love to know it. The closest I’m getting is:
*rand dexterity 60 100
But that will check for a winning number of 80 or higher with the setback of changing the variable permanently. So is there a way to maybe save a variable, randomize it, check the number, and return to the saved variable?
Or maybe something else entirely.
Bottom-line: Is the scenario possible to code?