Wait wait wait... I told you about the Input provider trick some months ago, and now i come back, and you have 37k subscribers... Well done Zyger! And well deserved aswell! Keep up the hard work! All love from here!
This is a great tutorial! Works like a charm and it's super simple to set up. One issue I want to mention is if you're trying to take advantage of rich text, such as bolding text, changing colors, etc, this method will be very messy. It doesn't interpret the tags until it's fully spelled out, leading to it typing out those characters until it's all typed out and it can render the rich text properly. If you're plan is to use this tutorial but also want to leverage rich text, you'll need to consider another way.
Good video, I'm Brazilian so I'm trying to learn how to program from time to time, and I was taking a beating to make a dialog system (mainly because most videos are English, and I definitely don't speak English decently) but your video did it get into my potato brain. A little hug from Brazil :)
There is a slight bug where if the player tries to continue the text while its still typing the text appears all messed up. to fix this issue we need to be able to stop the player from continuing the text while its still typing. So create a private bool called nextText and set it to true (private bool nextText = true;). And in the update function where you call NextSentece(); create an if statement checking whether the bool is true. then in that if statement set the nextText = false; (ensure this is set before actually calling the nextSentence(); function). Finally where you have Index++; write on a new line nextText = true; - this should fix the issue!
Nice and simple, dialogue systems are a good beginner example in UI. I would definitely think about teaching this. Note : Your shadow is not very natural because you tried to make a drop show. But its size is bigger than the object. That wouldn't be a problem is the vertical lines weren't parallel to the object (meaning that the light is not full facing the object) But here you have a positive vertical offset meaning the light is higher than your dialog. Then the shadow would be like / \
For thoese who can't see the text in game, try using world space in Canvas to fix it, sometimes changing it to other mode also helps, just a thing i found out that some mode hide the text
I did what you did but called the variables different names, so I have "Char character in words[noelle]", which as a UT;DR fan, I find hysterical, given I didn't know this is what I'll end up doing
Something I have noticed from watching your videos for a long time now is that you seem to have an over-reliance on coroutines. Coroutines are great but not for something like this. Coroutines are much better used for something that doesn’t necessarily need to run in the main thread such as background processing of data over multiple frames. Due to your coroutine not running in your main thread/Update loop you’ll find that if you wanted to scale this system up you’ll run into bugs caused by race conditions. For example, you can’t handle input in a coroutine so if you wanted to make it so you could skip a sentence? You could probably make it so it clears the text, and starts on the other. But your coroutine is already processing the old text so you’ll also have to restart the coroutine. It just becomes a constant battle against your code.
Actually, you're thinking about multithreading. Coroutines still run on the main thread, they just run over multiple frames. It's more similar to async/await than it is to multithreading.
I need help ;_; This works really really good, but how do I expand it? how do I use it again for another character or the same character but different conversation? Do I just copy the script over and over or is there a better way?
Hi thank you. You can call the event when you collide with an npc or object or maybe once you actively click on them to talk? it can be used in many ways just by calling a function with the dialogue.
I wonder if it can be modified where when the cat asks a question we can answer it maybe it can be implemented but im not sure anyway how's going with the development of the game i hope doing great anyway i hope you all the luck on it and stay safe 😊👍
did you remember to set the text to " " when you load a sentence. If you make sure to set it to nothing before loading text then you should be fine. let me know if you have any issues. or message me on discord and I cant help you trouble shoot the problem. Zyger#3045
@@ZygerGFX I added you! Mine gets messed up too, but I think it's because it's still writing the last sentence. I don't really know how to fix it tho :(
I’ve written the code exactly how it says, but I still get an error that says “the name Sentences does not exist in the current context. I’m not sure what to fix.
Great video :) I would like to ask that, at the start you already had a dialog imported. How did you get that? sorry I know it's silly just want to get this right :)
check your inputs in unity and if they are set up correctly. and ensure the bit of code has no errors or anything. if the problem persists message me on discord and ill try help you with the issue. Zyger#3045
I cannot believe you just posted what I was looking for.
Wait wait wait... I told you about the Input provider trick some months ago, and now i come back, and you have 37k subscribers... Well done Zyger! And well deserved aswell! Keep up the hard work! All love from here!
OMG, you just read my mind! That’s what I needed!!! Thanks!
This is a great tutorial! Works like a charm and it's super simple to set up.
One issue I want to mention is if you're trying to take advantage of rich text, such as bolding text, changing colors, etc, this method will be very messy. It doesn't interpret the tags until it's fully spelled out, leading to it typing out those characters until it's all typed out and it can render the rich text properly.
If you're plan is to use this tutorial but also want to leverage rich text, you'll need to consider another way.
Good video, I'm Brazilian so I'm trying to learn how to program from time to time, and I was taking a beating to make a dialog system (mainly because most videos are English, and I definitely don't speak English decently) but your video did it get into my potato brain.
A little hug from Brazil :)
Neat tutorial! When you check for sentence length you can do Index < Sentences.Length. 👍
Thanks ! Oh yeah just realised I could of just used the
The thing is that i now develop apps in visual studio itself otherwise u wouldve been a great help!
This came out right as I needed it
I downloaded twitch only to see your stream and learn from it😁
There is a slight bug where if the player tries to continue the text while its still typing the text appears all messed up. to fix this issue we need to be able to stop the player from continuing the text while its still typing. So create a private bool called nextText and set it to true (private bool nextText = true;). And in the update function where you call NextSentece(); create an if statement checking whether the bool is true. then in that if statement set the nextText = false; (ensure this is set before actually calling the nextSentence(); function). Finally where you have Index++; write on a new line nextText = true; - this should fix the issue!
BuckO here ^^
Hope this helps for the rest of the community ^^
how to write this? i dont understand 😅
@@nurnadhirah2981 Write it in the same script that was used in the tutorial
@@ZygerGFX hi i already do this but whenever i try to start the text again, the text not gonna show up
IEnumerator WriteSentence()
{
foreach(char character in sentenceArray[stringIndex].ToCharArray())
{
textBox.text += character;
textTypingDone = false;
yield return new WaitForSeconds(0.025f);
}
textTypingDone = true;
}
can you do one with choices?
Nice and simple, dialogue systems are a good beginner example in UI. I would definitely think about teaching this.
Note : Your shadow is not very natural because you tried to make a drop show. But its size is bigger than the object.
That wouldn't be a problem is the vertical lines weren't parallel to the object (meaning that the light is not full facing the object)
But here you have a positive vertical offset meaning the light is higher than your dialog. Then the shadow would be like / \
Hey I love your videos, keep up the good work. ❤💙💜💖💗💘
Thank you !
For thoese who can't see the text in game, try using world space in Canvas to fix it, sometimes changing it to other mode also helps, just a thing i found out that some mode hide the text
Great tutorial, Simple and nice.
Awesome video. Exactly what I needed :)
Information = Useful; 😀 Love the Videos!
thanks :)))
Very helpful tutorial, love your content, keep going 🔥
I did what you did but called the variables different names, so I have "Char character in words[noelle]", which as a UT;DR fan, I find hysterical, given I didn't know this is what I'll end up doing
awesome as always
inumerator, more like, i love this tutorial video(joke from dani but changed, luv your vids :)
a fun litel tutorial! :D
Something I have noticed from watching your videos for a long time now is that you seem to have an over-reliance on coroutines. Coroutines are great but not for something like this. Coroutines are much better used for something that doesn’t necessarily need to run in the main thread such as background processing of data over multiple frames. Due to your coroutine not running in your main thread/Update loop you’ll find that if you wanted to scale this system up you’ll run into bugs caused by race conditions.
For example, you can’t handle input in a coroutine so if you wanted to make it so you could skip a sentence? You could probably make it so it clears the text, and starts on the other. But your coroutine is already processing the old text so you’ll also have to restart the coroutine. It just becomes a constant battle against your code.
Actually, you're thinking about multithreading. Coroutines still run on the main thread, they just run over multiple frames. It's more similar to async/await than it is to multithreading.
Wow, needed that
very helpful video!
I need help ;_; This works really really good, but how do I expand it? how do I use it again for another character or the same character but different conversation? Do I just copy the script over and over or is there a better way?
Great video! :)
Could you show how to make a response system for this?
Great tutorial, help me! how can i make the dialogue come back with a back button?
This works great! I wonder how i can make it so it interacts with objects or NPC's?
Hi thank you. You can call the event when you collide with an npc or object or maybe once you actively click on them to talk? it can be used in many ways just by calling a function with the dialogue.
Nice, very cool
thank you !
help!!!! mine comes out like this:
hello
I llllllliiiiiiiiikkkkkkkkeeeeeee
fiiiiiiissssssshhhhhh
dddddooooo yooouuuuuuu
how do i fix this?
I wonder if it can be modified where when the cat asks a question we can answer it maybe it can be implemented but im not sure anyway how's going with the development of the game i hope doing great anyway i hope you all the luck on it and stay safe 😊👍
Great.
I am your new subscriber
how do i make this to change image for each character talking in the dialogue
Great tutorial, I didn't know you can asign-add characters to TextMeshPro :) One suggestion, why using Index
This is hrlpfull
Would you have to set up the dialogue manager for like every npc in a scene if you wanted to talk to multiple characters?
Guys, is it just in my code or when you interrupt the dialogue system text and you load the next text your sentence appears all messed up?
did you remember to set the text to " " when you load a sentence. If you make sure to set it to nothing before loading text then you should be fine. let me know if you have any issues. or message me on discord and I cant help you trouble shoot the problem. Zyger#3045
@@ZygerGFX I added you!
Mine gets messed up too, but I think it's because it's still writing the last sentence. I don't really know how to fix it tho :(
@@angrygeri7026 Same issue! I added the " " 's but it still is messed up
@@buckieblu Since yesterday I figured it out and actually created a nice little system!
I can link it if you want.
is it possible to add sound for each time you press space?
I can't find the variables in the inspector, anyone know what I may have done wrong?
Nevermind, I just forgot to add some semicolons!
Nice ;D
I am a game developer using Unreal engine
I’ve written the code exactly how it says, but I still get an error that says “the name Sentences does not exist in the current context. I’m not sure what to fix.
join my discord and message in the "Help" channel I'll see if I cna help
Great video :) I would like to ask that, at the start you already had a dialog imported. How did you get that? sorry I know it's silly just want to get this right :)
Do you mean the images ??
Did you see the snydercut?
Why are you not streaming on twitch?
👍
When I press the key the text wont appear :(
check your inputs in unity and if they are set up correctly. and ensure the bit of code has no errors or anything. if the problem persists message me on discord and ill try help you with the issue. Zyger#3045
@@ZygerGFX Wow so nice of you, thanks! I will check the input, thank you again
Plz plz help me do a car game plz 😭 maybe like Dani plz I am a beginner soo plz