How to make choices dissappear as you use them?

Okay, so here’s the code:

*choice
   #Keeping your head high when things go wrong. You've got the strength and ability to bounce back quickly.
    *set happiness +30
    *goto skillsmid
    *finish
   #Keeping your grades high. Lessons come naturally to you.
    *set grades +30
    *goto skillsmid
    *finish
   #Magic and Occult practices. The Old Ones just love you.
    *set craft +30
    *goto skillsmid
    *finish
   #Making Friends. You're able to make friends easily and quickly with your charm and charisma.
    *set social +30
    *goto skillsmid
    *finish

*page_break
*label skillsmid
What would you say that you're good, but not great at?

*choice
   #You try to keep your emotions in check, but you have a tendency to get bouts of depression.
    *set happiness +20
    *goto skillslow
    *finish
   #You make average grades, and sometimes the harder lessons are frustrating for you.
    *set grades +20
    *goto skillslow
    *finish
   #Occult studies are sometimes very confusing. You find some spells don't go as planned.
    *set craft +20
    *goto skillslow
    *finish
   #You have some difficulty making friends. You're a little awkward in public.
    *set social +20
    *goto skillslow
    *finish

*page_break
*label skillslow
How about what you're terrible at? It's alright, I'm just a narrator. I can't judge.

*choice
   #You suffer from depression. Even the smallest setback can make you lose composure and cry.
    *set happiness -10
    *goto endpre
    *finish
   #You can't concentrate in class, you struggle with mediocre concepts. Your grades are low.
    *set grades -10
    *goto endpre
    *finish
   #Sometimes when you study your magic books, you wonder if you aren't just wasting your time. Your magical abilities are weak.
    *set craft -10
    *goto endpre
    *finish
   #You have no real friends, and have a lot of trouble making them. In fact, most social interactions end in disaster.
    *set social -10
    *goto endpre
    *finish

What I would like is for the choices to disappear after you pick them. Like, if you chose Magic as your high skill in the first section, it would not appear as a choice for the next two sections.

If anyone can help me out, let me know. (Especially if there’s a better way to organize this stuff!)

*page_break

I’ve included qualifiers before the second and third selection to only show the valid choices.

*choice
  #Keeping your head high when things go wrong. You've got the strength and ability to bounce back quickly.
    *set happiness +30
    *goto skillsmid
    *finish
  #Keeping your grades high. Lessons come naturally to you.
    *set grades +30
    *goto skillsmid
    *finish
  #Magic and Occult practices. The Old Ones just love you.
    *set craft +30
    *goto skillsmid
    *finish
  #Making Friends. You're able to make friends easily and quickly with your charm and charisma.
    *set social +30
    *goto skillsmid
    *finish

*page_break
*label skillsmid
What would you say that you're good, but not great at?

*choice
  *if (happiness < 30)
    #You try to keep your emotions in check, but you have a tendency to get bouts of depression.
      *set happiness +20
      *goto skillslow
      *finish
  *if (grades < 30)
    #You make average grades, and sometimes the harder lessons are frustrating for you.
      *set grades +20
      *goto skillslow
      *finish
  *if (craft < 30)
    #Occult studies are sometimes very confusing. You find some spells don't go as planned.
        *set craft +20
        *goto skillslow
        *finish
  *if (social < 30)
    #You have some difficulty making friends. You're a little awkward in public.
      *set social +20
      *goto skillslow
      *finish

*page_break
*label skillslow
How about what you're terrible at? It's alright, I'm just a narrator. I can't judge.

*choice
  *if (happiness < 20)
  #You suffer from depression. Even the smallest setback can make you lose composure and cry.
    *set happiness -10
    *goto endpre
    *finish
  *if (grades < 20)
    #You can't concentrate in class, you struggle with mediocre concepts. Your grades are low.
      *set grades -10
      *goto endpre
      *finish
  *if (craft < 20)
    #Sometimes when you study your magic books, you wonder if you aren't just wasting your time. Your magical abilities are weak.
      *set craft -10
      *goto endpre
      *finish
  *if (social < 20)
  #You have no real friends, and have a lot of trouble making them. In fact, most social interactions end in disaster.
      *set social -10
      *goto endpre
      *finish

The above is assuming that each skill is being set for the first time. So, in the second set, the option only shows if it is less than it would be if selected in the first choice. In the third set of options, the option only shows if it is less than it would be if picked in the second set (and therefore also the first set).

Hopefully that all makes sense and I got the formatting right. It’s difficult to tell with so much code in such a little box :stuck_out_tongue_closed_eyes:

2 Likes

@Apnea: With the (*hide_reuse) command. Just slap it in front of the #!
@dashingdon: You really do things the hard way

Typically in order to make a command disappear after using it you would use *hide_reuse but in order to do that you need it to return to the same label as those choices, since you have each set of choices in a different label you would need to use *if statements. To do this each option needs to change a value from false to true or 0 to 1 . And those choices in the other label need to appear or not appear based on this value I’ll give an example from my own code to better explain.

*label places

*choice 
  *if art = 0
    #Music and Art Building.
      *set art 1
      *goto art
  *if fitness = 0
    #Fitness building, which includes a gym, rock climbing wall, pool, and more.
      *set fitness 1
      *goto fitness
  *if breakfast = 2
    #Marketplace, gotta eat breakfast.
      *set breakfast 1
      *goto breakfast
  *if lunch = 2
    #Marketplace, gotta eat lunch.
      *set lunch 1
      *goto lunch
  *if dinner = 2
    #marketplace, gotta eat dinner.
      *set dinner 1
      *goto dinner
  *if trail = 0
    #Nature Trail.
      *set trail 1
      *goto trail
  *if library = 0
    #Library, which is also where the computer lab is.
      *set library 1
      *goto library
  *if commons = 0
    #Commons, its where students go to hang out and sometimes play games.
      *set commons 1
      *goto commons
  *if dorms = 0
    #Go back to the dorm.
      *set dorms = 1
      *goto dorms
  *if scout = 0
    #Actually I want to scout out my classrooms so I know here to go the first day.
      *set scout 1
      *goto scout

Basically the options only appear if the value = 0 . When you choose the option it sets it to 1 so next time you return to that label it wont show up. I’m not very good at explaining but I’ll be more then happy to try and further explain if you need it.

Note if you have a goto you don’t need a finish.

There’s a couple of ways to do this. You can use a temporary variable to keep track of previous choices, so say

*temp choice1 “nothing”

and then

*choice
    #Keeping your head high when things go wrong. You've got the strength and ability to bounce back quickly.
    *set happiness +30
    *set choice1 "happiness"
    *goto skillsmid

Then on the next bit

*choice
   *selectable_if (choice1 !="happiness") #You try to keep your emotions in check, but you have a tendency to get bouts of depression.
    *set happiness +20
    *goto skillslow

And looks like I’ve been slow, so others have posted the other way to do it.

2 Likes

The way @FairyGodfeather has shown to do this above is the better way of going about it, since “happiness” could potentially not be zero which would make the code I posted ineffective.

The method @Dashingdon uses is preferable to the one I suggested since it doesn’t involve creating new variables. However with it you need to keep a closer track of what value your stats have. (Which is a good practice to get into.

Also note that using *if and *selectable_if appear differently to the reader. An *if statement will ensure the option only appears if you meet the criteria. *selectable_if will show the option, but it can’t be selected. Both have their uses.

@Dashingdon Haha we both posted at the same time. :slight_smile: Actually your method’s better.

I use Zaroukae’s method but I’ll have to remember dashingdon’s too for future reference. *bookmark

Actually looking at both codes I use a mix of the two.

So if I do it this way, in my second set, do I make the choices go *selectable_if (choice2 !=“happiness”) and *set choice2 !=“happiness”? Just curious. I am really just a tall toddler.

Have you looked at *hide_reuse?

I didn’t think that would work because it’s 3 different scenes, although I suppose I could use hide_reuse and chase it with an if statement, so only certain phrases would show up through each reuse. (perhaps I should code more at night, because I just thought of that upon writing.)