Hi, I know this is probable a stupid question but I’m new to programming, and I’m working out a book, Learning C++ by Creating Games with UE4. I’m pretty sure I have entered all the code correctly, but it won’t work. My code looks like this:
#pragma once
#include "GameFramework/Character.h"
#include "NPC.generated.h"
UCLASS()
class BASICCPP_API ANPC : public ACharacter
{
GENERATED_UCLASS_BODY()
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Collision)
TSubobjectPtr<class USphereComponent> ProxSphere;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = NPCMessage)
FString NpcMessage;
public:
// Sets default values for this character's properties
ANPC();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick(float DeltaSeconds) override;
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;
};
Any help would be much appreciated! Thanks!