Character

BP_CharacterBase is one of the core Blueprints and is located in Content/FPS_Game/Blueprints/

The blueprint is commented and categorized, to make it easier to pick up and work with.

char_bp

When you start working on your game or follow any tutorials you find online, whenever it says “Cast To Character”, this is the blueprint you Cast To, you can add new variables to it and access them  from where you need them. I recommend to beginners to create a child class from this blueprint and use the child class instead, unless you want to add new features or modify the existing setup, a child class will do the job just fine, plus it’s easier to upgrade when I release a new version, because if you change the base classes, and I release a new version, we don’t have the same source file anymore, so you will need to add your changes to the new version as well. Advanced users usually branch it off and make it their own build, then only add the new features that they actually need.

The point is, this is the base class for the character blueprint, everything related to it is located here, there are only 4 other blueprints that are relevant to it, those are:

BP_WeaponBase

BP_ProjectileBase

BP_Save

W_PlayerHUD

Everything else can either be replaced or deleted, few other widgets do get created from the character BP, but they are only there as place holders (pause screen, etc.)

 

The Inventory system is similar to how it works in the ShooterGame example. Except instead of C++, it’s made using Blueprints and you can pick up new weapons, display them from the inventory widget, equip, drop or save them.

char_inv

The inventory itself does not have a limit on how many weapons you can add. All weapons get saved automatically, regardless of how many child classes you make. Weapons are child classes from 1 base class, for more info about the weapon system, click here.

 

The camera switching from FPP and TPP perspectives uses 2 cameras and 2 meshes (arms for FPP and body for TPP), You can check out the tutorial I made on how to change the character mesh in the Tutorials section or by clicking here. The skeleton used is the default one from Epic Games, all retargetting tutorials out there still apply.

CharFPPTPP

 

 

All input keys are set in Project Settings, the character then uses them to perform an action (jump, run, shoot, etc.)

char_input char_input2

To add a new feature that you need in your game, for example an action skill or something, simply add a new input key, then on the character create the necessary variables and logic to do what you need it to do.

 

The save system is set on the character, to make it easier to save the inventory and other variables, such as money for example. For more info about the save system, click here.

 

Because there is no custom GameInstance, any settings menu you have can be added, simply connect it to the character at begin play.

character_1_4