Locked Choice

Posted: 25 Oct 2021 17:51
by gradstein

Is there any way to show a choice option, but lock it based on a condition? So like, 2 out of 3 options are tappable, but the other shows but is blocked from selection? Like, tappable:false or something like that.


Re: Locked Choice

Posted: 25 Oct 2021 18:51
by idaot

I'd suggest creating a separate button for each state and have one displayed based on a condition.

The below example will show a Normal or Locked button prefab depending on the amount of points:
@choice "Option 1" button:{ Points > 1 ? "Normal" : "Locked" }


Re: Locked Choice

Posted: 25 Oct 2021 22:45
by gradstein

Oh interesting. I didn't know you could conditionalize params like that. And then i'd just make the button non-interactable?


Re: Locked Choice

Posted: 26 Oct 2021 07:20
by idaot

In the button prefab, you can check Disable Interaction in the Choice Handler Button script. That will prevent the player from interacting with the button in question.