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!
Hide a button
Re: Hide a button
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
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