diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/CP_ElimTImothyHuntsmer.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/CP_ElimTImothyHuntsmer.uasset deleted file mode 100644 index 39e60bb8..00000000 --- a/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/CP_ElimTImothyHuntsmer.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c2cc3c7dde1ca8dab3d29103703e9b36cef900da2ac12d5fb20364c42eac0cf0 -size 96341 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/LevelSpecificCheckpoints/CP_ElimTImothyHuntsmer.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/LevelSpecificCheckpoints/CP_ElimTImothyHuntsmer.uasset new file mode 100644 index 00000000..ae4cb1b1 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/LevelSpecificCheckpoints/CP_ElimTImothyHuntsmer.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3785952c94ed18caf182236c055719d03b54a3096841aad3a340b8e6211b7e21 +size 95329 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/OWCP_Apartment.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/OWCP_Apartment.uasset deleted file mode 100644 index 4835bf89..00000000 --- a/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/OWCP_Apartment.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:40729ca51b62f0791520c8666d1657e8537e17c049d7d094e8b1ac9cc25936d3 -size 35536 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/OpenWorldCheckpoints/OWCP_Apartment.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/OpenWorldCheckpoints/OWCP_Apartment.uasset new file mode 100644 index 00000000..665d3b79 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/OpenWorldCheckpoints/OWCP_Apartment.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d96dde71ce13d7ed2661e3fe8d0531e67453e81644492f026f7577c12af0acf9 +size 35286 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/OpenWorldCheckpoints/OWCP_InteractTest1.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/OpenWorldCheckpoints/OWCP_InteractTest1.uasset new file mode 100644 index 00000000..34390f30 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/OpenWorldCheckpoints/OWCP_InteractTest1.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6edb31abcafeab6442cb285181905031da2635eb7c6444b529d9c8636ee9496 +size 29747 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/OpenWorldCheckpoints/OWCP_InteractTest2.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/OpenWorldCheckpoints/OWCP_InteractTest2.uasset new file mode 100644 index 00000000..af456198 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/Checkpoints/OpenWorldCheckpoints/OWCP_InteractTest2.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7367fb8f5ccaf3e4ae6e34133debe0d5efbaedf33024d14cf37b1f4f5ff7fb1c +size 39283 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/MB_Apartment.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/MB_Apartment.uasset index bbf0e6ec..14b71962 100644 --- a/EndlessVendetta/Content/BountySystem/ApartmentBounty/MB_Apartment.uasset +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/MB_Apartment.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a2203af630f7833b47f1da4a676f5321c09ba5f2f9845a4a94ee80f282d82cd -size 26393 +oid sha256:a67204b6b65b0b19778380561dee8ca2dd3af99541fdacb2b2e44ac185382ea5 +size 26877 diff --git a/EndlessVendetta/Content/BountySystem/ControlsTutorial/Bounty/MB_Training.uasset b/EndlessVendetta/Content/BountySystem/ControlsTutorial/Bounty/MB_Training.uasset index fa661edb..edfdeb33 100644 --- a/EndlessVendetta/Content/BountySystem/ControlsTutorial/Bounty/MB_Training.uasset +++ b/EndlessVendetta/Content/BountySystem/ControlsTutorial/Bounty/MB_Training.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f49fb848fef1a4232e23f58d98838e1a86dd4abfd0dd80c00d9cf7245c73f595 -size 28732 +oid sha256:d8dc1a8d9115ec67600014abd75f1870abc3f452ce59997419fc23b1b9b6ab59 +size 28746 diff --git a/EndlessVendetta/Content/BountySystem/ControlsTutorial/Bounty/OWCP_Training.uasset b/EndlessVendetta/Content/BountySystem/ControlsTutorial/Bounty/OWCP_Training.uasset index 2ed776b6..f508afbb 100644 --- a/EndlessVendetta/Content/BountySystem/ControlsTutorial/Bounty/OWCP_Training.uasset +++ b/EndlessVendetta/Content/BountySystem/ControlsTutorial/Bounty/OWCP_Training.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f6f9debd6a0a8ef030b539f4e5a09d27bfd0c840cf7ae6ee680612eede4e454f -size 24209 +oid sha256:e28c4bc3d5d467caa5aa0b7e94b8eaec1de28951d233ff6987caa754fef83d3b +size 24233 diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.h b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.h index 3720876c..f565e0c6 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.h +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyClass.h @@ -33,6 +33,7 @@ protected: public: FCompletedACheckpoint CompletedACheckpoint; + // Used to update Displayed Tip FCheckpointActivated CheckpointActivated; // Gets the Reward Money for Completing this Bounty, used by Players Character diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/OpenWorldCheckpoint.cpp b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/OpenWorldCheckpoint.cpp new file mode 100644 index 00000000..aec93383 --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/OpenWorldCheckpoint.cpp @@ -0,0 +1,5 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "OpenWorldCheckpoint.h" + diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/OpenWorldCheckpoint.h b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/OpenWorldCheckpoint.h new file mode 100644 index 00000000..ded698fc --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/OpenWorldCheckpoint.h @@ -0,0 +1,20 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "EndlessVendetta/BountySystem/CheckpointClass.h" +#include "OpenWorldCheckpoint.generated.h" + +/** + * + */ +UCLASS() +class ENDLESSVENDETTA_API AOpenWorldCheckpoint : public ACheckpointClass +{ + GENERATED_BODY() + +protected: + UPROPERTY(EditDefaultsOnly, Category = "Checkpoint") + FTransform RespawnTransform; +}; diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/OpenWorldInteractableCheckpoint.cpp b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/OpenWorldInteractableCheckpoint.cpp new file mode 100644 index 00000000..098d76a1 --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/OpenWorldInteractableCheckpoint.cpp @@ -0,0 +1,9 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "OpenWorldInteractableCheckpoint.h" + +void AOpenWorldInteractableCheckpoint::Interact() +{ + PlayerInteracted(); +} diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/OpenWorldInteractableCheckpoint.h b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/OpenWorldInteractableCheckpoint.h new file mode 100644 index 00000000..b82127d4 --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/OpenWorldInteractableCheckpoint.h @@ -0,0 +1,24 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "OpenWorldCheckpoint.h" +#include "OpenWorldInteractableCheckpoint.generated.h" + +/** + * + */ +UCLASS() +class ENDLESSVENDETTA_API AOpenWorldInteractableCheckpoint : public AOpenWorldCheckpoint, public IInteractionInterface +{ + GENERATED_BODY() + + void Interact() override; + +protected: + UFUNCTION(BlueprintImplementableEvent) + void PlayerInteracted(); + + +}; diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/MainBountyClass.cpp b/EndlessVendetta/Source/EndlessVendetta/BountySystem/MainBountyClass.cpp index 18b1e56e..e5d68f4d 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BountySystem/MainBountyClass.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/MainBountyClass.cpp @@ -15,7 +15,7 @@ void AMainBountyClass::IncrementBountyCheckpoint() void AMainBountyClass::ActivateFirstCheckpoint() { Super::ActivateFirstCheckpoint(); - if (IsValid(OpenWorldcheckpoint)) OpenWorldcheckpoint->SpawnWaypoint(MainBountyStruct.TargetName); + //if (IsValid(OpenWorldcheckpoint)) OpenWorldcheckpoint->SpawnWaypoint(MainBountyStruct.TargetName); if (BountyCheckpoints.IsEmpty() || BountyCheckpoints[0] == nullptr) return; BountyCheckpoints[0]->SpawnWaypoint(MainBountyStruct.TargetName); } @@ -23,19 +23,22 @@ void AMainBountyClass::ActivateFirstCheckpoint() void AMainBountyClass::DeActivateFirstCheckpoint() { Super::DeActivateFirstCheckpoint(); - if (IsValid(OpenWorldcheckpoint)) OpenWorldcheckpoint->DestroyWaypoint(); + //if (IsValid(OpenWorldcheckpoint)) OpenWorldcheckpoint->DestroyWaypoint(); } - void AMainBountyClass::SpawnOpenWorldCheckpoint() +void AMainBountyClass::SpawnOpenWorldCheckpoint() { - if (!IsValid(OpenWorldCheckpointClass)) return; - - FActorSpawnParameters SpawnParameters; - SpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn; - FVector Loc = OpenWorldCheckpointClass.GetDefaultObject()->GetCheckpointSpawnTransform().GetLocation(); - FRotator Rot = OpenWorldCheckpointClass.GetDefaultObject()->GetCheckpointSpawnTransform().GetRotation().Rotator(); - - OpenWorldcheckpoint = GetWorld()->SpawnActor(OpenWorldCheckpointClass, Loc, Rot, SpawnParameters); + if (OpenWorldCheckpointClasses.IsEmpty()) return; + + for (TSubclassOf OpenWorldCheckpointClass : OpenWorldCheckpointClasses) + { + if (OpenWorldCheckpointClass == nullptr) continue; + FActorSpawnParameters SpawnParameters; + SpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn; + FVector Loc = OpenWorldCheckpointClass.GetDefaultObject()->GetCheckpointSpawnTransform().GetLocation(); + FRotator Rot = OpenWorldCheckpointClass.GetDefaultObject()->GetCheckpointSpawnTransform().GetRotation().Rotator(); + BountyCheckpoints.Add(GetWorld()->SpawnActor(OpenWorldCheckpointClass, Loc, Rot, SpawnParameters)); + } ActivateFirstCheckpoint(); } diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/MainBountyClass.h b/EndlessVendetta/Source/EndlessVendetta/BountySystem/MainBountyClass.h index 8e1c99af..afd2952e 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BountySystem/MainBountyClass.h +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/MainBountyClass.h @@ -42,10 +42,10 @@ class ENDLESSVENDETTA_API AMainBountyClass : public ABountyClass // ------------------- ATTRIBUTES ------------------------------ // Used to Spawn Open World Checkpoint for this Main Bounty UPROPERTY(EditDefaultsOnly, Category = "Bounty") - TSubclassOf OpenWorldCheckpointClass; + TArray> OpenWorldCheckpointClasses; // Used to Store Ref for Bounty Tracking Functionality - ACheckpointClass* OpenWorldcheckpoint; + //TArray OpenWorldcheckpoints; // Used by Players Character to Determine where to Spawn in the Open World after Completing Main Bounty UPROPERTY(EditDefaultsOnly, Category = "Bounty") @@ -95,10 +95,10 @@ public: void DeActivateFirstCheckpoint() override; // Returns open world checkpoints tip - FString GetOpenWorldCheckpointTip() - { - return OpenWorldcheckpoint->GetCheckpointTip(); - } + // FString GetOpenWorldCheckpointTip() + // { + // return OpenWorldcheckpoint->GetCheckpointTip(); + // } diff --git a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp index 9facd60d..5c9bc331 100644 --- a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp @@ -60,7 +60,6 @@ void ABountyHunterCharacter::CompleteCurrentMainBounty(UEVGameInstance* GI) EarnMoney(MoneyEarned); BountyCompletedDisplay(MoneyEarned, 0); if (IsValid(PauseMenu)) PauseMenu->UpdatePlayerStatistics(Money, Favours); - UE_LOG(LogTemp, Warning, TEXT("Would be collecting reward for completing bounty %d"), CurrentMainBountyIndex); // Saves players spawn now as players location is set after spawn main bounty finishes running in begin play GI->MainSaveGameInstanceRef->PlayerOpenWorldSpawnTransformSave = MainBountyClasses[CurrentMainBountyIndex]->GetDefaultObject()->GetPlayerSpawnTransform(); diff --git a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h index e602b6bf..71d32420 100644 --- a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h +++ b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h @@ -285,7 +285,7 @@ private: { DeActivateAllBounties(); CurrentMainBounty->ActivateFirstCheckpoint(); - DisplayCheckpointTip(CurrentMainBounty->GetOpenWorldCheckpointTip()); + //DisplayCheckpointTip(CurrentMainBounty->GetOpenWorldCheckpointTip()); } UFUNCTION()