Making choices unselectable if others choices already made WITHIN a choice?

Comrades!

Writing a choicescript game now, obviously, and I’ve a scene where the player will have a chance to choose three out of five things. I want to code it so that, obviously, they can choose one, have it kick back to the rest of the choices (with the previously chosen choice greyed out or hidden) and being able to choose two of the other choices (with the same thing happening).

Sort of how it was done with a choice in Choice of Broadsides (where you, as a new commander/captain, can decide how you push your new crew). There was a first choice made with a nested choice, then a second choice from the original first list, but with the choice you chose hidden; and you could only choose 2 of 3. How to do it? My other searches here did not yield the answer…

well you try using the disable_reuse command?
*label 1
*choice
----*disable_reuse #why are you here?
--------*goto a
----*disable_reuse #Who are you?
--------*goto b
*label a
bla bla
*goto 1

or you could do it with a selectable_if
*choice
----*selectable_if ( choice1 = false) #choice2.

edit: Read the choicescript wiki all of this is explained better there

To advance on that, you’d use a variable counter to limit the number of times this would happen:


*temp n
*set n 0
*label convo
*if (n=2)
 *goto next_scene
*choice
        *disable_reuse #why are you here?
          *set n + 1
          *goto choice_a
        *disable_reuse #Who are you?
          *set n + 1
          *goto choice_b
        *disable_reuse #What's your name?
         *set n + 1
         *goto choice_c

*label choice_a
bla bla
*goto convo

*label choice_b
bla bla
*goto convo

*label choice_c
bla bla
*goto convo

In this example after two choices have been made, the game will jump to the label “next_scene” - making it so you can only pick two of the three options.

1 Like

That is nifty! Thanks CJW! I’ll give it a try today.

@StanTheMan

Glad I could help, please do let us know if you have any further problems! :slight_smile:

I will! The basic Choicescript stuff is easy to follow, obviously, or a little search here usually yields an answer. This sort of stuff though - well, I had some VERY half-baked ideas on how to approach it, and then realized that I didn’t actually know. So it’s good to get some help!