How do I loop back to an old chapter?

Discussion in 'CHYOA General' started by Zero_Zero_Six_Nine, Mar 18, 2021.

  1. I'm trying to write a story with a pretty big tree of choices, and it would help a ton if there was a way to go from (A-B-C-A) to be able to loop back if a certain choice is made. Can someone help with this?
     
  2. dingsdongs

    dingsdongs Really Really Experienced

    A few yeas ago i wrote a small example project for the game mode and how to create loops. But the principle also works without game mode. See explanations and screenshots on how how to "create a link" in this chapter: https://chyoa.com/chapter/Add-+1-Strength.266933

    Let me know if you can work with that information or if you have any questions!

    It is also possible that there is helpful information regarding linked chapters in the "Chyoa Guide", but i'm not sure, because i'm not that familiar with it: https://chyoa.com/story/CHYOA-GUIDE.6006
     
  3. insertnamehere

    insertnamehere Really Really Experienced

    With regards to Game Mode: the major difference between looping chapters with or without Game Mode is whether anything changes in between loops. Without Game Mode, if you go A->B->C->A then absolutely nothing will have changed between the first and second time you visited A. This means, among other things, that the reader can infinitely cycle through A->B->C and never experience any new story content.

    Game Mode means the story can 'remember' what the reader did during A->B->C, so when they visit A the second time, the text and available options can be different (however slightly so). For example, you can create a variable before A such as visitedB = False, then in B write the condition visitedB must be False and the score change visitedB = True. This is a common method to prevent the infinite looping (if you don't want it).
     
    gene.sis likes this.
  4. gene.sis

    gene.sis CHYOA Guru

    DeviantChalice likes this.