5 Minute DIALOGUE SYSTEM in UNITY Tutorial

  Рет қаралды 174,290

BMo

BMo

Күн бұрын

Пікірлер
@Cerified
@Cerified 8 ай бұрын
For those who are confused as to where to put your text. When you go to the DialogueBox’s inspector, underneath the Dialogue script tab, there’s another tab called ‘Lines’. That’s where you add it! :)
@Prudento-j1u
@Prudento-j1u 7 ай бұрын
nice
@amyguzman3502
@amyguzman3502 7 ай бұрын
Hm weird, I cannot find it
@amyguzman3502
@amyguzman3502 7 ай бұрын
nvm just found it!
@agustinquindimil6594
@agustinquindimil6594 6 ай бұрын
I can put this script anywhere and then call it when I press "e" lets say, right?
@angeloharrysumagui4238
@angeloharrysumagui4238 19 күн бұрын
OMG THANKYOUUUUU
@igseatsyursoul
@igseatsyursoul 2 жыл бұрын
Finally a dialogue that is basic with no bells and whistles that I can fully customize. Too many of the other tutorials on this added way more than I want for my small game.
@LucasHenrique-xj8uy
@LucasHenrique-xj8uy 2 ай бұрын
yoo, how is the game going, still working on it? :)
@LaneWatson
@LaneWatson 3 жыл бұрын
Ahh yes. Got my 5 minute fix. The most useful tutorials on Unity.
@BMoDev
@BMoDev 3 жыл бұрын
Haha thanks! Appreciate ya
@PlagueDoctor856
@PlagueDoctor856 8 ай бұрын
INCORRECT! THIS VIDEO IS 5:10 MINUTES LONG
@mrwaffl333
@mrwaffl333 2 ай бұрын
@@PlagueDoctor856 🤓🤓🤓🤓
@Sazzy__
@Sazzy__ Ай бұрын
@@PlagueDoctor856 acktually 🤓🤓 the outro is 10 seconds long making the dialog system tutorial exactly 5 minutes
@djt3rrv875
@djt3rrv875 2 жыл бұрын
God thank you SO MUCH for including the complete on click function!!!! A lot of tutorials don't, and it really sucks as a player to be waiting and waiting for this shit to type itself out (especially if you read fast). Such a clean and clear cut tutorial!!! Thank you!!!
@BMoDev
@BMoDev 2 жыл бұрын
Appreciate it!
@dr.adammoore
@dr.adammoore Жыл бұрын
Most efficient Unity tutorial I've ever seen--and it makes perfect sense! You just made my day. And, my first subscribed channel ever. Thank you.
@IceCream-sb7lc
@IceCream-sb7lc 3 жыл бұрын
Supporting your return by watching the entire ad and this entire tutorial. I request a gourmet dialogue system tutorial with decision making please.
@BMoDev
@BMoDev 3 жыл бұрын
The real mvp 😭
@revmatch6r
@revmatch6r 3 жыл бұрын
Exactly what I needed. These are the best I've been able to find. Looking forward to more videos soon 🙌
@BMoDev
@BMoDev 3 жыл бұрын
Thanks dude!
@section8entertainment961
@section8entertainment961 Жыл бұрын
using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class Dialogue : MonoBehaviour { public TextMeshProUGUI textComponent; public string[] lines; public float textSpeed; private int index; // Start is called before the first frame update void Start() { textComponent.text = string.Empty; StartDialogue(); } // Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { if (textComponent.text == lines[index]) { NextLine(); } else { StopAllCoroutines(); textComponent.text = lines[index]; } } } void StartDialogue() { index = 0; StartCoroutine(TypeLine()); } IEnumerator TypeLine() { foreach (char c in lines[index].ToCharArray()) { textComponent.text += c; yield return new WaitForSeconds(textSpeed); } } void NextLine() { if (index < lines.Length - 1) { index++; textComponent.text = string.Empty; StartCoroutine(TypeLine()); } else { gameObject.SetActive(false); } } }
@yaboishadowninja
@yaboishadowninja Жыл бұрын
Thank you. I was following the video but for some reason it wasn't working. However, this did.
@Rdect25
@Rdect25 Жыл бұрын
chad
@AfterglowStudio13
@AfterglowStudio13 Жыл бұрын
You are PERFECT
@innawoodsfmj
@innawoodsfmj 11 ай бұрын
life saver you are
@TwoClutch
@TwoClutch 10 ай бұрын
i love you dad
@ertyuu35
@ertyuu35 3 жыл бұрын
Thank you so much. Even though I watched a 30 minute tutorial, I couldn't' do it, but thanks to your 5 minute tutorial, I did it easily.
@BMoDev
@BMoDev 3 жыл бұрын
love to hear it
@deadbroadcastpc
@deadbroadcastpc 3 жыл бұрын
He’s alive!!!!! Glad to see you back man
@BMoDev
@BMoDev 3 жыл бұрын
Thanks man, will try to get back into a rhythm 😅
@eileeng2492
@eileeng2492 3 жыл бұрын
Finally, you're back. Great! Keep them coming
@bobgala4494
@bobgala4494 7 ай бұрын
ty
@GrimCrayontheWraithLord
@GrimCrayontheWraithLord 10 ай бұрын
OMG! I WAS TRYING OTHER TUTORIALS, AND THEY DIDN'T WORK FOR ME, BUT THEN I COME HERE AND IT WORKS FIRST TRY!!! This is EPIC!!!
@BMoDev
@BMoDev 10 ай бұрын
You're epic
@GrimCrayontheWraithLord
@GrimCrayontheWraithLord 10 ай бұрын
@@BMoDev :O
@lordkakabel76
@lordkakabel76 3 жыл бұрын
I love the way you break things down. Very easy to understand.
@BMoDev
@BMoDev 3 жыл бұрын
delayed answer, but thanks man I appreciate ya 🙏
@jehriko7525
@jehriko7525 2 жыл бұрын
THANK YOU! Been struggling with this because I suck at coding but this helped a ton, def subbing.
@Josue-Arreaga
@Josue-Arreaga 2 жыл бұрын
honestly you deserve it. This video, the last one I saw, the one before it. Subscribed
@CASMANWHAT
@CASMANWHAT 3 жыл бұрын
Yesss!!!!!!!!!!! Welcome back love your tuts
@BMoDev
@BMoDev 3 жыл бұрын
💗
@HivemindZalgo
@HivemindZalgo Жыл бұрын
Jesus, why is it so hard to do something like what u did? Other videos take up 20-30 minutes of my life with extra stuff that's unnecessary but if I don't add the code will break. Thanks a lot!
@luluskuy
@luluskuy 2 жыл бұрын
This... Simply short and sweet. SUBSCRIBED!
@bigp0y
@bigp0y 3 жыл бұрын
Missed you, Bmo! Keep up the good work - I find your vids some of the easier tutorials to follow
@BMoDev
@BMoDev 3 жыл бұрын
😘
@jjbc5059
@jjbc5059 Жыл бұрын
I love this tutorial. Simple. Well explained. Short. It works. There's nothing else you can ask for. Good job m8!
@deheane
@deheane Жыл бұрын
Muito obrigada, em 5 minutos você ensinou mais que tutoriais extremamente longos :D
@shang_psycho7414
@shang_psycho7414 2 жыл бұрын
Thanks! This helped a lot. Something cool to add would be that sounds that play while someone's talking like Undertale.
@iwoMalki
@iwoMalki Жыл бұрын
Nice simple and fast! Lovely!
@thepolygonpilgrimage
@thepolygonpilgrimage 3 жыл бұрын
Brilliant work! Thanks so much for sharing and not wasting time. Love it. Subbed for more.
@homiek5974
@homiek5974 6 ай бұрын
one of the best tutorials, thanks brother
@barrelbrothers6896
@barrelbrothers6896 Жыл бұрын
Thank you man! Super detailed/concise tutorial 10/10.
@crazyconan28
@crazyconan28 2 жыл бұрын
Thank you BMo for your awesome videos. This was a awesome exercise to follow!
@cricadev
@cricadev 3 жыл бұрын
Hey bro, how can I do this but with the new input system from unity, GetMouseButtonDown, doesn't exist anymore.
@albireo_beta_cygni
@albireo_beta_cygni 3 жыл бұрын
man, thank you! this was exactly what i was searching for!
@BMoDev
@BMoDev 3 жыл бұрын
happy to hear it!
@SkeletalDweller
@SkeletalDweller Жыл бұрын
This is exactly what I needed, thank you so much!
@odessialiu3552
@odessialiu3552 8 ай бұрын
This is so clear and useful!
@EnemyOTS
@EnemyOTS 3 жыл бұрын
LMAO impressive! 5 minutes indeed. Great tutorial
@BMoDev
@BMoDev 3 жыл бұрын
Appreciate ya
@arrexu01
@arrexu01 2 жыл бұрын
Question. How would I be able to mix this with a multiple choice dialogue system?. Like, say my player would have a voice line, then naturally the npc would respond, but only once and the conversation is done. So what I mean is, how can i transition between both?
@Bittergiggle_gaming
@Bittergiggle_gaming Жыл бұрын
Thanks! This helped me with Normal Kindergarten! Now Nabnab, Chef Chick, Hopping Bun, Etc, Can Now Say What I Wanted It To Say!
@mortalvoidstudios
@mortalvoidstudios 2 жыл бұрын
Thank you so much! This was exactly what I was looking for.
@neffthepanda
@neffthepanda Жыл бұрын
Great video! Gonna use this for my NPCs.
@Noth0ng82
@Noth0ng82 5 ай бұрын
thank you, your tutorial is really helpful
@vain_rafael2868
@vain_rafael2868 Жыл бұрын
2 years old, still very useful!
@isaacwiseau8130
@isaacwiseau8130 Жыл бұрын
this is very good good but with all the zooming around I wish I could see more of the Unity window to see other values while working at my own pace
@m3amansour
@m3amansour 3 ай бұрын
Very useful tuto, thanks a lot
@BraedensStuff
@BraedensStuff 2 жыл бұрын
this was just perfect for what I needed
@ozgurgurbuz
@ozgurgurbuz 3 жыл бұрын
Thanks for this short tutorial. 😊
@BMoDev
@BMoDev 2 жыл бұрын
You're welcome!
@MadGeekGirl
@MadGeekGirl 2 жыл бұрын
Is there anyway to add this to multiple game objects and have the dialogue system come up when the game object is interacted with in some way? I've tried so many tutorials and methods and have been stuck for days.
@IGotNoNameZ
@IGotNoNameZ 4 ай бұрын
Did you find out. Same problem lol
@samasquarei
@samasquarei Ай бұрын
Have your player trigger the StartDialogue method when they press "x" button and is raycast hitting your dialogue character
@gr29215
@gr29215 15 күн бұрын
I know it's been two years from this coment, but I'm in that problem right now. Did you know how to solve it?
@samasquarei
@samasquarei 6 күн бұрын
@@gr29215 my reply is the solution.
@someobscuremusicchannel
@someobscuremusicchannel 2 жыл бұрын
the red x in the corner was killing me man
@valentinoworks
@valentinoworks 7 ай бұрын
For some reason at 3:48 the text component doesn't show up for my Dialogue Script...
@amyguzman3502
@amyguzman3502 7 ай бұрын
same
@gqsnowman
@gqsnowman 6 ай бұрын
It didn't for me either but I could still drag the script from the icons to the component and it showed up in the inspector.
@ikizlerlebirgun7119
@ikizlerlebirgun7119 3 жыл бұрын
I subscribed in 5 minutes
@BMoDev
@BMoDev 3 жыл бұрын
👏Thats how its done
@ginoantenucci6424
@ginoantenucci6424 Жыл бұрын
I am surprised it wasn’t one of those videos that has no talking and just coding at 3x
@imabean9710
@imabean9710 2 жыл бұрын
Thanks for helping me to make some task game programming
@AStixMatism
@AStixMatism 2 жыл бұрын
Dude I'm suing you for charges of "making programming too easy" This level of simplification should be illegal. You're too dangerous an entity to be left unwatched. Nah but jokes aside thank the heavens you existed, you just saved me trying to make a game in 2 weeks.
@310thebank
@310thebank 2 жыл бұрын
Dialogue I dont have TextCompunet space for drag to it what happen using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class Dialogue : MonoBehaviour { public TextMeshProUGUI textComponent; public string[] lines; public float textSpeed; private int index; // Start is called before the first frame update void Start() { textComponent.text = string.Empty; StartDialogue() } // Update is called once per frame void Update() { } void StartDialogue() { index = 0; StartCoroutine(TypeLine()); IEnumerator TyoeLine() { foreach (char c in lines[index].ToCharArray()) { textComponent.text += c; yield return new WaitForSeconds(textSpeed); } }
@siddeshas8193
@siddeshas8193 2 жыл бұрын
how you sloved bro after that same problem I'm also facing
@AnnoyingPyroMa1n
@AnnoyingPyroMa1n 2 жыл бұрын
@@siddeshas8193 Still need help? Because I found a code that works.
@section8entertainment961
@section8entertainment961 Жыл бұрын
you spelled TypeLine wrong in your IEnumerator function. you also have no ; after StartDialgoue in your Start function.
@TegridyMadeGames
@TegridyMadeGames 3 жыл бұрын
You're amazing...
@BMoDev
@BMoDev 3 жыл бұрын
@Woots
@Woots 3 жыл бұрын
Wonderful tutorial! Thanks!
@zerovega9604
@zerovega9604 5 ай бұрын
Sorry, i didnt notice the names before, but the Persona image is still misleading, the way you have it you cant separate the name from the rest of the text
@Trinity-zj1bm
@Trinity-zj1bm Ай бұрын
Might be a silly question (sorry!). How do I let the Dialogue system pop up on different occasions in one level?
@Devlper_
@Devlper_ Жыл бұрын
Thanks For this Great Tutorial Bro
@GemGameDev
@GemGameDev Жыл бұрын
This was effective.. thanks!
@ilyshade24
@ilyshade24 6 ай бұрын
If I wanted to use an input from my controller rather than left click the screen how would I do that though?
@vaynemarksyou6213
@vaynemarksyou6213 6 ай бұрын
you change the if (Input.GetMouseButtonDown(0)) line to the input that you want
@nickolasmachado9274
@nickolasmachado9274 Жыл бұрын
Thank you for this tutorial!
@ilypavan
@ilypavan 5 ай бұрын
Thank You.
@Jeireme
@Jeireme 2 ай бұрын
Thank you very much!
@toasterdev8329
@toasterdev8329 3 жыл бұрын
exactly what i neded
@BMoDev
@BMoDev 3 жыл бұрын
Happy to hear it!
@trstation3172
@trstation3172 2 жыл бұрын
@@BMoDev hello, the code worked fine, but when I press the left button of my mouse, the dialogue speeds up and my texts are not visible, it goes directly from 1 to 10.
@Eduard0213-x7p
@Eduard0213-x7p 2 жыл бұрын
Thanks really helpful and less time !!!!
@madpenguin58
@madpenguin58 3 жыл бұрын
Hi @BMo! Is there some kind of way that one could add some kind of trigger collider on something like a sign or NPC and have the character hit a button like the space key in order to start the dialogue instead of having it start at the beginning of the game? I have tried some things myself but I just can't figure this one out. Thanks!
@BMoDev
@BMoDev 3 жыл бұрын
Yeah 100%, you just need that trigger to execute the StartDialogue method. I have an "Interaction" tutorial, you can use the principals in that to call the StartDialogue Method! kzbin.info/www/bejne/mX3deGR-eciAatU
@madpenguin58
@madpenguin58 3 жыл бұрын
@@BMoDev Ok! Thank you very much! I was also wondering (sorry I have so many questions. I should probably just get better at code on my own.) if there was some kind of way to implement a response, and have the dialogue loop back to the beginning every time you play it. Thanks! I have been following a bunch of your 2D tutorials and am learning a lot about making games!
@YellowSerbian
@YellowSerbian 2 жыл бұрын
@@madpenguin58 Hello, I would like to ask how did you get it to work with the Interact system?
@mediamermaid333
@mediamermaid333 Жыл бұрын
Thank you!!
@macaaris1018
@macaaris1018 3 жыл бұрын
Nice👍 After So long period?
@BMoDev
@BMoDev 3 жыл бұрын
Yes, finally :)
@macrozs
@macrozs Ай бұрын
Thanks very much! Is there a way to make the dialog only appear when you interact with something, and have diffent dialogues depending on what you interacted?
@dovmandev
@dovmandev 9 ай бұрын
I expect from you a package solution for medium-sized projects like this in the video
@sl4ve576
@sl4ve576 Жыл бұрын
That's cool, but how do I link the dialogue to activate by talking to an Npc?
@maayandighorker6930
@maayandighorker6930 2 жыл бұрын
Great video, thanks! definitely subbing :)
@muttlymartin
@muttlymartin Жыл бұрын
ngl i got a really odd error when goin though his steps, its displaying 0 which i suspect is the index then flashes each character after the number. ive double checked my code to his but i dont understand wondering if someone might of had the same issue?
@EvansEasyJapanese
@EvansEasyJapanese 3 жыл бұрын
My text isn't appearing for some reason
@fatihbtw5288
@fatihbtw5288 2 жыл бұрын
thx you so much, great video
@NAgamerOfficialYT
@NAgamerOfficialYT Жыл бұрын
is there a way to make it pause for a small moment for stuff like commas or something like that?
@lorenzoaielli4605
@lorenzoaielli4605 Жыл бұрын
Ok, that's cool and all, but how did you make the actual different lines of dialogue? Where did you put them specifically?
@evannationarmy7769
@evannationarmy7769 Жыл бұрын
In the DialogueBox, where you attached the Dialogue Script, there should be a menu that says Lines. You can set how many lines you want and type in what you want them to say.
@timothy7411
@timothy7411 11 ай бұрын
@@evannationarmy7769 so i put the th dialogue box on timeline and its on activation track but everytime it start it only show one character on the first line do you know how to fix this??
@evannationarmy7769
@evannationarmy7769 11 ай бұрын
@@timothy7411 Unfortunately, I do not. I would recommend asking a forum on what to do.
@happyghoststudios4237
@happyghoststudios4237 2 жыл бұрын
Such a great video!!! Thank you!!!
@BMoDev
@BMoDev 2 жыл бұрын
Thanks
@hejhejhej952
@hejhejhej952 10 ай бұрын
Thank you kind sir!
@stevenhays6816
@stevenhays6816 Жыл бұрын
Top notch vid bloke
@PRAVEENKUMAR-xg6qe
@PRAVEENKUMAR-xg6qe 2 жыл бұрын
now i am in a good mood
@bobwinberry
@bobwinberry 2 жыл бұрын
Fantastic - thanks!
@triggerdc3gaming617
@triggerdc3gaming617 2 жыл бұрын
great video! but does anyone know how to have different lines of text for two separate NPCs? my brain is fried and idk how to pull it off
@tomo8940
@tomo8940 2 жыл бұрын
Anybody know why am I getting "Object reference not set to an instance of an object Dialogue.Update() (at Assests/Dialogue.cs:26"? It's for a college project :(
@HuGGmaN
@HuGGmaN 6 ай бұрын
Genius
@wicksley
@wicksley Жыл бұрын
Awesome thank you :D
@lmowni6760
@lmowni6760 3 жыл бұрын
The line 36 give me the error: IndexOutOfRangeException: Index was outside the bounds of the array. Please help me!
@albireo_beta_cygni
@albireo_beta_cygni 3 жыл бұрын
i dont know if its too late but in if statement of the NextLine() method you should set index < lines.Lenght - 1. hope it helps!
@yusanuh
@yusanuh Жыл бұрын
@@albireo_beta_cygni tried but it didn't fix it
@oxydol3456
@oxydol3456 2 ай бұрын
Thanks!
@fawzamaisarah459
@fawzamaisarah459 Жыл бұрын
Hi! im following this tutorial but i dont have "text component" and "lines" under my dialogue script, so i cant drag the text into the component. how do i fix this? i need help for my university project.😭
@Val0r2
@Val0r2 11 ай бұрын
Question: How would I go about making new dialogue appear whenever my player returns to the same scene instead of it just repeating same stuff every time the scene is loaded?
@IGotNoNameZ
@IGotNoNameZ 4 ай бұрын
Did you find out? Same issue here
@karnecita
@karnecita 11 ай бұрын
gracias, sos un capo, excelente tutorial 10/10
@karnecita
@karnecita 11 ай бұрын
using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class Dialogue1 : MonoBehaviour { public TextMeshProUGUI textComponent; public string[] lines; public float textSpeed; private int index; // Start is called before the first frame update void Start() { textComponent.text = string.Empty; StartDialogue(); } // Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { if (textComponent.text == lines[index]) { NextLine(); } else { StopAllCoroutines(); textComponent.text = lines[index]; } } } void StartDialogue() { index = 0; StartCoroutine(TypeLine()); } IEnumerator TypeLine() { foreach (char c in lines[index].ToCharArray()) { textComponent.text += c; yield return new WaitForSeconds(textSpeed); } } void NextLine() { if (index < lines.Length - 1) { index++; textComponent.text = string.Empty; StartCoroutine(TypeLine()); } else { gameObject.SetActive(false); } } }
@perttihakala9847
@perttihakala9847 2 жыл бұрын
awesome! just the thing i need! :3
@minecraft_top_game
@minecraft_top_game 4 ай бұрын
Thank you
@alberquepasa
@alberquepasa Жыл бұрын
great tutorial but if you show the code full it would be better
@Elmato63639
@Elmato63639 Жыл бұрын
anyone else wish tutorials showed the entire code at least once at the end of the video?
@dralexander6211
@dralexander6211 Жыл бұрын
Hello I was wondering if you could help me I would like to know how to stop the text from showing up when the game starts. I would highly appreciate it if you could give me some advice :)
@c-14games
@c-14games Жыл бұрын
How can I made a dialogue with choices using this method?
@lejocarry
@lejocarry Жыл бұрын
Really good :)
@m4v3n95
@m4v3n95 3 жыл бұрын
Really helpful!
@BMoDev
@BMoDev 3 жыл бұрын
Love to hear it
@gopogong6685
@gopogong6685 2 жыл бұрын
Good Video
@Caloby
@Caloby 2 жыл бұрын
very yes good
@shibuianimeart6016
@shibuianimeart6016 3 ай бұрын
Is there a way to make the dialogue play only once? Because it keeps playing every time I return to the scene
@Uzdefized
@Uzdefized Жыл бұрын
I want to implement this, and be able to press a button to re- initiate the conversation that just played wish me luck
@alianaxelcrooc4982
@alianaxelcrooc4982 Жыл бұрын
I have a problem where if I press the dialogue box again it is not working properly. it only shows one line
How to Make A Simple HEALTH SYSTEM in Unity
7:15
BMo
Рет қаралды 62 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,2 МЛН
Чистка воды совком от денег
00:32
FD Vasya
Рет қаралды 2,4 МЛН
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 137 МЛН
Creative Justice at the Checkout: Bananas and Eggs Showdown #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 6 МЛН
How to make a Dialogue System in Unity
16:19
Brackeys
Рет қаралды 935 М.
UNITY 2D NPC DIALOGUE SYSTEM TUTORIAL
7:52
diving_squid
Рет қаралды 58 М.
Learn Ink (video game dialogue language) in 15 minutes | Ink tutorial
14:47
Shaped by Rain Studios
Рет қаралды 65 М.
Making Dialogue with Inky and Unity Tutorial
12:16
The Phantom Game Designs
Рет қаралды 52 М.
Cutscene in Unity 3D | Timeline in Unity | CG Aura
14:13
CG AURA
Рет қаралды 145 М.
No One Hires Jr Devs So I Made A Game
39:31
ThePrimeTime
Рет қаралды 336 М.
How to make a Dialogue System with Choices in Unity2D | Unity + Ink tutorial
29:45
Shaped by Rain Studios
Рет қаралды 150 М.
I Made A Platformer Game But You're The Enemy
6:12
BMo
Рет қаралды 634 М.
Чистка воды совком от денег
00:32
FD Vasya
Рет қаралды 2,4 МЛН