I’m working on a 3D RPG game (nds style).
The greatest problem I’m facing is the dialogue system and the npc. Without considering the prices of the packs on the asset store that are prohibitively to me, I must write one by myself.
The achieve is a fake Dialogue tree without nodes, questions or answers, just dialogues from the npcs, because the player doesn’t speak.
I thought of a GUI window that shows two lines of dialogues (string line1, string line2 for example).
Every time the player press the ActionButton, different lines of text alternates between these two variables to give the impression of automatic scrolling text.
This was my idea.
The main problem is: How can I build this system in a class?
public class MessageBox {
//variables, functions, methods etc
}
And call the properties in this class every time I want?
This is the best way to build what I want to build?
There are some script references I could follow during the writing of the code?
Thanks for the future help.
You’re basically looking at making a node based system, with each node representing the text to display (i.e. the conversation bit) and a list of responses which link to the next node. Your ui then puts the text in a panel, and creates buttons for each transition.
A very handy thread if you are looking at making a custom editor tool to create the dialogue node trees (don’t start here, just handy to have when you’ve got your head around the system you’re trying to build )
Yes I remember this video but it’s not what I’m looking for. Thank you anyway.
I know that should be simple but to me it doesn’t XD Or better, I understand what this structure means. The problem is the “how”.
How many script I need, How can I link the nodes to the script (if i understand ho to make nodes), how everything. I’m not a scripter, I always dealt the graphic side of my games. With nothing that helps me, I need to learn scripting by myself. Can you be more clear? Thank you so much for the patience.