 So let's continue with our graph edit program and now let's see how you can access the information inside your node So last time we had this simple structure with three simple nodes that you can create and Yeah If you haven't seen the previous episode you can click on the top right corner of your screen on the card And you can go and watch it before we jump in to the code itself Let's cover a couple of things if you remember from the previous episode on the graph edit nodes On the code here itself. I set the code to the slot so we get the dots there and with the color and everything and you will be if you are not a fan of the Gd script or the code editor you can actually get rid of this part and Do everything from the inspector. So you have to select the graph node and here you will see a section Which it's called slot inside a slot. You will see slot number zero And then you can have it enabled and you will see it also inside your editor So we had it on green, but it can basically be any value that you want. The same applies as before Next thing is That if you notice and if you're around this code when you connected two nodes together Before there was no way to Disconnect them and To do that what you can do is in the graph edit node, which is this board When you enable right disconnect Again, this will not happen alone. You will also need to Select here the disconnect request signal to the code and The same as we did before with the connect node can be done for the disconnect now so graph edit Disconnect node from From slot To and to slot Same values as before but with this guy. So now with this Enable and the code. Let's try it out Let's create two nodes Let's connect them together and with the right I can disconnect it. Yeah, it's working Okay, so now if you have like different paths You can disconnect one and connect it to another one Okay, let's start coding this application to be a very uncomfortable calculator. Okay, let's replace this text input Change type Let's do a spin box Spin box, which is a numerical input Let's change the name of this number Yeah, okay, oh Let's change this as well spin box So it's more proper. Hey and here. Let's allow lesser Which will allow us to go less than zero and Greater since we don't have a max value. Well, yeah, we have 100. So yeah, let's allow both Let's save this node and we should have it here now though when we Get the nodes. Yeah, we can go up. We can go down Okay, kind of different numbers. Okay, we also need a button to run the same way we run the program here I'm gonna create a different button Which will be for when I Want to calculate that if you see that you're aligning things all over the place you can actually start using the control nodes for Container box container horizontal box container like we did in previous episodes. So let's do that Here Let's get the other button To the magic Okay, let's resize this a little bit and Clicking here it prevents selecting the children. So yeah now I'm getting the node here. Okay now Ludo magic has since I duplicated this node. It has the same signal Let's change that. Let's Change the name as well to run program and Let's connect the press to the main to the main code Okay, the way I'm gonna show you is just a very simple approach to how this can be done But of course how you calculate everything depends a lot on your needs So what you actually have on the graph edit node is the information of all the nodes connected to each other So let's see that since we're gonna be referencing the graph edit node a lot We could either make this script inside the graph edit itself But since I want to keep it all very simple in one script, let's do it here But let's make a name for it gonna be capital G. It's gonna be the graph also graph edit Okay, so we have now the graph edit in capital G and what you can get is the Get connection List Let's print this out so you can see how it looks like press play and When I have two nodes connected. Well, let's try that before Right now to the magic returns the empty string, but when we have to connect it We see that it's connected You see a dictionary inside of this array which is from control from port zero to this other control To port zero as well Okay if we add another one you will see that it will be also displayed there and It will display this connection as a dictionary and this connection as another dictionary So now we have all the information we want and we can start going through these nodes To get the values from those connections Let's save the connection lists as connection list And let's get this Okay, now let's create a variable where we're gonna save the result. We just gonna be called result And now let's loop through all the connections Okay, first of all let's do a loop in range Start like from zero To the connection list size This will make sure that we go through all of them and Instead of getting the value there directly. I want to get a number now get the value of the current node which is When we get the list we're gonna see the first node that we connected in the program and We can access to it by doing g get node This is remember. It's a child of the graph edit node and we have the name stored in the Connection list which is if we go to the connection list We go to the y which is the current index and We get the from We should get the value from now that we have the value we can add it to the result So result. Let's add the value that we got from that node and Let's print it at the end of this result Okay, now I needed I needed to get the node actually the Spin box so get now Spin box Now the value that should do it Let's see. Yeah, we get the value Okay, we connect them One plus two to the magic. We only get one That's because we want to add the connection from this and to this so we need both values Which we're gonna call value one and value two Well, you underscore two, which is gonna be the same But instead of getting the connection list the from let's get the two Okay, so now we get the two values and Since it's the end of the list. We only have one. We need to check if the current index Plus one because we're starting at zero is equal to the connection list size So if it's the end of the array We want to add Also the value two that we just stored So now when we try it out Value, let's try two plus one to the magic equals three Okay, if we do five plus two and Let's add another one which is Five again do the magic 12. Okay So let's add another node and let's see Minus one so instead of connecting it here. Let's connect it there. That's to the magic we get six So this was a very very very rudimentary way of getting the information As we have it displayed here Remember it's by pairs So every time you add a different value It will add a dictionary with those values and you can start handling the data From this as a regular script You can do that in different ways depending on what you actually need from your notes If your notes are very simple chances are that the scripts is gonna the scripts are gonna look Similar to what we have here Which is just getting the values adding them together and Dating that result, but I think that with this example you have enough Understanding of how these graph nodes and graph edit work to start doing something with them in your projects Just play around with them. Tell me if you do anything and have any questions regarding this As always I want to thank everyone that was writing comments asking questions I want to thank again to my patreon's and remember that if you are a patreon you can request any topic that you like And I will do my best to explain it and assist you in any possible way I can thank you and until the next one