Announcement

Collapse
No announcement yet.

Eliminating Choice Options after they have been selected

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Eliminating Choice Options after they have been selected

    Hi srry i dont know how to create my own post. My problem is that i have three choices, and after the reader does one choice, i want it to be deleted and show the two left over, than ater the second one, have only one left. How can i do this?

  • #2
    I've moved your post out to a separate topic for now. I'm certain this question has been asked in one form or another, but it's difficult to search for. I'll merge when I come across something similar in future.

    The "+ New Topic" button is found along the left side of the same grey bar (above the list of topics) where you can go to the next page in the forums. In any case, please read the the FAQ first next time. There's actually a link there to create a new topic.

    I'll answer your question next. It's very messy, and honestly if you don't know what you're doing, I recommend against doing it until you fully understand flags and labels.

    This is the most "simple" form, in that there are no labels needed.

    The downside is that you instead repeat the script for all the options a grand total of four times per option, so it can get messy. Especially if you decide later to change any one of them.
    Code:
    
    NARRATOR
    First time.
    
    choice
    "Option 1" {
        
    # Option 1 goes here
    gain PICKED_OPTION_1    
    
    } "Option 2" {
        
    ​# Option 2 goes here
    gain PICKED_OPTION_2
    
    } "Option 3" {
      
    ​# Option 3 goes here
    gain PICKED_OPTION_3
    
    }
    
    if (PICKED_OPTION_1) {
        
    NARRATOR
    Second time.
    
    choice
    "Option 2" {
        
    # Option 2 goes here
    gain PICKED_OPTION_2
    
    } "Option 3" {
        
    # Option 3 goes here
    gain PICKED_OPTION_3
    
    }
    
    } elif (PICKED_OPTION_2) {
        
    
    NARRATOR
    Second time.
    
    choice
    "Option 1" {
        
    # Option 1 goes here
    gain PICKED_OPTION_1
    } "Option 3" {
      
    # Option 3 goes here
    gain PICKED_OPTION_3
    }
    
    } else {
    
    
    NARRATOR
    Second time.
    
    choice
    "Option 1" {
      
    # Option 1 goes here
    gain PICKED_OPTION_1
    
    } "Option 2" {
        
    # Option 2 goes here
    gain PICKED_OPTION_2
    
    }
    
    }
    
    if (PICKED_OPTION_1) {
    
    if (PICKED_OPTION_2) {
    
    # Picked Option 1 & 2
    
    NARRATOR
    Third time
    
    choice
    "Option 3" {
    
    # Option 3 goes here
    
    }
    
    } else {
    # Picked Option 1 & 3
    
    NARRATOR
    Third time
    
    choice
    "Option 2" {
    
    # Option 2 goes here
    
    }
    
    }
    } else {
    # Picked Option 2 & 3
    
    NARRATOR
    Third time
    
    choice
    "Option 1" {
    
    # Option 1 goes here
    
    }
    }
    Last edited by WL.; 10-12-2014, 10:28 PM.

    Comment


    • Jihi
      Jihi commented
      Editing a comment
      Hey WL. thank you so much for this! Can you please make a 5 choices version ?

    • Jihi
      Jihi commented
      Editing a comment
      MJay hey, it's a hidden animation called "dance_drop_it" but unfortunately it shows an error so you will be able to see it while testing your story but you can't publish with it in your story! (So what I did basically is I put that blue background and then placed my char in the center of the screen and started the animation and took a screenshot! The rest is up to editing skills!)

  • #3
    Here's the other version which uses labels, but does not require you to repeat each choice option four times.

    Disclaimer: For both of these, I did not test them on the portal yet. There may or may not be errors in syntax. I wrote them out in a text editor. Logically, however, if I made no typos, they should be correct.

    Code:
    NARRATOR
    First time.
    
    choice
    "Option 1" {
        
    gain PICKED_OPTION_1  
    goto option1
     
    
    } "Option 2" {
     
    gain PICKED_OPTION_2  
    ​goto option2
    
    
    } "Option 3" {
      
    
    gain PICKED_OPTION_3
    goto option3
    
    }
    
    label second_time
    gain SECOND_TIME
    if (PICKED_OPTION_1) {
        
    NARRATOR
    Second time.
    
    choice
    "Option 2" {
        
    gain PICKED_OPTION_2
    goto option2
    
    } "Option 3" {
        
    gain PICKED_OPTION_3
    goto option3
    
    }
    
    } elif (PICKED_OPTION_2) {
        
    NARRATOR
    Second time.
    
    choice
    "Option 1" {
        
    gain PICKED_OPTION_1
    goto option1
    
    } "Option 3" {
      
    gain PICKED_OPTION_3
    goto option3
    
    }
    
    } else {
    
    NARRATOR
    Second time.
    
    choice
    "Option 1" {
      
    gain PICKED_OPTION_1
    goto option1
    
    } "Option 2" {
        
    gain PICKED_OPTION_2
    goto option2
    
    }
    
    }
    
    label final_time
    gain FINAL_TIME
    
    if (PICKED_OPTION_1) {
    
    if (PICKED_OPTION_2) {
    
    # Picked Option 1 & 2
    
    NARRATOR
    Third time
    
    choice
    "Option 3" {
    
    goto option3
    
    }
    
    } else {
    # Picked Option 1 & 3
    
    NARRATOR
    Third time
    
    choice
    "Option 2" {
    
    goto option2
    
    }
    
    }
    } else {
    # Picked Option 2 & 3
    
    NARRATOR
    Third time
    
    choice
    "Option 1" {
    
    goto option1
    
    }
    }
    
    
    label option1
    
    # Option 1 goes here
    
    if (FINAL_TIME) {
    goto after
    } elif (SECOND_TIME) {
    goto final_time
    } else {
    goto second_time
    }
    
    label option2
    
    # Option 2 goes here
    
    if (FINAL_TIME) {
    goto after
    } elif (SECOND_TIME) {
    goto final_time
    } else {
    goto second_time
    }
    
    label option3
    
    # Option 3 goes here
    
    if (FINAL_TIME) {
    goto after
    } elif (SECOND_TIME) {
    goto final_time
    } else {
    goto second_time
    }
    
    label after
    ...
    Last edited by WL.; 10-12-2014, 10:42 PM.

    Comment


    • #4
      when i read a story, i don't remember what story though. After I picked a choice and it was the wrong one I had to choose again but it already eliminated the choice i picked

      example:
      all choices: dance, eat, drink, go home
      choice I picked: dance
      narrator
      wrong answer try again.
      all choices: eat, drink, go home
      choice i picked: drink
      narrator
      wrong answer, try again.

      and it just keeps going, until i have picked the right answer.
      Can anybody tell me the code for this?
      thank you!


      Comment


      • #5
        http://forums.episodeinteractive.com...-been-selected

        Comment


        • Meegs
          Meegs commented
          Editing a comment
          Thanks for linking this, Jude!

          I will merge these two threads.

      • #6
        Hi, I'm sure this may be really obvious, but I honestly don't know how to do it myself.

        I've seen in some stories how there's a list of choices, for example, 5. Then when you pick one, and there's dialogue, there's 4 left. Then pick one again, more dialogue, there's 3 left, and so on. I'm not sure how to do that. Can anyone help?

        Thankies! =3

        Comment


        • WL.
          WL. commented
          Editing a comment
          Hi,

          I've merged your thread with the existing one. Please read the directing FAQ (it's a Sticky post) and search for an answer before you create a new thread in future. This particular question is listed in the FAQ.

          Thanks!

      • #7
        I do it by using labels and having different sets of choices - instead of the script seemingly deleting one of my choices, I have actually just said for the script to 'goto' a different choice set... If you get me XD so it's kinda like this:

        label choiceSet1

        Here there will be the original five choices, each with gains so you can reference which one needs to be eliminated

        After the initial choice I will do if statements:

        if (1) {
        goto choiceSet2
        }
        else {

        }
        if (2) {
        goto choiceSet2
        }
        else {

        }

        And each new choice set would have the corresponding choice, chosen in the first set, left out. XD I just continue on with this really.
        There might be a simpler way of doing this but this is the way I figured it out

        Comment


        • kay.e.ho
          kay.e.ho commented
          Editing a comment
          Or a choice within a choice might be easier! So like this:

          choice "1" {
          DIALOGUE
          choice "2" {
          DIALOGUE
          choice "3" {
          DIALOGUE
          }
          }
          "3" {
          DIALOGUE
          choice "2" {
          DIALOGUE
          }
          }
          }
          "2" {
          DIALOGUE
          choice "1" {
          DIALOGUE
          choice "3" {
          DIALOGUE
          }
          }
          "3" {
          DIALOGUE
          choice "1" {
          DIALOGUE
          }
          }
          }
          "3" {
          DIALOGUE
          choice "1" {
          DIALOGUE
          choice "2" {
          DIALOGUE
          }
          }
          "2" {
          DIALOGUE
          choice "1" {
          DIALOGUE
          }
          }
          }

          Obviously the more choices you add in the more complex it gets XD

      • #8
        There are a couple different ways to do this... If you only have 2-3 options, you can embed them all within the other choices:

        Code:
        NARRATOR
        Which one do you want to pick?
        
        choice
        "Option 1" {
        NARRATOR
        You picked option one first.
        Now you still can pick between the other two.
        
        choice
        "Option 2" {
        NARRATOR
        You picked option one first, then you picked option two.
        Now you get to pick the last one.
        
        choice
        "Option 3" {
        NARRATOR
        You picked option one, then option two, then option three.
        After this, the story will jump to after this big giant choice nest.
        }
        } "Option 3" {
        NARRATOR
        You picked option one first, then you picked option three.
        Now you get to pick the last one.
        
        choice
        "Option 2" {
        NARRATOR
        You picked option one, then option three, then option two.
        After this, the story will jump to after this big giant choice nest.
        }
        }
        } "Option 2" {
        NARRATOR
        You picked option two first.
        Now you can still pick between the other two.
        
        choice
        "Option 1" {
        NARRATOR
        You picked option two first, then you picked option one.
        Now you get to pick the last one.
        
        choice
        "Option 3" {
        NARRATOR
        You picked option two, then option one, then option three.
        After this, the story will jump to after this big giant choice nest.
        }
        } "Option 3" {
        NARRATOR
        You picked option two first, then you picked option three.
        Now you get to pick the last one.
        
        choice
        "Option 1" {
        NARRATOR
        You picked option two, then option three, then option one.
        After this, the story will jump to after this big giant choice nest.
        }
        }
        } "Option 3" {
        NARRATOR
        You picked option three first.
        Now you can still pick between the other two.
        
        choice
        "Option 1" {
        NARRATOR
        You picked option three first, then you picked option one.
        Now you get to pick the last one.
        
        choice
        "Option 2" {
        NARRATOR
        You picked option three, then option one, then option two.
        After this, the story will jump to after this big giant choice nest.
        }
        } "Option 2" {
        NARRATOR
        You picked option three, then you picked option two.
        Now you get to pick the last one.
        
        choice
        "Option 1" {
        NARRATOR
        You picked option three, then option two, then option one.
        After this, the story will jump to after this big giant choice nest.
        }
        }
        }
        Since this post is already pretty long, I'll make another to show you how I do it with gains...

        Comment


      • #9
        Alright, you can also use gains to set up an elimination choice nest. It's not very pretty, but it works; and, for me, it's less complicated than nesting it all like above.

        Code:
        label choose_nest
        NARRATOR
        Picking time!
        
        if (picked_one) {
        #picked 1
        if (picked_two) {
        #picked 1 and 2
        if (picked_three) {
        #picked 1, 2, and 3
        if (picked_four) {
        #picked 1, 2, 3, and 4
        NARRATOR
        Actually, it looks like you've already picked all the options.
        So, let's continue.
        
        goto after_choosing
        } else {
        #picked 1, 2, and 3, NOT 4
        NARRATOR
        What should we pick?
        
        choice
        "Option 4" {
        goto fourth_one
        }
        }
        } else {
        #picked 1 and 2, NOT 3
        if (picked_four) {
        #picked 1, 2, and 4, NOT 3
        NARRATOR
        What should we pick?
        
        choice
        "Option 3" {
        goto third_one
        }
        } else {
        #picked 1, 2, NOT 3, 4
        NARRATOR
        What should we pick?
        
        choice
        "Option 3" {
        goto third_one
        } "Option 4" {
        goto fourth_one
        }
        }
        }
        } else {
        #picked 1, NOT 2
        if (picked_three) {
        #picked 1, 3, NOT 2
        if (picked_four) {
        #picked 1, 3, 4, NOT 2
        NARRATOR
        What should we pick?
        
        choice
        "Option 2" {
        goto second_one
        }
        } else {
        #picked 1, 3, NOT 2, 4
        NARRATOR
        What should we pick?
        
        choice
        "Option 2" {
        goto second_one
        } "Option 4" {
        goto fourth_one
        }
        }
        } else {
        #picked 1, NOT 2, 3
        if (picked_four) {
        #picked 1, 4, NOT 2, 3
        NARRATOR
        What should we pick?
        
        choice
        "Option 2" {
        goto second_one
        } "Option 3" {
        goto third_one
        }
        } else {
        #picked 1, NOT 2, 3, 4
        NARRATOR
        What should we pick?
        
        choice
        "Option 2" {
        goto second_one
        } "Option 3" {
        goto third_one
        } "Option 4" {
        goto fourth_one
        }
        }
        }
        }
        } else {
        #didn't pick 1
        if (picked_two) {
        #picked 2, NOT 1
        if (picked_three) {
        #picked 2, 3, NOT 1
        if (picked_four) {
        #picked 2, 3, 4, NOT 1
        NARRATOR
        What should we pick?
        
        choice
        "Option 1" {
        goto first_one
        }
        } else {
        #picked 2, 3, NOT 1, 4
        NARRATOR
        What should we pick?
        
        choice
        "Option 1" {
        goto first_one
        } "Option 4" {
        goto fourth_one
        }
        }
        } else {
        #picked 2, NOT 1, 3
        if (picked_four) {
        #picked 2, 4, NOT 1, 3
        NARRATOR
        What should we pick?
        
        choice
        "Option 1" {
        goto first_one
        } "Option 3" {
        goto third_one
        }
        } else {
        #picked 2, NOT 1, 3, 4
        NARRATOR
        What should we pick?
        
        choice
        "Option 1" {
        goto first_one
        } "Option 3" {
        goto third_one
        } "Option 4" {
        goto fourth_one
        }
        }
        }
        } else {
        #didn't pick 1 or 2
        if (picked_three) {
        #picked 3, NOT 1, 2
        if (picked_four) {
        #picked 3, 4, NOT 1, 2
        NARRATOR
        What should we pick?
        
        choice
        "Option 1" {
        goto first_one
        } "Option 2" {
        goto second_one
        }
        } else {
        #picked 3, NOT 1, 2, 4
        NARRATOR
        What should we pick?
        
        choice
        "Option 1" {
        goto first_one
        } "Option 2" {
        goto second_one
        } "Option 4" {
        goto fourth_one
        }
        }
        } else {
        #didn't pick 1, 2, or 3
        if (picked_four) {
        #picked 4, NOT 1, 2, 3
        NARRATOR
        What should we pick?
        
        choice
        "Option 1" {
        goto first_one
        } "Option 2" {
        goto second_one
        } "Option 3" {
        goto third_one
        }
        } else {
        #Haven't picked anything
        NARRATOR
        What should we pick?
        
        choice
        "Option 1" {
        goto first_one
        } "Option 2" {
        goto second_one
        } "Option 3" {
        goto third_one
        } "Option 4" {
        goto fourth_one
        }
        }
        }
        }
        }
        
        label first_one
        NARRATOR
        You picked the first one!
        
        gain picked_one
        
        NARRATOR
        Would you like to pick another?
        
        choice
        "Yes" {
        goto choose_nest
        } "No" {
        goto after_choosing
        }
        
        label second_one
        NARRATOR
        You picked the second one!
        
        gain picked_two
        
        ​NARRATOR
        Would you like to pick another?
        
        choice
        "Yes" {
        goto choose_nest
        } "No" {
        goto after_choosing
        }
        
        label third_one
        NARRATOR
        You picked the third one!
        
        gain picked_three
        
        ​NARRATOR
        Would you like to pick another?
        
        choice
        "Yes" {
        goto choose_nest
        } "No" {
        goto after_choosing
        }
        
        label fourth_one
        NARRATOR
        You picked the fourth one!
        
        gain picked_four
        
        ​NARRATOR
        Would you like to pick another?
        
        choice
        "Yes" {
        goto choose_nest
        } "No" {
        goto after_choosing
        }
        
        label after_choosing
        NARRATOR
        On with the story!
        I really hope I've got all my brackets right up there and everything. It's not uncommon for me to screw up somewhere and spend forever trying to hunt for what's missing.

        This way is definitely a pain to structure. That's why I use the comments to help me keep track of what is what.

        Comment


        • #10
          Sorry for necromancing an old topic, but it just occurred to me that you can use character points and choices with conditionals for clean, simple and more linear coding.
          You should be able to add as many choices as you want to this without getting bogged down with labels or crazy nested choices.
          Here's a template for it. Let me know if there are any bugs:


          Code:
          EXT. WHITE - DAY
          label QUESTIONS
          if (EXTRA1 = 1) {
          if (EXTRA2 = 1) {
          if (EXTRA3 = 1) {
          if (EXTRA4 = 1) {
          if (EXTRA5 = 1) {
          goto FINISHEDQUESTIONS
          }
          }
          }
          }
          }
          JULIA (talk_shrug)
          What do you want to know?
          choice
          "Option 1" if (EXTRA1 = 0) {
          @EXTRA1 +1
          NARRATOR
          Your Option 1 dialogue here.
          goto QUESTIONS
          } " Option 2" if (EXTRA2 = 0) {
          @EXTRA2 +1
          NARRATOR
          Your Option 2 dialogue here.
          goto QUESTIONS
          } "Option 3" if (EXTRA3 = 0)
          {
          @EXTRA3 +1
          NARRATOR
          Your Option 3 dialogue here.
          goto QUESTIONS
          } "Option 4" if (EXTRA4 = 0) {
          @EXTRA4 +1
          NARRATOR
          Your Option 4 dialogue here.
          goto QUESTIONS
          } "Option 5" if (EXTRA5 = 0) {
          @EXTRA5 +1
          NARRATOR
          Your Option 5 dialogue here.
          goto QUESTIONS
          }
          label FINISHEDQUESTIONS
          NARRATOR
          Story continues from here.


          - Make sure that each time you play test your story, you go to Navigation and hit Reset Story Progress. This will erase all character points and make sure you start with a clean slate. Otherwise, the choices won't appear or it'll skip past it like it's not even there.

          - This may seem obvious, but you need to use characters that you aren't already using the points system with, or else the coding won't work. This is why I use my background characters. Also, if you plan to use this template again in the same story, you need to reset the character points first. This can be done with the command @CHARACTER =0. Make sure to do it for all of them.
          - If you want to give the reader the option to finish the choice without asking all the questions, then just delete these parts of the coding:


          Code:
          if (EXTRA1 = 1) {
          if (EXTRA2 = 1) {
          if (EXTRA3 = 1) {
          if (EXTRA4 = 1) {
          if (EXTRA5 = 1) {
          goto FINISHEDQUESTIONS
          }
          }
          }
          }
          }
          
          label FINISHED QUESTIONS
          And add this option onto the end of the choice
          Code:
           "I'm done asking questions" {
          NARRATOR
          Are you sure you're done?
          choice
          "Yes, I'm finished" {
          } "No, I still want to ask questions" {
          goto QUESTIONS
          }
          }

          - You can add as many other questions as you want. Just make sure to add a new character.
          Last edited by CaitlinRumble; 01-12-2018, 04:16 AM.

          Comment

          Working...
          X