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

Chapter 3 by gene.sis gene.sis

What's next?

Roll the Dice

Settings

You can see the working example here.


The settings of this chapter:
Conditions:
-

Score Changes:
00 Round + 1
00 Previous Round + 1
00 Dice Ethan = 1
00 Dice Ethan + R5
00 Dice Olivia = 1
00 Dice Olivia + R5

Notes: The variables "Dice Ethan" and "Dice Olivia" are first set to 1 before a random number between 0 and 5 is added. That way, the dice rolls will result in numbers from 1 to 6. Setting these variables to 1 also overwrites the dice values from previous rounds.

Chapter source code:
{if@ variable > 100000}Please start the Game Mode on the right tab under "Score" or click here before navigating back to this chapter.{else}{if Round > 1}{if Winner = 1}Ethan won.
{elseif Winner = 2}Olivia won.
{elseif Winner = 0}This round is a tie.
{endif}
After round {Previous Round}, Ethan has {Points Ethan} {if Points Ethan =1}point{else}points{endif} and Olivia has {Points Olivia} {if Points Olivia =1}point{else}points{endif}.

{endif}{if Points Olivia = 6}Olivia cheers as she won the game after {Previous Round} rounds.

"Do you wanna play another game?"

{elseif Points Ethan = 6}Ethan cheers as he won the game after {Previous Round} rounds.

"Do you wanna play another game?"

{else}{if Round = 1}"Okay, let's start!"{else}"Round {Round},"{endif} Olivia says, "Roll your dice!"

Ethan rolls the dice and gets a {Dice Ethan}.
Olivia rolls the dice and gets a {Dice Olivia}.{endif}


Notes:
- This chapter is the central hub for this branch, and its content will be adjusted to the current status of the Game of Dice.
- The first part of the chapter shows everything that should be shown to the reader in any but the first round. In any round but the first, it shows who won the current round and the number of points Ethan and Olivia have.
- The second part of the chapter shows whether one of them has won the game, and if so, the reader gets asked whether they want to play again. If none of them has won, this part shows Ethan and Olivia's dice rolls.
- If one of the characters won, this chapter will still calculate dice rolls for them, even though they won't be used.
- The variable Winner is used to indicate who the winner is with 0 = tie, 1 = Ethan won, and 2 = Olivia won.

What's next?

Comments

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