You should consider joining our Discord to ask for support.
We created a support channel using the new Discord Forum feature!
You can also visit our new website, it has a help section in English and French
Ok, so what you tried with the array was correct, the only detail is that the result variable contains a value between 1 & n options.Meaning that if you pick the 4th option, the result variable is 4.
So the ruby script would be:
@choices = []@choices << 'Option A' if condition_a@choices << 'Option B' if condition_b# ...
Once you've run this snippet, you can create the first condition that will check you can actually make a choice:
!@choices.empty?
And in this condition you'll enter:
Script: choice(201, -1, *@choices)Message: What do you choose
After that you can either do a series of script condition with:
@choices[gv[201] - 1] == 'Some string'
Or do something more clever if you're doing some generic stuff like giving an item or something that can be serialized with a Hash map. For example:
Script: @choices = ['Pokéball'] @choices << 'Great Ball' if gv[36] > 2 @choices << 'Ultra Ball' if gv[36] > 4Script: choice(201, -1, *@choices)Message: What do you want to get?Script: item_id = { 'Pokéball' => 4, 'Great Ball' => 3, 'Ultra Ball' => 2 }[@choices[gv[201] - 1] give_item(item_id, 5)
This will give 5 of the chosen item :)