Locked Choice

Discuss authoring naninovel scenario scripts.
Post Reply
gradstein
Posts: 11
Joined: 09 Sep 2020 19:03

Locked Choice

Post 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.

idaot
Posts: 68
Joined: 01 Aug 2020 08:25

Re: Locked Choice

Post 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" }

gradstein
Posts: 11
Joined: 09 Sep 2020 19:03

Re: Locked Choice

Post by gradstein »

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

idaot
Posts: 68
Joined: 01 Aug 2020 08:25

Re: Locked Choice

Post 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.

Post Reply