Hi! I was hoping anybody could help me, please. I’m new to Unity and am in the process of learning how to code with C#. My goal is to have two people in my Unity game that converse with each other. For example, the person playing the game is Player 1, and there is a pre-programmed second Person in the scene that the Player is conversing with. The script would ideally allow for the following pattern: " If Player 1 says “Option 1,” Person says ‘…’. When Person says “…,” Player 1’s dialogue options become “…”. The Player would have pre-defined dialogue choices that changed the course of the pre-programmed Person’s responses. I was wondering if anyone had some advice for my C# Script that would be the best way to approach this type of conversation between two characters. Any advice is much appreciated! Thank you in advance.
Sounds like something that will reqire a database.
This is definitly something you should look into.
Something like that can get extremly complex very fast.
1 Like
You will need some classes like this:
-
DialogSystem (plays/stops current Dialog)
-
Dialog
-
Choice (list of Lines)
-
Line (contains text that will be displayed)
1 Like
This should help you:
I didn’t watch that video but his other videos are pretty great.
1 Like