Party members
Before we can keep track of party members, we'll need a way to track a character's current state, such as how much HP the character has or what it has equipped.
To do this, we'll create a new class named GameCharacter
. As usual, create a new class and pick Object
as the parent class.
The header for this class looks like the following code snippet:
#pragma once #include "Data/FCharacterInfo.h" #include "Data/FCharacterClassInfo.h" #include "GameCharacter.generated.h" UCLASS( BlueprintType ) class RPG_API UGameCharacter : public UObject { GENERATED_BODY() public: FCharacterClassInfo* ClassInfo; UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = CharacterInfo ) FString CharacterName; UPROPERTY( EditAnywhere, BlueprintReadWrite, Category ...
Get Building an RPG with Unreal 4.x now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.