Welcome back.
So now that we have got our project set up and we can run in debug mode, it's time to do some coding.
Now all we've done so far is Add or a character base, which as we mentioned, is going to be the base
class for the characters that we create in this project.
Now I actually don't plan on creating an instance of or a character base.
It's just a base class.
We'll create the player character and the enemy character classes and those will inherit from character
base, which means there are some things that we don't need in this class.
And if we like, we could add the abstract specifier to the class macro, and that prevents this class
from being able to be dragged into the level.
Now, I already know that I'm not going to have the base class do any tick functionality and we don't
need set up player input component either.
We're going to configure input for the player character class, the one we'll be controlling.
But the I controllers don't need input, so we're not going to set that up in the base class here.
I'm going to actually remove set up player input component and the tick function altogether.
Now we know what Beginplay does.
We're going to remove the comment telling us about Beginplay and we know what constructors do.
We're going to remove the comment for that as well.
Those are just in the way and in a character base, we're going to remove these comments here as well.
I'm going to change beacon of a tick to false as I don't see any immediate need for base character to
tick.
Let's remove the comment there.
We'll remove the comment from beginplay and we don't need tick or set up player input component.
We're removing those all together and now we have a stripped out bare bones base character class, which
is great.
We're going to use this to derive subclasses or child classes and I'd like to do that now.
Now I'm not debugging any code at the moment so I can simply hit run and we'll compile and launch the
editor from there.
And here in the editor, we can go ahead and derive from the character base.
Now to keep things organized, I'm going to want my classes in their own designated folders.
Now I've already added this character base class, but I could put this in a character folder and that
way all the character classes can be grouped together.
So I'd like to do that now.
I could do it from within writer or I could rearrange my project's structure in Explorer.
So if I open my source folder here and go into Aura, I can add a character folder in both my private
and public folders here.
So I'm going to go ahead and add a new folder and call this character and I'm going to do the same thing
in the private folder.
And I'll move the CP into character.
And back in the public, I'll move the H into character just like that.
Now it takes a second, but Rider updates right away.
And of course this is going to require that we make a new commit as this is now read.
And if you do this in Visual Studio, what you have to do is close out of the IDE and delete your intermediate
and your binaries folder.
Then you can open your solution and compile again.
And for Visual Studio, you'd right click on your project and generate Visual Studio project files.
I'm opening writer.
And before we compile and run, we're going to have to go into a character base here.
And now that we've changed our folder structure, we can type in character slash or a character base
there.
And now we can successfully include the header file there.
So I'm going to hit run.
And here in the content drawer, I see that I now have a character folder in public and here's where
I'll put my other character classes.
So we'll go ahead and create those classes.
I'm going to right click on a character base and create a C plus plus class derived from it.
And I'll let this go into the character folder here.
And I'm going to call this Aura character.
This will be the player character that we control.
So I'll go ahead and create the class.
Now I have live coding off and my editor is set to not compile.
That's just how I prefer for this project and it's asking if I'd like to edit the code.
Now I'm going to click No, because I'm not done.
I'm going to make one more class.
I'm going to right click on Aura Character Base, create a C plus plus class derived from it.
We've already created Aura character, but now we need an enemy class and I'm going to call this aura
enemy.
So we'll go ahead and create that class as well.
And again, I'll click No, I'm going to handle the compiling myself and I'll go ahead and close out
of the editor as we're going to compile and launch from the IDE.
So now we have three character classes and or a character is derived from or a character base as is
or an enemy they're both derived from or a character base.
So now we can add things to Aura character base and are two derived classes will inherit those things.
Okay, so now that we have our character base and our enemy and Aura characters, we're ready to start
adding some features to the character base class that our other characters can inherit, and we're going
to start that in the next video.
So in the meantime, I'll make my commit.
No need for me to show that to you every time.
You can just assume that I'm committing after each lecture and I'll see you in the next video.