Multiple commands on choice?

Is it possible to use more than one command on choices?

*choice
   *disable_reuse *if ((cond1 = true) and (cond2 < 2)) #Action1
      *goto choice1
   *disable_reuse *if (cond1 = false) #Action2
      *goto choice2

Any way code like this will work? Or do I need to find some other way to make it work?

1 Like

No. You have to break them, each command in a separate line. Like this:

*choice
   *if ((cond1 = true) and (cond2 < 2))
      *disable_reuse #Action1
         *goto choice1
   *if (cond1 = false)
      *disable_reuse #Action2
         *goto choice2
4 Likes

Thanks man!

1 Like

That’s not true, you can use inline choice modifier commands (allow/disable reuse) with inline ifs and selectable_ifs, but the allow/reuse command must come first.

For example, the following is valid ChoiceScript:

*label top
*fake_choice
    *disable_reuse *if (true) #1
    *disable_reuse *if (false) #2
*goto top
*finish

The following is not:

*label top
*fake_choice
    *if (true) *disable_reuse #1
    *if (false) *disable_reuse #2
*goto top
*finish

And will throw an error.

4 Likes

You live, you learn. :grin:

2 Likes

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.