diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index 65e900d..197fc84 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -28,6 +28,6 @@ bOffsetPlayerGamepadIds=False GameInstanceClass=/Script/Engine.GameInstance GameDefaultMap=/Game/Levels/Main.Main ServerDefaultMap=/Engine/Maps/Entry.Entry -GlobalDefaultGameMode=/Game/GameMode/MainGameMode.MainGameMode_C +GlobalDefaultGameMode=/Script/Engine.GameModeBase GlobalDefaultServerGameMode=None diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index 75094ce..feb9ee1 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aecdc18df404bad9d38ab090802191cea88bd8cf37354b8d02f87242ce550a58 -size 21405 +oid sha256:54f56812a38b4d3aaa9242a60febf557b7cbff2f830efc20ceff6571a6270971 +size 23663 diff --git a/Source/the_twilight_abyss/MerchantRaw/MerchantTriggerBox.cpp b/Source/the_twilight_abyss/MerchantRaw/MerchantTriggerBox.cpp new file mode 100644 index 0000000..b519e46 --- /dev/null +++ b/Source/the_twilight_abyss/MerchantRaw/MerchantTriggerBox.cpp @@ -0,0 +1,39 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "MerchantTriggerBox.h" + +//makes it so the component script is initialized when game starts +UMerchantTriggerBox::UMerchantTriggerBox() +{ + PrimaryComponentTick.bCanEverTick = true; +} + + + +void UMerchantTriggerBox::BeginPlay() +{ + Super::BeginPlay(); + UE_LOG(LogTemp, Warning, TEXT("TRIGGER SPAWNED")); +} + +void UMerchantTriggerBox::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) +{ + Super::TickComponent(DeltaTime, TickType, ThisTickFunction); + + +} + +void UMerchantTriggerBox::PlayerCheck() +{ + /* + TODO: + UNCOMMENT THE UPRIMITECOMPONENT OUT + FILL OUT THE COMPONENTOVERLAP FUNCTION SO IT DISPLAYS THE PLAYERS NAME WHEN THEY ENTER IT + */ + + //UPrimitiveComponent TriggerOverlap = BeginComponentOverlap(); +} + + + diff --git a/Source/the_twilight_abyss/MerchantRaw/MerchantTriggerBox.h b/Source/the_twilight_abyss/MerchantRaw/MerchantTriggerBox.h new file mode 100644 index 0000000..a68076c --- /dev/null +++ b/Source/the_twilight_abyss/MerchantRaw/MerchantTriggerBox.h @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Components/BoxComponent.h" +#include "Components/PrimitiveComponent.h" +#include "MerchantTriggerBox.generated.h" + +/** + * + */ +UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent)) +class THE_TWILIGHT_ABYSS_API UMerchantTriggerBox : public UBoxComponent +{ + GENERATED_BODY() +protected: + virtual void BeginPlay() override; + +public: + UMerchantTriggerBox(); + virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; + +private: + void PlayerCheck(); + +};