Hello,
I want to add response options via C# code. I already have working Conversation, but just need to add player answers via C# code.
For example: scene have a trader and I want to buy someting.
I need to add array of options via C# code.
For example:
"I want to buy an apple for 10 gold"
"I want to buy sword for 50 gold"
"I want to buy a hat for 30 gold"
and then move to next dialogue entry with saved choice (this can be done with DialogueLua.SetVariable as I know).
I try to find ability to add response options via C# code, but no luck.
How to add responses via C# code
Re: How to add responses via C# code
Hi,
The simplest way is probably to create the conversation at runtime. See: How To: Create Dialogue Database At Runtime
The simplest way is probably to create the conversation at runtime. See: How To: Create Dialogue Database At Runtime
Re: How to add responses via C# code
Hi, Thanks for response.
I think is is too complicated for me to changle full logic and create the conversation at runtime.
I make some workaround to copy/paste buttons at runtime with required actions.
I think - issue is solved.
I think is is too complicated for me to changle full logic and create the conversation at runtime.
I make some workaround to copy/paste buttons at runtime with required actions.
I think - issue is solved.
Re: How to add responses via C# code
Alright. Another approach would be to use variables. If you run into any issues with your solution, let me know and I can write up how you could use variables in response nodes to handle this.