O'Reilly logo

Building an RPG with Unreal 4.x by Alan R. Stagner, Steve Santello

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required