 Today we are creating a simple example where you can go to an MPC and make it talk. So we start with an empty project, we go to the Asset Live, we search for dialogic, we select it and download it. After it's downloaded, we install it and we un-tick all the directories except the add-ons one, which is the one that we want. After installing, you go to Project, Project Settings, Plugins and we select Enable for dialogic. It has some errors, I hope I can fix it in 1.2, but what you have to do after installing dialogic is re-opening the project again. So click the project list and you open it again. Now we have dialogic installed, we can create a scene. We're going to add the player, add channel, which is going to be a kinematic body 2D. Let's rename it to player. We're going to need a sprite, so we add a sprite. What other sprite than the icon? I don't know. So the icon will be fine. Let's add some collision shape. And the collision shape will be a square or a rectangle. And let's make it the size of our player. So we have the player here. Click here to prevent you to selecting the child nodes, move it to the center of the screen and add some code to it. Let's attach a script. Let's call it player. And here on the documentation, we're going to go ahead and copy and paste this basic controller. But we're going to replace here where it says right, left, down and up. Since there are not actions that come with code, I'm going to add the UI and this will make them be valid because we have them here in project settings, input map, we have UI accept, which is the one that we're going to use to talk and here UI left, right, up and down. OK, so that's all for our character. We can save scene and let's call it main. Let's try it out, select main scene and we can move our character. It is a bit slow, so I'm going to up to speed to six hundredth here. And yeah, OK, easier for testing. Now let's add our NPC. So to add an NPC, I'm going to add a child node and it's going to be an area to the node, this area to the node is going to be called NPC. The area needs to have also a sprite. So we know who it is. This case, I'm going to do the icon again, but I'm going to modulate here, it's going to be red. So we know it's not a player. We will also need an area which we can add with a collision shape and the collision shape is going to be a circle where you need to be to start talking to the NPC. So this is the range, basically. Let's also add an indicator because this area is not going to be visible in game. So I'm going to add another sprite. And I had this prepared here, the question mark. So let's add it here and move it on top of our NPC. And that is going to show up whenever you are able to speak with this NPC. Let's block as we did before. Move it somewhere here and let's add some code to the NPC NPC that GD. Since it's an area to the first thing we want to do is body enter and body exit, which triggers whenever a body goes inside of this area, the circle area. So it doesn't matter for one, but we want to know when it goes in and when it goes out. And we're going to need two functions, body enter, body exited. And we have a variable to check if the conversation should happen. So if the NPC is active or not. Two functions will check that the body, which goes into the area, if the name of the node, in this case, the name is going to be player. So if it is player, we set it to active. And if it is not player, we don't set it to active, we set it to false. And now let's rename the question mark to question mark to differentiate it from the sprite. And let's add in process that the visibility of this. So if this question mark is visible or not, it's equal to being active. So that means that whenever the body enters, it's going to be active. Whenever the body exit is going to be inactive, let's see it going. It's visible and go out is not. This will be our indicator that we can speak with the NPC. Now let's create a conversation. So we go to dialogic. We create a new character, which is going to be called NPC. We select the red, which is the color of it. And let's create a new timeline, a text set by the NPC saying, hello, I'm the NPC. And it's my device. If you want to learn how to use dialogic, I made a tutorial. So you can watch that video by clicking on the card or on the description. Let's rename this timeline to timeline one. And let's go back to our code. The code for making the interaction with the player is here and I'm going to go line by line. So first we're checking for input. So this happens whenever you press any key. Check if there is a dialogue or not, because we don't want to show a dialogue on top of another one. So if there are no dialogues. So in this case, if dialogue node doesn't exist, so it's equal to null, we start checking. Is action press UI accept? So this is the key that you're going to use to open the dialogue. In this case, it's already defined here on project settings, input map UI accept. So enter and space will work. And we want to check that this node is active. If you're not close to the player, you cannot activate it. But if you are, you will. We pause the game. We don't want the player to keep moving while we are showing a dialogue. Then we created with dialogic dot start and the name of the timeline that we created. In this case, timeline one. We set the post mode to mode process because we don't want the dialogue to be frozen. If you want to see another tutorial about posting a game, you can click on the card or click on the link in the description. Then we need to connect the timeline end to an on post function. And finally, we add the dialogue. Let's create this on post function, which is super simple. We get the tree and post. We set it to false. So that's all the code we need. So let's try it out. We're moving. We see we press space and we see the dialogue. Whenever the dialogue is open, I cannot walk and press space again and I can keep moving. So this is how you can add a basic dialogue to your game.