I have a C++ base class defined as followed:
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "Engine/DataTable.h"
#include "SoulforgedCharacterBase.generated.h"
UCLASS(ABSTRACT)
class SOULFORGEDCHARACTER_API ASoulforgedCharacterBase : public APawn
{
GENERATED_BODY()
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = Animation, meta = (AllowPrivateAccess = "true"))
UDataTable* ActionMontages;
public:
DECLARE_EVENT(ASoulforgedCharacterBase, FCharacterDiedEvent);
virtual FCharacterDiedEvent& OnCharacterDied() = 0;
private:
// remainder of private definitions
and then a derived class as:
#pragma once
#include "CoreMinimal.h"
#include "SoulforgedCharacterBase.h"
// Additional Engine includes
#include "EngineGlobals.h"
#include "HumanoidSoulforgedCharacter.generated.h" //Must be last
/**
*
*/
UCLASS()
class SOULFORGEDCHARACTER_API AHumanoidSoulforgedCharacter : public ASoulforgedCharacterBase
{
GENERATED_BODY()
public:
void Tick(float DeltaTime) override;
DECLARE_DERIVED_EVENT(AHumanoidSoulforgedCharacter, ASoulforgedCharacterBase::FCharacterDiedEvent, OnCharacterDied)
virtual FCharacterDiedEvent& OnCharacterDied() override { return CharacterDiedEvent; }
protected:
private:
FCharacterDiedEvent CharacterDiedEvent;
};
I came up with this following the documentation found here
the event declarations produce the following errors: object of abstract class type ASoulforgedCharacterBase is not allowed: function "ASoulforgedCharacterBase::OnCharacterDied is a pure virtual function
i’ve tried a few different variations to no avail. Can I get some guidance on what I’m doing wrong?