I checked the code and found several typos.I corrected them and now only 2 errors remain.
Error 1 error code: OtherCompilationError (5) C:\Users\Russell1\Documents\Unreal Projects\TwinStickShooter\Intermediate\ProjectFiles\Error TwinStickShooter
Error 2 error MSB3073: The command ““C:\Program Files\Epic Games\4.9\Engine\Build\BatchFiles\Build.bat” TwinStickShooterEditor Win64 Development “C:\Users\Russell1\Documents\Unreal Projects\TwinStickShooter\TwinStickShooter.uproject” -rocket -waitmutex” exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5 TwinStickShooter
the BaseCharacter.h code is
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include “GameFramework/Character.h”
#include “BaseCharacter.generated.h”
UCLASS(Blueprintable)
class TWINSTICKSHOOTER_API ABaseCharacter : public ACharacter
{
GENERATED_BODY()
public:
// Makea health Property
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "BaseCharacter")
float Health = 100;
// Make an isDead property
UPROPERTY(BlueprintReadOly, VisibleAnwhere, Category = "baseCharacter")
bool isDead = false;
// Calculate death function (helper)
virtual void CalculateDead();
//Calculate health function
UFUNCTION(BlueprintCallable, Category = "BaseCharacter")
virtual void CalculateHealth(float delta);
//Editor-centric code for changing poperties
#if WHITH_EDITOR
virtual void PostEditChangeProperty(FPpropertyChangedEvent& PropertyChangedEvent) Override;
#endif
// Sets default values for this character’s properties
ABaseCharacter();
// 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;
};
And the code for BaseCharacter.cpp is
// Fill out your copyright notice in the Description page of Project Settings.
#include “TwinStickShooter.h”
#include “BaseCharacter.h”
// Sets default values
ABaseCharacter::ABaseCharacter()
{
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don’t need it.
PrimaryActorTick.bCanEverTick = true;
}
// Called when the game starts or when spawned
void ABaseCharacter::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void ABaseCharacter::Tick( float DeltaTime )
{
Super::Tick( DeltaTime );
}
// Called to bind functionality to input
void ABaseCharacter::SetupPlayerInputComponent(class UInputComponent* InputComponent)
{
Super::SetupPlayerInputComponent(InputComponent);
}
// Implement CalculateHealth Function
void ABaseCharacter::CalculateHealth(float Delta)
{
Health += Delta;
CalculateDead();
}
//Implement CalculateDead Function
void ABaseCharacter::CalculateDead()
{
if (Health <= 0)
isDead = true;
else
isDead = false;
}
#if WHITH_Editer
// Implement Post Edit Change Property
void ABaseCharacter::PostEditChangeProperty(FPropertChangedEvent& PropertyChainded Event)
{
isDead = false;
Health = 100;
Super::PostEditChangeProperty(PropertyChangedEvent);
CalculateDead();
}
#endif