Hide a button

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
rauljl1
Posts: 55
Joined: Fri Apr 15, 2022 7:40 pm

Hide a button

Post by rauljl1 »

Hi Tony!
Is there a way to hide a button in a dialogue (A dialogue entry from player to npc) by script?
For example, I have 5 options in a conversation. How to hide enable and disable by a boolean?
Thanks!
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Hide a button

Post by Tony Li »

Hi,

Reference the Boolean in the dialogue entry's Conditions field. See the Conditions Tutorial for an example.

This assumes you're using a Boolean variable defined in your dialogue database. If you're talking about a bool in your own C# instead, write a method to return that bool's value, and register the method with Lua so you can use it in the Conditions field. More info: Registering C# Methods With Lua
Post Reply