How do I make game mode mandetory?

Discussion in 'CHYOA General' started by Damot, Dec 2, 2021.

  1. Damot

    Damot Experienced

    Hi folks,
    I know that some people make their game mode mandatory. If you click the first choice, game mode automatically activates. Can somebody tell me how I can do this?
     
  2. insertnamehere

    insertnamehere Really Really Experienced

    This currently isn't possible. You need to direct the reader to activate game mode manually.
     
    gene.sis likes this.
  3. Damot

    Damot Experienced

    And by manually you mean just telling them in the post? Because I think I have seen stories where you could click on a choice which activated the start game button. But maybe I am mistaken.
     
  4. ballbusting

    ballbusting Virgin

    I don't know if it's exactly what you want, but I made the intro chapter give you an invisible score change to "game mode on", and used "If statements" to hide the text if they don't have that score, which is only if they don't have game mode enabled. Kind of a roundabout approach, but it works. Check it out in my story by trying to proceed to chapter 2 without turning on game mode.

    https://chyoa.com/story/Jamie-Bond.23878

    I haven't thought it necessary to implement beyond chapter 2.
     
  5. gene.sis

    gene.sis CHYOA Guru

    It is possible to provide the same that is used for the "Start Game" button in the sidebar for a link in a chapter.
    It looks like:
    Code:
    [story link]?game=start
    That link could then be used in a Markdown link like
    Code:
    [To get the full Game Mode experience, please click here.](link to start game)
    To hide the chapter content when a reader hasn't activated Game Mode, you could also use sth like
    Code:
    {if@ something > 100000}Please click Start Game{else}[chapter content]{endif}
    - No variable can ever have a higher value than 100,000, so the statement will always fail, no matter if you use an existing variable name or not. In that case, it will show the text from the else statement.
    - If game mode isn't activated, the site doesn't know what statement is true. In that case, the site would choose the else statement but you can force it to use another statement by modifying the statement with an @ like in the given example.
    (That way, you don't need an additional variable and can have the note/link at the beginning of the chapter code instead of the end of it.)
     
    insertnamehere likes this.
  6. Damot

    Damot Experienced

    Oh, I didn't look here anymore! The Link is a great Idea, i already implemented it. The other option is very drastic. i will think about implementing it as well. Thank you a lot, both of you!