When I saw the short video time I thought this is one of these "dialog" videos that only show you how to display a list of strings instead of actual dialog stuff like choices etc, but damn was I wrong, this is one of the best dialog videos that I saw so far.
man, i agree with all comments. this video is underrated, this deserves way more. i am thinking for way too long about this dialogue system, and is truly hard. as other guy commented, also, your naming is perfect. will revisit this video more than once
Thank you ! To be honest, there are a couple things I'd change such as the fact that there are too many scriptable objects. 😅 But still, I'm glad you found this tutorial useful. 😁
Let's just say I have a few plans regarding edition. It may take a while for me to release a tutorial on that (since there are other videos I need to do to explain nodal edition). But very soon, I'll post an announcement regarding the future of the dialogue system.
REALLY! This is only your second tutorial video. I'm impressed at the advanced C# code used. I expected a Jimmy Vegas or Brackeys style, but you really know your stuff. I found this vid in my RUclips recommendations. I was actually just starting to make my Dialogue system too. Hmmm how does Google know all this?!?
IKR, it's crazy how accurate the recommandations can be at times. O.o Anyway, thank you for the kind words! I've been making games for a while now. I figured I'd might as well share what I know. ;)
Man, what a perfect video, I really want to make games but i feel tutorials often are lacking critical information, and are presented in a way more suited to just learn a few basic programming concepts, not to actually use in a game. Not this one, this one is brilliant, it's to the point, you show code that is ready instead of needlessly typing it in front of the camera, it's clean a beautifuly presented, and the information is gold, i feel it's still a bit out of my reach as an intermediate, but it's exactly what i needed both information and motivation-wise to break out of the intermediate level. Please keep making those, some things you mentioned such as the game flow managment and the visitor design pattern feel super useful and i know 0 about them. Thank you so much, truly, the best tutorial i have ever had the pleasure of watching.
The tutorial is great! I do however find the style of programming a little hard to adjust (likely lack of knowledge), but I'd like to add an option to with certain choices adjust a chosen variable, or perhaps cause for an action. How would I go about adding this?
Hi ! :) Indeed, that is a very useful feature that is missing (and that I probably ought to cover in a future tutorial). I'd probably implement that by creating an extra node type that, when entered, would trigger an event. For example, I've seen that kind of node in another dialogue system here: github.com/Siccity/Dialogue/blob/master/Scripts/Nodes/Event.cs.
This is pretty slick. My system ended up being somewhat similar (but way less well named). One difference I went with was having a scriptable object event that can fire before each line finishes and another after each line ends. In this way if we want to connect events in the scene optionally to points in the conversation that can be done. But yeah, back to first point. I desperately need to get better at naming classes.
Indeed ! Those events can be extremely useful ! 😁 Regarding naming, I still have some ways to go, but one thing I do that helps a bit is to ban words such as "Manager", "Handler", ... It forces me to think about what my classes actually do. And by keeping classes small (Thus following the Single Responsibility Principle), it's easier to find words describing the purpose of the class.
@@fluffygamedev I'm gonna give this a shot. I stopped using "Controller" because I noticed nearly everything became xController. Thanks. Love your presentation style by the way. Very pleasant, good pacing.
@@oafkad Come to think of it, I tend to use "Controller" a bit too much too. (Especially in UI code where it really should be "Presenter" if I want to be correct; since I tend to go for a MVP architecture 😅). Anyway, thank you for the kind words ! 😊
I would like to see how you should use this system creating an example of dialogue with multiple choices.. It would be the perfect final for this amazing guide. Is it possible !?
@@fluffygamedev if I already have a working version of your code in my project, is following a tutorial like this ruclips.net/video/7KHGH0fPL84/видео.html to make a GUI for the nodes doable?
Hi ! :) Absolutely! Those past weeks, I have been experimenting with several Nodal Editor APIs to see how to implement the one for the dialogue system for my next video. So far, I've found that it's useful to have a clear separation between the graph classes and the dialogue system classes. After all, at runtime, we only care about the nodes and how they relate to one another. Not about their coordinates in the graph editor. So in practice, I have a dialogue graph class that instantiates the actual dialogue. I hope this helps :)
You are nothing less than an angle at this moment for me...I have 7DFPS submission after 2 days. I was making the environment the whole week and just realised that I have a freaking huge story to integrate 😂. And I don't know why , but I was suddenly making a whole huge story game just for a Gamejaam.
Hey thanks for this tutorial ! The script for the DialogueChoiceButton look incorrectly on Github is a (.prefab) and not a (.cs) files. Can u reupload please ?
Just in case, what should I do if I want my DialogueChoice Channel to have a response like once the user clicks the button, it will pop out a shop canvas?
The way I'd do this is to have a Unity event that would be triggered at the end of a dialogue line (So probably in *BasicDialogueNode*). That way, once the player chooses a shop dialogue choice, you can then trigger a dialogue node with something your NPC might say before showing their wares. And after that line, the event would in turn trigger the opening of the shop canvas (via an event channel for example). Alternatively, you could create a new type of dialogue node that opens the shop. The nice thing with that method is that you can have some dialogue lines after the player leaves the shop (to say goodbye for example). To do so, you'd have to have a class that inherit from *DialogueNode* and you'd have to update the dialogue node visitors to handle your new node type.
Im new to scripting and stuff and wondered why you wrote private and public variable names. What does the symbol => mean, when you say "public string Text => m_Text;"? Thank you in advance!!
Hi! I'm working on my first gamedev project and kinda got no idea what im doing, so i'm really glad to have found your videos! I do have a question though, when I try to do the whole dialogue via a button thing (just to try it out before I connect it to a game object) I get an error message of "ArgumentException: Object of type "UnityEngine.Object" cannot be converted to type "Dialogue". But as previously mentioned, I got no idea what im doing so that error message tells me nothing, I don't know if I missed a step or of it's something else that is causing it T_T Any help would be much appreciated! (if it helps I'm doing this in 2d, idk if that has anything to do with anything for this particular thing though)
Heya! I'll be glad to help out. :) When you click on an error in the debug window, you can get more detailed version of the error (also known as the callstack). Can you send that to me? If it can help, we can discuss all that directly via DM on Twitter or Discord.
I agree. I plan on doing a refactor of this system. One improvement I'll do is to have one node type to display text. I may still have extra node types. For exemple, nodes that trigger events or nodes that check conditions.
could you show how to make the node & lines system much more visual, in the inspector? its quite complex now to keep track of all your characters \ nodes \ lines if its all via scriptable objects in your assets folders... thx! :D
also, can you explain how to have a "next" button that user presses to progress in the dialogue? I dont want to use the "submit" (spacebar) but would rather it would all be with mouse clicks on buttons - moving between nodes, choices, ending, etc... alsooooo, is there a way to integrate unity events into this system, so we could trigger events when, lets say, a node is triggered? for instance - character has reached a certain dialogue node, and reaching it will also trigger an animation or particle system or whatever id like... thx again, very cool!
@@TVBUDDHAS Hey ! :) I actually have plans to make a tutorial on making a nodal editor. I just haven't gotten to doing it yet. ^^' (But it still is planned and I'm moving it up my roadmap). Regarding the "next" button, this can be done by modifying ```UIDialogueTextBoxController``` so that it calls ```m_DialogueChannel.RaiseRequestDialogueNode(m_NextNode);``` when it detects a click on the button. And for your third question, I can see 2 solutions. The first is to add a Unity Event in ```DialogueNode``` that would be invoked when the node is started (can be called in ```DialogueSequencer.StartDialogueNode```). The second solution is to make a component that listens to the ```OnDialogueNodeStart``` in ```DialogueChannel```. And once it detects that the right node has started, it does whatever it needs to do. I hope this helps. ;)
@@fluffygamedev thx!! a nodal editor would be amazing! I managed to add a NEXT button logic, but the "submit" function, if taken off, makes the whole system not work... I tried your first solution but im confused - a scriptable object cant invoke events using gamebojects in the scene... so what can be done to achieve that? thx!!
ok, your 2nd suggestion worked, with the help of this general tutorial: ruclips.net/video/HVls6_srbNc/видео.html&ab_channel=InfinityPBR%E2%80%A2MagicPigGames but now the event is triggered for ANY node activated... what can i do to allow myself to choose a SPECIFIC dialogue node, from my created SO, that only it triggers the event? I guess its kinda like re-creating Fungus lol
ok managed to do it lol, just put the same above logic, into the basic & choice SO nodes scripts. :) now i can choose which specific nodes can trigger specific unity events in the scene :) thx!!
how do you use this to connect to other ui or other mechanics of the game. for example, how can i display a specific dialogue if ever i present an object from inventory to the npc?
For this example, one possible thing would be to have a virtual function in *DialogueChoice* to determine if a choice is available. You could then implement a child class that would check the inventory to decide whether or not to display the choice. However that would mean having to make a custom editor for the dialogue choice node. Alternatively, you can make a scriptable object whose purpose is to check specific conditions. And Dialogue Choices would have a reference to such a scriptable object to check if the choice is available. That can be the subject of an entire video. I hope this helps. 😉 If you want we can discuss this further via DM on Twitter or Discord.
@@fluffygamedev Oh I see I'll definitely try that. Sorry for the additional question. Anyways thank you for the tip though cannot promise to succeed since I'm not that good at it but still, a good way to learn.
So what would happen is a 3d game where the player is in the room. The player in the bottom right corner of the game screen has a type box. There is a riddle in the room on a piece of paper. The player has to type in the text box on their screen (It's a 1st person game) the correct answer. If correct, I put 2 cubes as a one cube represents the closed and when you guess correct answer it is deactivated but turn off and the other cube representing the open door active. I trying to do that. Could I do that through here?
If I understand correctly, the type box would always be present on the screen. But once you are in the room containing the riddle, only then does entering the right answer have an effect. Is that right ? If so, I probably wouldn't use the dialogue system (though it could be possible with a new dialogue node type 😁). Instead, one thing you could do is to send what is typed in the type box to an event channel. Then you'd have a script handling the riddle itself that would register to that event channel. Depending on what is sent via the channel, that script can then determine if the player has typed the right thing and update the cubes accordingly. (More info on Event Channels here: ruclips.net/video/WLDgtRNK2VE/видео.html) I hope this helps. 😀
@@fluffygamedev I literally tried everywhere. As a person who can't code on his own and surprisingly in his 4th year of highschool, I can't create it on my own and stuff. I tried to see hey let me see how to see the input from 1st person view well what I explained up there..
I found the game clips quite distracting. There is text shown in those clips that aren't the words that youre saying yourself. Although the video is useful, thankyou
Such an awesome video man! It's really well produced for a smaller channel. This is exactly what I was looking for. However, I'll wait until you upload the implementation with a node-based approach since that's what I'm looking for. I've got one question for you. In my game, I want particular choices to enable particular items. For example, choice A will enable a chocolate bar in the next scene, and choice B will make it so that the chocolate bar isn't visible. I'm thinking of doing this through simple booleans. So will this system be able to change boolean values based on the dialogue choice?
Thank you ! I am glad you enjoyed this video. 😁 Regarding the chocolate bar thing, I'd say you could add a UnityEvent to the choice class. That way, whenever a choice is chosen, you can trigger its event. In this case, the UnityEvent could send a message via an event channel to notify whether or not the chocolate bar should be visible.
i also want some choices to make specific things, did u found a way to do it? i tried different ways to do it but i cant manage to finde a solution =((
@@teo-chan One thing you can try is to add a Unity Event to the DialogueChoice class. This event would then be called when the choice is chosen. That way, choosing a dialogue option can cause pretty much anything you want.
@@teo-chan The easiest way to create branching dialogues if to use the "Ink" software. Setting it all up with Unity is a bit hard to understand for beginners, but it's pretty easy overall. You just set it up, you script your dialogues in the Inky editor, and then you're good to go. It's been a really huge life saver for me. To learn how to set it all up, check out this video series: ruclips.net/p/PL4vbr3u7UKWoAa5Siot9mRluSOexbxnrI
That's because I don't follow that specific coding convention for my own projects. I find it adds some useless noise. Years ago, it might've been useful but nowadays, IDEs make it easy/fast to peek at the declaration of a class/interface. Furthermore, I come from a C++ background where interfaces aren't really a thing (at best, classes with only pure virtual methods) so it never quite became a habit. That being said, if I work with a team that uses that convention, so will I.
@@fluffygamedev From what I understand, the "I" prefix helps to distinguish whether you're inheriting from a class or from an interface. Like class CustomClass : IDamageable would be different from CustomClass : Damageable. (Damageable could be a monobehaviour abstract class) It's understandable if you don't use it in your own projects, but i believe it's a good practice and it should be worth adding/mentioning in your tutorial.
If that can help, you can find that file on github. github.com/FluffyGameDev/DialogueSystem/tree/main/Assets/Scripts/UI/Dialogue I usually don't elaborate too much on the UI on this channel since interfaces can vary greatly from one game to another. But I guess I can talk about them at least a bit more. 😅
When I saw the short video time I thought this is one of these "dialog" videos that only show you how to display a list of strings instead of actual dialog stuff like choices etc, but damn was I wrong, this is one of the best dialog videos that I saw so far.
same bro
Why is this so professional yet so underrated
I'm surprised you don't have more views! I'll definitely be here to see what you'll bring in the future!
Thank you for your support! :)
If there are some subjects you think I should cover, please let me know. I'll be glad to make a video for it!
Best dialogue tutorial that I've found so far. Actually implements dialogue choices. Good stuff, sir!
Wow!!! This is literally what I've been looking for all this time. And in less than 10 minutes!!! God!!! You're amazing, thank you so much!!!
I'm glad this was helpful. If there's even the smallest thing you'd do differently, feel free to let me know. ;)
man, i agree with all comments. this video is underrated, this deserves way more. i am thinking for way too long about this dialogue system, and is truly hard. as other guy commented, also, your naming is perfect. will revisit this video more than once
Great tutorial!
I would love to see the game flow management tutorial that you spoke about at 8:34.
Thanks!
Good to know!
In that case I'll increase its priority in my video roadmap. ;)
That is amazing - Saved on my "Development" Page on youtube to watch again in the future!
Thank you !
To be honest, there are a couple things I'd change such as the fact that there are too many scriptable objects. 😅
But still, I'm glad you found this tutorial useful. 😁
great video, the repo helped a lot to understand the code too! A follow up video on how to create a UI for dialogue creation would be beautiful
Let's just say I have a few plans regarding edition. It may take a while for me to release a tutorial on that (since there are other videos I need to do to explain nodal edition). But very soon, I'll post an announcement regarding the future of the dialogue system.
@@fluffygamedev cool, looking forward to it!
REALLY! This is only your second tutorial video. I'm impressed at the advanced C# code used. I expected a Jimmy Vegas or Brackeys style, but you really know your stuff. I found this vid in my RUclips recommendations. I was actually just starting to make my Dialogue system too. Hmmm how does Google know all this?!?
IKR, it's crazy how accurate the recommandations can be at times. O.o
Anyway, thank you for the kind words! I've been making games for a while now. I figured I'd might as well share what I know. ;)
The Cherno in recommended? I salute you, fellow developer.
I feel honoured!
Man, what a perfect video, I really want to make games but i feel tutorials often are lacking critical information, and are presented in a way more suited to just learn a few basic programming concepts, not to actually use in a game. Not this one, this one is brilliant, it's to the point, you show code that is ready instead of needlessly typing it in front of the camera, it's clean a beautifuly presented, and the information is gold, i feel it's still a bit out of my reach as an intermediate, but it's exactly what i needed both information and motivation-wise to break out of the intermediate level. Please keep making those, some things you mentioned such as the game flow managment and the visitor design pattern feel super useful and i know 0 about them. Thank you so much, truly, the best tutorial i have ever had the pleasure of watching.
I'm glad to hear this video has helped you ! :)
I'll move up the visitor & game flow videos in my video roadmap.
Nice video, Ive been searching a lot to find. Thanks ;)
I can feel my brain expanding while watching this
Very good code quality!
The best video ever! Thank you for sharing
Amazing video, extremely interesting and in-depth!
Strange and off topic question. What is that game at 0:53?
The game is called Iconoclasts! Great game btw!
The tutorial is great! I do however find the style of programming a little hard to adjust (likely lack of knowledge), but I'd like to add an option to with certain choices adjust a chosen variable, or perhaps cause for an action. How would I go about adding this?
Hi ! :)
Indeed, that is a very useful feature that is missing (and that I probably ought to cover in a future tutorial). I'd probably implement that by creating an extra node type that, when entered, would trigger an event. For example, I've seen that kind of node in another dialogue system here: github.com/Siccity/Dialogue/blob/master/Scripts/Nodes/Event.cs.
I need this system to trigger events within their scriptable objects. But I have no clue how to implement those.
This is pretty slick. My system ended up being somewhat similar (but way less well named). One difference I went with was having a scriptable object event that can fire before each line finishes and another after each line ends. In this way if we want to connect events in the scene optionally to points in the conversation that can be done. But yeah, back to first point. I desperately need to get better at naming classes.
Indeed ! Those events can be extremely useful ! 😁
Regarding naming, I still have some ways to go, but one thing I do that helps a bit is to ban words such as "Manager", "Handler", ... It forces me to think about what my classes actually do.
And by keeping classes small (Thus following the Single Responsibility Principle), it's easier to find words describing the purpose of the class.
@@fluffygamedev I'm gonna give this a shot. I stopped using "Controller" because I noticed nearly everything became xController.
Thanks. Love your presentation style by the way. Very pleasant, good pacing.
@@oafkad Come to think of it, I tend to use "Controller" a bit too much too. (Especially in UI code where it really should be "Presenter" if I want to be correct; since I tend to go for a MVP architecture 😅).
Anyway, thank you for the kind words ! 😊
Dang I was so wrong when I thought implementing dialogue system with choice wouldn't be that difficult
If there's anything I can do to make things easier, feel free to contact me on Discord. ;)
You are amazing !! Can you please tell us about Save systems next ? There are so many different ways of doing it
Absolutely! It may not be my next video, but I can cover it soon™. ;)
I would like to see how you should use this system creating an example of dialogue with multiple choices.. It would be the perfect final for this amazing guide. Is it possible !?
That can totally be done. I still have to do the part 2 on the nodal editor. So I can detail multiple choices at that point.
@@fluffygamedev if I already have a working version of your code in my project, is following a tutorial like this ruclips.net/video/7KHGH0fPL84/видео.html to make a GUI for the nodes doable?
Hi ! :)
Absolutely! Those past weeks, I have been experimenting with several Nodal Editor APIs to see how to implement the one for the dialogue system for my next video.
So far, I've found that it's useful to have a clear separation between the graph classes and the dialogue system classes. After all, at runtime, we only care about the nodes and how they relate to one another. Not about their coordinates in the graph editor. So in practice, I have a dialogue graph class that instantiates the actual dialogue.
I hope this helps :)
I want to be able to have my player type in an answer to a riddle and the door would open.
how can i trigger the dialog using a different key instead of the space button?
game at 0:51?
It's called Iconoclasts. I enjoyed playing that one !
@@fluffygamedevthanks!!
You are nothing less than an angle at this moment for me...I have 7DFPS submission after 2 days. I was making the environment the whole week and just realised that I have a freaking huge story to integrate 😂. And I don't know why , but I was suddenly making a whole huge story game just for a Gamejaam.
Hey thanks for this tutorial !
The script for the DialogueChoiceButton look incorrectly on Github is a (.prefab) and not a (.cs) files. Can u reupload please ?
I really love this one but I have one problem 😅 i have no idea how to translate dialogues because every text we store is in the scriptable objects
Just in case, what should I do if I want my DialogueChoice Channel to have a response like once the user clicks the button, it will pop out a shop canvas?
The way I'd do this is to have a Unity event that would be triggered at the end of a dialogue line (So probably in *BasicDialogueNode*).
That way, once the player chooses a shop dialogue choice, you can then trigger a dialogue node with something your NPC might say before showing their wares. And after that line, the event would in turn trigger the opening of the shop canvas (via an event channel for example).
Alternatively, you could create a new type of dialogue node that opens the shop. The nice thing with that method is that you can have some dialogue lines after the player leaves the shop (to say goodbye for example). To do so, you'd have to have a class that inherit from *DialogueNode* and you'd have to update the dialogue node visitors to handle your new node type.
Im new to scripting and stuff and wondered why you wrote private and public variable names.
What does the symbol => mean, when you say "public string Text => m_Text;"?
Thank you in advance!!
Hi! I'm working on my first gamedev project and kinda got no idea what im doing, so i'm really glad to have found your videos! I do have a question though, when I try to do the whole dialogue via a button thing (just to try it out before I connect it to a game object) I get an error message of "ArgumentException: Object of type "UnityEngine.Object" cannot be converted to type "Dialogue". But as previously mentioned, I got no idea what im doing so that error message tells me nothing, I don't know if I missed a step or of it's something else that is causing it T_T Any help would be much appreciated! (if it helps I'm doing this in 2d, idk if that has anything to do with anything for this particular thing though)
Heya!
I'll be glad to help out. :)
When you click on an error in the debug window, you can get more detailed version of the error (also known as the callstack). Can you send that to me?
If it can help, we can discuss all that directly via DM on Twitter or Discord.
i feel like having one type of node would decrease the complexity of the script
I agree. I plan on doing a refactor of this system. One improvement I'll do is to have one node type to display text. I may still have extra node types. For exemple, nodes that trigger events or nodes that check conditions.
@@fluffygamedev cool
could you show how to make the node & lines system much more visual, in the inspector? its quite complex now to keep track of all your characters \ nodes \ lines if its all via scriptable objects in your assets folders... thx! :D
also, can you explain how to have a "next" button that user presses to progress in the dialogue? I dont want to use the "submit" (spacebar) but would rather it would all be with mouse clicks on buttons - moving between nodes, choices, ending, etc...
alsooooo, is there a way to integrate unity events into this system, so we could trigger events when, lets say, a node is triggered? for instance - character has reached a certain dialogue node, and reaching it will also trigger an animation or particle system or whatever id like...
thx again, very cool!
@@TVBUDDHAS Hey ! :)
I actually have plans to make a tutorial on making a nodal editor. I just haven't gotten to doing it yet. ^^'
(But it still is planned and I'm moving it up my roadmap).
Regarding the "next" button, this can be done by modifying ```UIDialogueTextBoxController``` so that it calls ```m_DialogueChannel.RaiseRequestDialogueNode(m_NextNode);``` when it detects a click on the button.
And for your third question, I can see 2 solutions. The first is to add a Unity Event in ```DialogueNode``` that would be invoked when the node is started (can be called in ```DialogueSequencer.StartDialogueNode```). The second solution is to make a component that listens to the ```OnDialogueNodeStart``` in ```DialogueChannel```. And once it detects that the right node has started, it does whatever it needs to do.
I hope this helps. ;)
@@fluffygamedev thx!! a nodal editor would be amazing!
I managed to add a NEXT button logic, but the "submit" function, if taken off, makes the whole system not work...
I tried your first solution but im confused - a scriptable object cant invoke events using gamebojects in the scene... so what can be done to achieve that?
thx!!
ok, your 2nd suggestion worked, with the help of this general tutorial:
ruclips.net/video/HVls6_srbNc/видео.html&ab_channel=InfinityPBR%E2%80%A2MagicPigGames
but now the event is triggered for ANY node activated...
what can i do to allow myself to choose a SPECIFIC dialogue node, from my created SO, that only it triggers the event?
I guess its kinda like re-creating Fungus lol
ok managed to do it lol, just put the same above logic, into the basic & choice SO nodes scripts. :) now i can choose which specific nodes can trigger specific unity events in the scene :) thx!!
how do you use this to connect to other ui or other mechanics of the game. for example, how can i display a specific dialogue if ever i present an object from inventory to the npc?
For this example, one possible thing would be to have a virtual function in *DialogueChoice* to determine if a choice is available. You could then implement a child class that would check the inventory to decide whether or not to display the choice. However that would mean having to make a custom editor for the dialogue choice node.
Alternatively, you can make a scriptable object whose purpose is to check specific conditions. And Dialogue Choices would have a reference to such a scriptable object to check if the choice is available. That can be the subject of an entire video.
I hope this helps. 😉
If you want we can discuss this further via DM on Twitter or Discord.
@@fluffygamedev Oh I see I'll definitely try that. Sorry for the additional question. Anyways thank you for the tip though cannot promise to succeed since I'm not that good at it but still, a good way to learn.
No worries, we all have to learn somewhere. Do not hesitate to ask if you have some questions. I'll be glad to answer ! 😁
So what would happen is a 3d game where the player is in the room. The player in the bottom right corner of the game screen has a type box. There is a riddle in the room on a piece of paper. The player has to type in the text box on their screen (It's a 1st person game) the correct answer. If correct, I put 2 cubes as a one cube represents the closed and when you guess correct answer it is deactivated but turn off and the other cube representing the open door active. I trying to do that. Could I do that through here?
If I understand correctly, the type box would always be present on the screen. But once you are in the room containing the riddle, only then does entering the right answer have an effect. Is that right ?
If so, I probably wouldn't use the dialogue system (though it could be possible with a new dialogue node type 😁).
Instead, one thing you could do is to send what is typed in the type box to an event channel.
Then you'd have a script handling the riddle itself that would register to that event channel.
Depending on what is sent via the channel, that script can then determine if the player has typed the right thing and update the cubes accordingly.
(More info on Event Channels here: ruclips.net/video/WLDgtRNK2VE/видео.html)
I hope this helps. 😀
@@fluffygamedev thank you so much I'll let you know if it works right when i code it
@@fluffygamedev I literally tried everywhere. As a person who can't code on his own and surprisingly in his 4th year of highschool, I can't create it on my own and stuff. I tried to see hey let me see how to see the input from 1st person view well what I explained up there..
If you want, we can discuss a solution via DM on Discord or Twitter.
I'd be glad to help. 😁
@@fluffygamedev thank you so much cause I could snap shot too
I found the game clips quite distracting. There is text shown in those clips that aren't the words that youre saying yourself. Although the video is useful, thankyou
Thank you for your feedback!
I'm still working on my video making so any feedback is precious :)
Such an awesome video man! It's really well produced for a smaller channel. This is exactly what I was looking for. However, I'll wait until you upload the implementation with a node-based approach since that's what I'm looking for.
I've got one question for you. In my game, I want particular choices to enable particular items. For example, choice A will enable a chocolate bar in the next scene, and choice B will make it so that the chocolate bar isn't visible. I'm thinking of doing this through simple booleans. So will this system be able to change boolean values based on the dialogue choice?
Thank you ! I am glad you enjoyed this video. 😁
Regarding the chocolate bar thing, I'd say you could add a UnityEvent to the choice class. That way, whenever a choice is chosen, you can trigger its event. In this case, the UnityEvent could send a message via an event channel to notify whether or not the chocolate bar should be visible.
@@fluffygamedev Ahh okay. I think I've worked with events only once before. I'll take a look at the docs and some tutorials. Thanks for the tip!
i also want some choices to make specific things, did u found a way to do it? i tried different ways to do it but i cant manage to finde a solution =((
@@teo-chan One thing you can try is to add a Unity Event to the DialogueChoice class. This event would then be called when the choice is chosen.
That way, choosing a dialogue option can cause pretty much anything you want.
@@teo-chan The easiest way to create branching dialogues if to use the "Ink" software. Setting it all up with Unity is a bit hard to understand for beginners, but it's pretty easy overall. You just set it up, you script your dialogues in the Inky editor, and then you're good to go. It's been a really huge life saver for me. To learn how to set it all up, check out this video series: ruclips.net/p/PL4vbr3u7UKWoAa5Siot9mRluSOexbxnrI
i cant understand
Why does your interface name not start with the letter "I"?????
That's because I don't follow that specific coding convention for my own projects. I find it adds some useless noise. Years ago, it might've been useful but nowadays, IDEs make it easy/fast to peek at the declaration of a class/interface. Furthermore, I come from a C++ background where interfaces aren't really a thing (at best, classes with only pure virtual methods) so it never quite became a habit.
That being said, if I work with a team that uses that convention, so will I.
@@fluffygamedev From what I understand, the "I" prefix helps to distinguish whether you're inheriting from a class or from an interface. Like class CustomClass : IDamageable would be different from CustomClass : Damageable. (Damageable could be a monobehaviour abstract class)
It's understandable if you don't use it in your own projects, but i believe it's a good practice and it should be worth adding/mentioning in your tutorial.
It was so good until it got to the UIDialogueTextBoxController. You did not show your whole skript. ::((
If that can help, you can find that file on github.
github.com/FluffyGameDev/DialogueSystem/tree/main/Assets/Scripts/UI/Dialogue
I usually don't elaborate too much on the UI on this channel since interfaces can vary greatly from one game to another. But I guess I can talk about them at least a bit more. 😅