How to make certain options in an Array only available if a Boolean is True
I made a dialogue branching system (using a tutorial admittedly) but it didn't cover how to make the dialogue options that are available change depending on other variables.
It works by using arrays which are inputed into a dialogue function. But I am not sure how to make the options available in the array change depending on other booleans.
For example,
hello
What is your name?
I heard you sell cards (if Know's about Cards = True)
The only way I can think of is making a separate array for every single combination and permutation of options. But that seems completely inefficient and I doubt there isn't some easier method. Like setting an input into the array itself that "turns off" certain options so they don't output unless a condition is true.