 Hello and welcome to this minimal Godot tutorial. Today we're going to be looking at exporting variables what that means So when you're looking at those scripts examples online, you might see some variables that have the word export before them We're going to talk about what that is today and why you might use them. So let's go ahead and create a new 2d scene I'm going to change the type of this to be a sprite And we will just call it. I Don't know what to call it move me, okay, and With that selected we're going to drag over. Let's use the the spaceship sprite here textures. Let's go it's right here and We're going to zoom in on it. Let's go ahead and transform that I'm going to rotate it 90 degrees and I'm going to attach a script to it Yeah, move me script. That's fine. So in a previous video, we talked about movement We can say inside our process here. So it's happening over and over and over again position dot x Plus equals and we'll say speed and we will create a variable up here Called speed I gotta say var var speed equals and we'll say five and As we talked about in the previous video, we are not previously with a previous video Why we create variables so that we can change that number Without having to go and change everything in code everywhere. I'm gonna save the scene. We'll save it as Move me and I'm going I control s to save by the way Just like pretty much every other program in the world. I'm going to go to our main scene now And I am going to add an instant. So I'm going to right-click to say instant and I'm going to choose Move me. So now we have this move me here when I hit f6 to run this scene You can see that spaceship this little one flying across the screen That's great. Let's create another one. I'll shift D to clone that put in one there shift D to clone that put one there I'll hit f6 and there we go. We have three of them But let's say I want them all going different speeds. I Don't want to have to write a full script for each one just to change the speeds of them So let's go back to the move me scene. Let's click on here to bring up the script and change this We're going to add to the beginning export Now I'll go back to my main scene 2d and now you'll see over here when I have one of these selected there's script variables and There's our speed variable and it has a default speed of five So if I hit f6 now, they're still all moving at the speed of five What I'm going to do though is I'm going to select this one and I'm going to say one And I'm going to select the next one. I'll leave that at five and the next one. I'll change to ten So now they each have their own speed without having to go and change the code I can change it right there in the editor So again, this one has a speed of one this speed of five this one has a speed of ten and They're all moving along at different speeds and of course I can grab another one. I can do shift D Oh, sorry control D to clone that move it somewhere else and I'll change this one to be speed of seven Now you notice once I change it you get this little Redo icon, I guess you would call it what that will do is it will if you click that it sets it back to Whatever the default speed is which is what I set in the script So now I do seven and now we have one at the speed of one when a speed of five ten and seven Great That's it for the story. Thanks for watching. Please visit films by chris.com That's Chris the K should be a link in the description as always. I hope that you have a great day