Back Go Back

Sour Security

Sword Icon

Sour Security

A twisted puzzle sandbox where office objects are your greatest weapon.

Project Asylum
Sour Security

About

Sour Security is a dark-humoured puzzle sandbox game that puts you in the shoes of Merton, a paranoid security guard in an office filled with supposed threats. Instead of maintaining order, Merton wreaks havoc, using office equipment to sabotage coworkers and create chaos. From robot vacuums to printers, every object becomes a tool for player to use against the twisted company that betrayed him.

Project Details

  • Role Icon My Role: Gameplay Systems Programmer (Interaction Systems, Object Mechanics, Prototyping)
  • Team Icon Team Size: 7
  • Engine Icon Engine: Unreal Engine 5 (C++ & Blueprints)
  • Time Icon Development Time: 4 weeks

Sour Security

Introduction

In Sour Security, you play as Merton, a security guard whose growing paranoia turns everyday office life into a battleground of sabotage and mischief. The more Merton tampers with the office environment, the more hostile and unpredictable it becomes. Will you outwit your coworkers, or will the chaos spiral beyond your control?

Gameplay and Features

Development Process, My Contributions & Lessons Learned

As a gameplay programmer, I focused on building robust interaction systems and AI mechanics that brought the chaotic vision of Sour Security to life. Here are the key areas I contributed to:

Working on Sour Security really helped me level up my skills in C++ and Unreal Blueprints, especially when it came to event-driven programming and building complex interaction systems. It pushed my problem-solving abilities as I tackled all kinds of challenges integrating different mechanics. Even though a lot of my work ended up being changed, scrapped, or used as temporary fixes, I don't regret a second of it. It was all part of the process, and it helped me grow a lot as a programmer and a person, and come to realization of my own limits.

Download the files below to explore my personal contributions during the development of Sour Security.

Code

View key scripts and blueprints I worked on in Sour Security.

Robot Parent Object: Insight on the robots (players) functionality.

Blueprint

Component Inheritor (Child Actor Blueprint) - This Blueprint demonstrates how key interaction events are inherited from a parent component to a child actor. It handles events like OnInteractionStarted, OnInteractionFinished, OnOverloadStarted, and OnOverloadFinished, enabling modular and reusable interaction logic across different objects in the game.

Component Inheritor Blueprint
                        
                        // BoobytrapComponent.cpp
                        #include "BoobytrapComponent.h"
                        #include "OverloadComponent.h"
                        #include "TimerManager.h"
                        
                        UBoobytrapComponent::UBoobytrapComponent()
                        {
                            PrimaryComponentTick.bCanEverTick = true;
                            BoobytrapState = E_BoobytrapState::NotBoobytrapped;
                        }
                        
                        void UBoobytrapComponent::BeginPlay()
                        {
                            Super::BeginPlay();
                        
                            AActor* Owner = GetOwner();
                            if (Owner)
                            {
                                OverloadComponent = Owner->FindComponentByClass();
                            }
                        }
                        
                        void UBoobytrapComponent::SetBoobytrap()
                        {
                            if (BoobytrapState == E_BoobytrapState::NotBoobytrapped && OverloadComponent)
                            {
                                BoobytrapState = E_BoobytrapState::Boobytrapped;
                                UE_LOG(LogTemp, Warning, TEXT("Boobytrap set! Waiting for enemy to trigger..."));
                                
                                OnBoobytrapStarted.Broadcast();
                            }
                        }
                        
                        void UBoobytrapComponent::TriggerBoobytrap()
                        {
                            if (BoobytrapState == E_BoobytrapState::Boobytrapped && OverloadComponent)
                            {
                                UE_LOG(LogTemp, Warning, TEXT("Boobytrap triggered! Starting overload..."));
                        
                                OverloadComponent->StateOverload();  
                            }
                        }
                        
                        void UBoobytrapComponent::EndBoobytrap()
                        {
                            BoobytrapState = E_BoobytrapState::NotBoobytrapped;
                            OnBoobytrapFinished.Broadcast();
                            UE_LOG(LogTemp, Warning, TEXT("Boobytrap deactivated!"));
                        }
                        
                    
                        
                        // OverloadComponent.cpp
                        #include "OverloadComponent.h"
                        #include "BoobytrapComponent.h"
                        #include "Components/SphereComponent.h"
                        #include "GameFramework/Actor.h"
                        #include "TimerManager.h"
                        
                        UOverloadComponent::UOverloadComponent()
                        {
                            PrimaryComponentTick.bCanEverTick = true;
                        
                            SphereComponent = CreateDefaultSubobject(TEXT("SphereComponent"));
                            SphereComponent->SetHiddenInGame(false);
                            SphereComponent->SetSphereRadius(300.0f);
                            SphereComponent->SetCollisionProfileName(TEXT("OverlapAllDynamic"));
                        
                            SphereComponent->OnComponentBeginOverlap.AddDynamic(this, &UOverloadComponent::OnComponentBeginOverlap);
                            SphereComponent->OnComponentEndOverlap.AddDynamic(this, &UOverloadComponent::OnComponentEndOverlap);
                        
                            OverloadState = E_OverloadState::NotOverloaded;
                            OverloadDuration = 10.0f;
                            CurrentCountdownTime = 0.0f;
                        }
                        
                        void UOverloadComponent::BeginPlay()
                        {
                            Super::BeginPlay();
                            
                            AActor* Owner = GetOwner();
                            if (Owner)
                            {
                                BoobytrapComponent = Owner->FindComponentByClass();
                                if (BoobytrapComponent)
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("BoobytrapComponent found and assigned."));
                                }
                                else
                                {
                                    UE_LOG(LogTemp, Error, TEXT("BoobytrapComponent not found!"));
                                }
                            }
                        }
                        
                        void UOverloadComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
                        {
                            Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
                        }
                        
                        void UOverloadComponent::StateOverload()
                        {
                            if (OverloadState == E_OverloadState::NotOverloaded)
                            {
                                OverloadState = E_OverloadState::Overloaded;
                                OnOverloadStarted.Broadcast();
                                CurrentCountdownTime = OverloadDuration;
                                
                                GetWorld()->GetTimerManager().SetTimer(CountdownTimerHandle, this, &UOverloadComponent::UpdateCountdown, 1.0f, true);
                                UE_LOG(LogTemp, Warning, TEXT("Overload started"));
                            }
                        }
                        
                        void UOverloadComponent::UpdateCountdown()
                        {
                            if (CurrentCountdownTime > 0)
                            {
                                CurrentCountdownTime--;
                        
                                if (GEngine)
                                {
                                    GEngine->AddOnScreenDebugMessage(1, 1.0f, FColor::Yellow, FString::Printf(TEXT("Overload Time Remaining: %.0f seconds"), CurrentCountdownTime));
                                }
                            }
                            else
                            {
                                EndOverload();
                            }
                        }
                        
                        void UOverloadComponent::EndOverload()
                        {
                            GetWorld()->GetTimerManager().ClearTimer(CountdownTimerHandle);
                            OnOverloadFinished.Broadcast();
                            OverloadState = E_OverloadState::NotOverloaded;
                            UE_LOG(LogTemp, Warning, TEXT("Overload finished"));
                            
                            if (BoobytrapComponent && BoobytrapComponent->GetBoobytrapState() == E_BoobytrapState::Boobytrapped)
                            {
                                BoobytrapComponent->EndBoobytrap(); 
                            }
                        }
                        
                        void UOverloadComponent::OnComponentBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
                        {
                            UE_LOG(LogTemp, Warning, TEXT("Overlap detected with %s"), *OtherActor->GetName());
                        
                            if (BoobytrapComponent && BoobytrapComponent->GetBoobytrapState() == E_BoobytrapState::Boobytrapped)
                            {
                                UE_LOG(LogTemp, Warning, TEXT("Enemy entered boobytrapped zone!"));
                                BoobytrapComponent->TriggerBoobytrap(); 
                            }
                        
                            if (OverloadState == E_OverloadState::Overloaded && OtherActor && OtherActor != GetOwner())
                            {
                                if (OtherActor->ActorHasTag(TEXT("Enemy")))
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("Enemy entered Overload zone! Destroying enemy!"));
                                    OtherActor->Destroy();
                                }
                            }
                        }
                        
                        void UOverloadComponent::OnComponentEndOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex)
                        {

                        }
                        
                    
                        
                        // CarSpawner.cpp - lots of hardcoded stuff because we didn't have animations and i lacked expirience in that field
                        #include "CarSpawner.h"
                        #include "Kismet/GameplayStatics.h"
                        #include "Animation/AnimBlueprint.h"
                        #include "Components/SkeletalMeshComponent.h"
                        #include "UObject/UObjectIterator.h"
                        #include "Engine/World.h"
                        #include "TimerManager.h"
                        
                        ACarSpawner::ACarSpawner()
                        {
                            PrimaryActorTick.bCanEverTick = true;
                        }
                        
                        void ACarSpawner::BeginPlay()
                        {
                            Super::BeginPlay();
                            
                            TArray CarSpawnPointActors;
                            UGameplayStatics::GetAllActorsOfClass(GetWorld(), AActor::StaticClass(), CarSpawnPointActors);
                        
                            for (AActor* Actor : CarSpawnPointActors)
                            {
                                if (Actor->GetName().Contains("CarSpawnPoint"))
                                {
                                    CarSpawnPoints.Add(Actor);
                                    SetNextCarSpawnTimer(Actor);
                                }
                            }
                        }
                        
                        void ACarSpawner::Tick(float DeltaTime)
                        {
                            Super::Tick(DeltaTime);
                        
                            for (int32 i = SpawnedCars.Num() - 1; i >= 0; i--)
                            {
                                AActor* Car = SpawnedCars[i];
                                if (Car)
                                {
                                    FVector ForwardVector = Car->GetActorForwardVector();
                                    FVector NewLocation = Car->GetActorLocation() + (ForwardVector * CarSpeed * DeltaTime);
                                    Car->SetActorLocation(NewLocation);
                                    
                                    if (NewLocation.X > 10000.0f || NewLocation.X < -10000.0f || NewLocation.Y > 10000.0f || NewLocation.Y < -10000.0f)
                                    {
                                        Car->Destroy();
                                        SpawnedCars.RemoveAt(i);
                                    }
                                }
                            }
                        }
                        
                        void ACarSpawner::SetNextCarSpawnTimer(AActor* SpawnPoint)
                        {
                            float RandomCooldown = FMath::RandRange(10.0f, 15.0f);
                            FTimerHandle NewTimer;
                            GetWorld()->GetTimerManager().SetTimer(NewTimer, [this, SpawnPoint]() { SpawnRandomCar(SpawnPoint); }, RandomCooldown, false);
                            CarSpawnTimers.Add(NewTimer);
                        }
                        
                        void ACarSpawner::SpawnRandomCar(AActor* SpawnPoint)
                        {
                            if (CarMeshes.Num() > 0 && CarMaterials.Num() > 0)
                            {
                                int32 RandomMeshIndex = FMath::RandRange(0, CarMeshes.Num() - 1);
                                int32 RandomMaterialIndex = FMath::RandRange(0, CarMaterials.Num() - 1);
                                FVector SpawnLocation = SpawnPoint->GetActorLocation();
                                FRotator SpawnRotation = SpawnPoint->GetActorRotation();
                        
                                FTransform SpawnTransform(SpawnRotation, SpawnLocation);
                                AActor* SpawnedCar = GetWorld()->SpawnActor(AActor::StaticClass(), SpawnTransform);
                        
                                if (SpawnedCar)
                                {
                                    USkeletalMeshComponent* CarMeshComponent = NewObject(SpawnedCar);
                                    CarMeshComponent->RegisterComponentWithWorld(GetWorld());
                                    CarMeshComponent->SetSkeletalMesh(CarMeshes[RandomMeshIndex]);
                                    CarMeshComponent->SetMaterial(0, CarMaterials[RandomMaterialIndex]);
                                    SpawnedCar->SetRootComponent(CarMeshComponent);
                                    SpawnedCar->SetActorTransform(SpawnTransform);
                        
                                    UAnimBlueprint* SelectedAnimBlueprint = nullptr;
                                    switch (RandomMeshIndex)
                                    {
                                        case 0:
                                            SelectedAnimBlueprint = Cast(StaticLoadObject(UAnimBlueprint::StaticClass(), nullptr, TEXT("/Game/Developers/stevanlikusic/CarWheelRotation1.CarWheelRotation1")));
                                            break;
                                        case 1:
                                            SelectedAnimBlueprint = Cast(StaticLoadObject(UAnimBlueprint::StaticClass(), nullptr, TEXT("/Game/Developers/stevanlikusic/CarWheelRotation2.CarWheelRotation2")));
                                            break;
                                        case 2:
                                            SelectedAnimBlueprint = Cast(StaticLoadObject(UAnimBlueprint::StaticClass(), nullptr, TEXT("/Game/Developers/stevanlikusic/CarWheelRotation3.CarWheelRotation3")));
                                            break;
                                        case 3:
                                            SelectedAnimBlueprint = Cast(StaticLoadObject(UAnimBlueprint::StaticClass(), nullptr, TEXT("/Game/Developers/stevanlikusic/CarWheelRotation4.CarWheelRotation4")));
                                            break;
                                        case 4:
                                            SelectedAnimBlueprint = Cast(StaticLoadObject(UAnimBlueprint::StaticClass(), nullptr, TEXT("/Game/Developers/stevanlikusic/CarWheelRotation5.CarWheelRotation5")));
                                            break;
                                        default:
                                            UE_LOG(LogTemp, Error, TEXT("Invalid RandomMeshIndex for car"));
                                            break;
                                    }
                        
                                    if (SelectedAnimBlueprint)
                                    {
                                        CarMeshComponent->SetAnimInstanceClass(SelectedAnimBlueprint->GeneratedClass);
                                        UE_LOG(LogTemp, Warning, TEXT("Assigned Animation Blueprint: %s to the car"), *SelectedAnimBlueprint->GetName());
                                        
                                        UAnimInstance* AnimInstance = CarMeshComponent->GetAnimInstance();
                                        if (AnimInstance)
                                        {
                                            CarMeshComponent->Play(true);  
                                            UE_LOG(LogTemp, Warning, TEXT("Animation is forced to play."));
                                        }
                                        else
                                        {
                                            UE_LOG(LogTemp, Error, TEXT("AnimInstance is NULL. Animation not applied."));
                                        }
                                    }
                                    else
                                    {
                                        UE_LOG(LogTemp, Error, TEXT("Failed to assign animation blueprint to the car."));
                                    }
                        
                                    SpawnedCars.Add(SpawnedCar);
                                }
                            }
                            SetNextCarSpawnTimer(SpawnPoint);
                        }
                        
                        
                            
                            // DistractableComponent.cpp
                            #include "DistractableComponent.h"
                            #include "Components/SphereComponent.h"
                            #include "GameFramework/Actor.h"
                            
                            UDistractableComponent::UDistractableComponent()
                            {
                                PrimaryComponentTick.bCanEverTick = true;
                            
                                SphereComponent = CreateDefaultSubobject(TEXT("SphereComponent"));
                                SphereComponent->SetHiddenInGame(false);
                                SphereComponent->SetSphereRadius(300.0f);
                                SphereComponent->SetCollisionProfileName(TEXT("OverlapAllDynamic"));
                            
                                SphereComponent->OnComponentBeginOverlap.AddDynamic(this, &UDistractableComponent::OnComponentBeginOverlap);
                                SphereComponent->OnComponentEndOverlap.AddDynamic(this, &UDistractableComponent::OnComponentEndOverlap);
                            
                                RootComponent = SphereComponent;
                            }
                            
                            void UDistractableComponent::BeginPlay()
                            {
                                Super::BeginPlay();
                            }
                            
                            void UDistractableComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
                            {
                                Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
                            }
                            
                            void UDistractableComponent::OnComponentBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
                            {
                                if (OtherActor != nullptr && OtherActor != GetOwner())
                                {
                                    if (OtherActor->ActorHasTag(TEXT("Enemy")))
                                    {
                                        // Uncomment if debug info is needed
                                        // UE_LOG(LogTemp, Warning, TEXT("Started overlapping with the actor that has the 'Enemy' tag!"));
                                    }
                                }
                                OnDistractionStarted.Broadcast();
                            }
                            
                            void UDistractableComponent::OnComponentEndOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex)
                            {
                                if (OtherActor != nullptr && OtherActor != GetOwner())
                                {
                                    if (OtherActor->ActorHasTag(TEXT("Enemy")))
                                    {
                                        // Uncomment if debug info is needed
                                        // UE_LOG(LogTemp, Warning, TEXT("Ended overlapping with the actor that has the 'Enemy' tag!"));
                                    }
                                }
                                OnDistractionFinished.Broadcast();
                            }
                            
                        
                            
                            // Interactable_Distractable_Parent.cpp
                            #include "Interactable_Distractable_Parent.h"
                            #include "InteractableComponent.h"
                            #include "OverloadComponent.h"
                            #include "BoobytrapComponent.h"
                            
                            AInteractable_Distractable_Parent::AInteractable_Distractable_Parent()
                            {
                                PrimaryActorTick.bCanEverTick = true;
                            
                                InteractableComponent = CreateDefaultSubobject(TEXT("InteractableComponent"));
                                OverloadComponent = CreateDefaultSubobject(TEXT("OverloadComponent"));
                                BoobytrapComponent = CreateDefaultSubobject(TEXT("BoobytrapComponent"));
                                InteractableTarget = CreateDefaultSubobject(TEXT("InteractableTarget"));
                            }
                            
                            void AInteractable_Distractable_Parent::BeginPlay()
                            {
                                Super::BeginPlay();
                            
                                if (InteractableComponent)
                                {
                                    InteractableComponent->SetActive(true);
                                    InteractableComponent->OnInteractionStarted.AddDynamic(this, &AInteractable_Distractable_Parent::OnInteractionStarted_Event);
                                    InteractableComponent->OnInteractionFinished.AddDynamic(this, &AInteractable_Distractable_Parent::OnInteractionFinished_Event);
                                    UE_LOG(LogTemp, Warning, TEXT("InteractableComponent is active"));
                                }
                            
                                if (OverloadComponent)
                                {
                                    OverloadComponent->SetActive(true);
                                    OverloadComponent->OnOverloadStarted.AddDynamic(this, &AInteractable_Distractable_Parent::OnOverloadStarted_Event);
                                    OverloadComponent->OnOverloadFinished.AddDynamic(this, &AInteractable_Distractable_Parent::OnOverloadFinished_Event);
                                    UE_LOG(LogTemp, Warning, TEXT("OverloadComponent is active"));
                                }
                            
                                if (BoobytrapComponent)
                                {
                                    BoobytrapComponent->SetActive(true);
                                    UE_LOG(LogTemp, Warning, TEXT("BoobytrapComponent is active"));
                                }
                            }
                            
                            void AInteractable_Distractable_Parent::Tick(float DeltaTime)
                            {
                                Super::Tick(DeltaTime);
                            }
                            
                            void AInteractable_Distractable_Parent::OnInteractionStarted_Event()
                            {
                                UE_LOG(LogTemp, Display, TEXT("Interaction Started Event"));
                            }
                            
                            void AInteractable_Distractable_Parent::OnInteractionFinished_Event()
                            {
                                UE_LOG(LogTemp, Display, TEXT("Interaction Finished Event"));
                            }
                            
                            void AInteractable_Distractable_Parent::OnOverloadStarted_Event()
                            {
                                UE_LOG(LogTemp, Display, TEXT("Overload Started Event"));
                            }
                            
                            void AInteractable_Distractable_Parent::OnOverloadFinished_Event()
                            {
                                UE_LOG(LogTemp, Display, TEXT("Overload Finished Event"));
                            }
                            
                        
                            
                            // InteractableComponent.cpp
                            #include "InteractableComponent.h"
                            
                            UInteractableComponent::UInteractableComponent()
                            {
                                PrimaryComponentTick.bCanEverTick = true;
                                ActivityState = E_ActivityState::Inactive;  
                            }
                            
                            void UInteractableComponent::BeginPlay()
                            {
                                Super::BeginPlay();
                            }
                            
                            void UInteractableComponent::StateInteract()
                            {
                                UE_LOG(LogTemp, Warning, TEXT("Interact() called!"));
                                
                                if (ActivityState == E_ActivityState::Inactive)
                                {
                                    ActivityState = E_ActivityState::Active;
                                    OnInteractionStarted.Broadcast(); 
                                    UE_LOG(LogTemp, Warning, TEXT("Current State: Active")); 
                                }
                                else
                                {
                                    ActivityState = E_ActivityState::Inactive;
                                    OnInteractionFinished.Broadcast(); 
                                    UE_LOG(LogTemp, Warning, TEXT("Current State: Inactive")); 
                                }
                            }
                            
                            void UInteractableComponent::ToggleState()
                            {
                                StateInteract(); 
                            }
                            
                        
                            
                            // InteractableTarget.cpp - This one was very hard coded but it was made for prototyping
                            #include "InteractableTarget.h"
                            #include "GameFramework/PlayerController.h"
                            #include "Engine/Engine.h"
                            #include "InteractableComponent.h"
                            #include "OverloadComponent.h"
                            #include "BoobytrapComponent.h"
                            
                            bool UInteractableTarget::bIsGlobalInteracting = false;
                            
                            UInteractableTarget::UInteractableTarget()
                            {
                                PrimaryComponentTick.bCanEverTick = true;
                                bIsInteracting = false;
                            }
                            
                            void UInteractableTarget::BeginPlay()
                            {
                                Super::BeginPlay();
                                
                                bIsGlobalInteracting = false;
                                
                                AActor* Owner = GetOwner();
                                if (Owner)
                                {
                                    InteractableComponent = Owner->FindComponentByClass();
                                    OverloadComponent = Owner->FindComponentByClass();
                                    BoobytrapComponent = Owner->FindComponentByClass();
                                }
                            }
                            
                            void UInteractableTarget::EndPlay(const EEndPlayReason::Type EndPlayReason)
                            {
                                Super::EndPlay(EndPlayReason);
                                
                                bIsGlobalInteracting = false;
                            }
                            
                            void UInteractableTarget::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
                            {
                                Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
                            }
                            
                            void UInteractableTarget::OpenInteractionMenu()
                            {
                                if (bIsGlobalInteracting) 
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("A menu is already open globally. Cannot open another."));
                                    return;
                                }
                            
                                UE_LOG(LogTemp, Warning, TEXT("Menu Options:"));
                            
                                bool bHasOptions = false;
                            
                                if (InteractableComponent && InteractableComponent->IsActive())
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("[T] - Interact"));
                                    bHasOptions = true;
                                }
                            
                                if (OverloadComponent && OverloadComponent->IsActive())
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("[Y] - Overload"));
                                    bHasOptions = true;
                                }
                            
                                if (BoobytrapComponent && BoobytrapComponent->IsActive())
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("[R] - Boobytrap"));
                                    bHasOptions = true;
                                }
                                
                                UE_LOG(LogTemp, Warning, TEXT("[C] - Cancel"));
                            
                                if (!bHasOptions)
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("No other actions available, showing only Cancel"));
                                }
                            
                                ClearMenuBindings();
                            
                                APlayerController* PC = GetWorld()->GetFirstPlayerController();
                                if (PC && !bIsInteracting)
                                {
                                    if (InteractableComponent && InteractableComponent->IsActive())
                                    {
                                        PC->InputComponent->BindAction("InteractAction", IE_Pressed, this, &UInteractableTarget::HandleInteractAction);
                                    }
                                    if (OverloadComponent && OverloadComponent->IsActive())
                                    {
                                        PC->InputComponent->BindAction("OverloadAction", IE_Pressed, this, &UInteractableTarget::HandleOverloadAction);
                                    }
                                    if (BoobytrapComponent && BoobytrapComponent->IsActive())
                                    {
                                        PC->InputComponent->BindAction("BoobytrapAction", IE_Pressed, this, &UInteractableTarget::HandleBoobytrapAction);
                                    }
                                    PC->InputComponent->BindAction("CancelAction", IE_Pressed, this, &UInteractableTarget::HandleCancelAction);
                            
                                    bIsInteracting = true;
                                    bIsGlobalInteracting = true; 
                                }
                            }
                            
                            void UInteractableTarget::HandleInteractAction()
                            {
                                if (InteractableComponent)
                                {
                                    InteractableComponent->StateInteract();
                                }
                                ClearMenuBindings(); 
                            }
                            
                            void UInteractableTarget::HandleOverloadAction()
                            {
                                if (OverloadComponent)
                                {
                                    OverloadComponent->StateOverload(); 
                                }
                                ClearMenuBindings();
                            }
                            
                            void UInteractableTarget::HandleBoobytrapAction()
                            {
                                if (BoobytrapComponent)
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("Boobytrap Activated!"));
                                    BoobytrapComponent->SetBoobytrap();
                                }
                            
                                ClearMenuBindings();
                            }
                            
                            void UInteractableTarget::HandleCancelAction()
                            {
                                UE_LOG(LogTemp, Warning, TEXT("You chose to Cancel"));
                                ClearMenuBindings(); 
                            }
                            
                            void UInteractableTarget::ClearMenuBindings()
                            {
                                APlayerController* PC = GetWorld()->GetFirstPlayerController();
                                if (PC && bIsInteracting)
                                {
                                    PC->InputComponent->RemoveActionBinding("InteractAction", IE_Pressed);
                                    PC->InputComponent->RemoveActionBinding("OverloadAction", IE_Pressed);
                                    PC->InputComponent->RemoveActionBinding("BoobytrapAction", IE_Pressed);
                                    PC->InputComponent->RemoveActionBinding("CancelAction", IE_Pressed);
                            
                                    bIsInteracting = false;
                                    bIsGlobalInteracting = false; 
                                }
                            }
                            
                        
                            
                            // InteractComponent.cpp 
                            #include "InteractComponent.h"
                            #include "GameFramework/PlayerController.h"
                            #include "Engine/Engine.h"
                            #include "DrawDebugHelpers.h"
                            #include "GameFramework/Pawn.h"
                            
                            UInteractComponent::UInteractComponent()
                            {
                                PrimaryComponentTick.bCanEverTick = true;
                                bCanInteract = true;  
                                CollisionParams.AddIgnoredActor(GetOwner());
                            }
                            
                            void UInteractComponent::BeginPlay()
                            {
                                Super::BeginPlay();
                            
                                OwningPawn = Cast(GetOwner());
                                if (OwningPawn && GetWorld())
                                {
                                    APlayerController* PC = GetWorld()->GetFirstPlayerController();
                                    if (PC && PC->InputComponent)
                                    {
                                        PC->InputComponent->BindAction("Interact", IE_Pressed, this, &UInteractComponent::HandleInteract);
                                    }
                                }
                            
                                bCanInteract = OwningPawn->IsValidLowLevel();
                            }
                            
                            void UInteractComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
                            {
                                Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
                            
                                if (OwningPawn)
                                {
                                    APlayerController* PC = GetWorld()->GetFirstPlayerController();
                                    if (PC)
                                    {
                                        bCanInteract = (PC->GetPawn() == OwningPawn);
                                    }
                                }
                            }
                            
                            void UInteractComponent::InteractableObjectCheck()
                            {
                                if (!bCanInteract)
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("bCanInteract is false, returning"));
                                    return;
                                }
                            
                                const AActor* MyActor = GetOwner();
                                if (!MyActor || !GetWorld())
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("Actor or World not valid"));
                                    return;
                                }
                            
                                FVector ViewForward = MyActor->GetActorForwardVector();
                                FVector ViewStart = MyActor->GetActorLocation();
                                FVector TraceEnd = ViewStart + ViewForward * 1000.0f; 
                            
                                FHitResult HitResult;
                                bool bHit = GetWorld()->LineTraceSingleByChannel(HitResult, ViewStart, TraceEnd, ECC_Visibility, CollisionParams);
                            
                                DrawDebugLine(GetWorld(), ViewStart, TraceEnd, FColor::Green, false, 5.0f, 0.0f, 0.5f);
                            
                                if (bHit)
                                {
                                    AActor* HitActor = HitResult.GetActor();
                                    UE_LOG(LogTemp, Warning, TEXT("Line trace hit %s"), *HitActor->GetName());
                            
                                    InteractableTarget = Cast(HitActor->GetComponentByClass(UInteractableTarget::StaticClass()));
                                    if (InteractableTarget)
                                    {
                                        UE_LOG(LogTemp, Warning, TEXT("Interactable target found, opening menu"));
                                        InteractableTarget->OpenInteractionMenu();
                                    }
                                }
                                else
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("Line trace did not hit any interactable target"));
                                }
                            }
                            
                            void UInteractComponent::HandleInteract()
                            {
                                if (bCanInteract)
                                {
                                    InteractableObjectCheck();
                                }
                            }
                            
                        
                            
                            // InteractableTarget.cpp 
                            #include "InteractableTarget.h"
                            #include "GameFramework/PlayerController.h"
                            #include "Engine/Engine.h"
                            #include "InteractableComponent.h"
                            #include "OverloadComponent.h"
                            #include "BoobytrapComponent.h"
                            
                            bool UInteractableTarget::bIsGlobalInteracting = false;
                            
                            UInteractableTarget::UInteractableTarget()
                            {
                                PrimaryComponentTick.bCanEverTick = true;
                                bIsInteracting = false;
                            }
                            
                            void UInteractableTarget::BeginPlay()
                            {
                                Super::BeginPlay();
                                
                                bIsGlobalInteracting = false;
                                
                                AActor* Owner = GetOwner();
                                if (Owner)
                                {
                                    InteractableComponent = Owner->FindComponentByClass();
                                    OverloadComponent = Owner->FindComponentByClass();
                                    BoobytrapComponent = Owner->FindComponentByClass();
                                }
                            }
                            
                            void UInteractableTarget::EndPlay(const EEndPlayReason::Type EndPlayReason)
                            {
                                Super::EndPlay(EndPlayReason);
                                
                                bIsGlobalInteracting = false;
                            }
                            
                            void UInteractableTarget::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
                            {
                                Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
                            }
                            
                            void UInteractableTarget::OpenInteractionMenu()
                            {
                                if (bIsGlobalInteracting) 
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("A menu is already open globally. Cannot open another."));
                                    return;
                                }
                            
                                UE_LOG(LogTemp, Warning, TEXT("Menu Options:"));
                            
                                bool bHasOptions = false;
                            
                                if (InteractableComponent && InteractableComponent->IsActive())
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("[T] - Interact"));
                                    bHasOptions = true;
                                }
                            
                                if (OverloadComponent && OverloadComponent->IsActive())
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("[Y] - Overload"));
                                    bHasOptions = true;
                                }
                            
                                if (BoobytrapComponent && BoobytrapComponent->IsActive())
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("[R] - Boobytrap"));
                                    bHasOptions = true;
                                }
                                
                                UE_LOG(LogTemp, Warning, TEXT("[C] - Cancel"));
                            
                                if (!bHasOptions)
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("No other actions available, showing only Cancel"));
                                }
                            
                                ClearMenuBindings();
                            
                                APlayerController* PC = GetWorld()->GetFirstPlayerController();
                                if (PC && !bIsInteracting)
                                {
                                    if (InteractableComponent && InteractableComponent->IsActive())
                                    {
                                        PC->InputComponent->BindAction("InteractAction", IE_Pressed, this, &UInteractableTarget::HandleInteractAction);
                                    }
                                    if (OverloadComponent && OverloadComponent->IsActive())
                                    {
                                        PC->InputComponent->BindAction("OverloadAction", IE_Pressed, this, &UInteractableTarget::HandleOverloadAction);
                                    }
                                    if (BoobytrapComponent && BoobytrapComponent->IsActive())
                                    {
                                        PC->InputComponent->BindAction("BoobytrapAction", IE_Pressed, this, &UInteractableTarget::HandleBoobytrapAction);
                                    }
                                    PC->InputComponent->BindAction("CancelAction", IE_Pressed, this, &UInteractableTarget::HandleCancelAction);
                            
                                    bIsInteracting = true;
                                    bIsGlobalInteracting = true; 
                                }
                            }
                            
                            void UInteractableTarget::HandleInteractAction()
                            {
                                if (InteractableComponent)
                                {
                                    InteractableComponent->StateInteract();
                                }
                                ClearMenuBindings(); 
                            }
                            
                            void UInteractableTarget::HandleOverloadAction()
                            {
                                if (OverloadComponent)
                                {
                                    OverloadComponent->StateOverload(); 
                                }
                                ClearMenuBindings();
                            }
                            
                            void UInteractableTarget::HandleBoobytrapAction()
                            {
                                if (BoobytrapComponent)
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("Boobytrap Activated!"));
                                    BoobytrapComponent->SetBoobytrap();
                                }
                            
                                ClearMenuBindings();
                            }
                            
                            void UInteractableTarget::HandleCancelAction()
                            {
                                UE_LOG(LogTemp, Warning, TEXT("You chose to Cancel"));
                                ClearMenuBindings(); 
                            }
                            
                            void UInteractableTarget::ClearMenuBindings()
                            {
                                APlayerController* PC = GetWorld()->GetFirstPlayerController();
                                if (PC && bIsInteracting)
                                {
                                    PC->InputComponent->RemoveActionBinding("InteractAction", IE_Pressed);
                                    PC->InputComponent->RemoveActionBinding("OverloadAction", IE_Pressed);
                                    PC->InputComponent->RemoveActionBinding("BoobytrapAction", IE_Pressed);
                                    PC->InputComponent->RemoveActionBinding("CancelAction", IE_Pressed);
                            
                                    bIsInteracting = false;
                                    bIsGlobalInteracting = false; 
                                }
                            }
                            
                        
                            
                            // InteractComponent.cpp - 
                            #include "InteractComponent.h"
                            #include "GameFramework/PlayerController.h"
                            #include "Engine/Engine.h"
                            #include "DrawDebugHelpers.h"
                            #include "GameFramework/Pawn.h"
                            
                            UInteractComponent::UInteractComponent()
                            {
                                PrimaryComponentTick.bCanEverTick = true;
                                bCanInteract = true;  
                                CollisionParams.AddIgnoredActor(GetOwner());
                            }
                            
                            void UInteractComponent::BeginPlay()
                            {
                                Super::BeginPlay();
                            
                                OwningPawn = Cast(GetOwner());
                                if (OwningPawn && GetWorld())
                                {
                                    APlayerController* PC = GetWorld()->GetFirstPlayerController();
                                    if (PC && PC->InputComponent)
                                    {
                                        PC->InputComponent->BindAction("Interact", IE_Pressed, this, &UInteractComponent::HandleInteract);
                                    }
                                }
                            
                                bCanInteract = OwningPawn->IsValidLowLevel();
                            }
                            
                            void UInteractComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
                            {
                                Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
                            
                                if (OwningPawn)
                                {
                                    APlayerController* PC = GetWorld()->GetFirstPlayerController();
                                    if (PC)
                                    {
                                        bCanInteract = (PC->GetPawn() == OwningPawn);
                                    }
                                }
                            }
                            
                            void UInteractComponent::InteractableObjectCheck()
                            {
                                if (!bCanInteract)
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("bCanInteract is false, returning"));
                                    return;
                                }
                            
                                const AActor* MyActor = GetOwner();
                                if (!MyActor || !GetWorld())
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("Actor or World not valid"));
                                    return;
                                }
                            
                                FVector ViewForward = MyActor->GetActorForwardVector();
                                FVector ViewStart = MyActor->GetActorLocation();
                                FVector TraceEnd = ViewStart + ViewForward * 1000.0f; 
                            
                                FHitResult HitResult;
                                bool bHit = GetWorld()->LineTraceSingleByChannel(HitResult, ViewStart, TraceEnd, ECC_Visibility, CollisionParams);
                            
                                DrawDebugLine(GetWorld(), ViewStart, TraceEnd, FColor::Green, false, 5.0f, 0.0f, 0.5f);
                            
                                if (bHit)
                                {
                                    AActor* HitActor = HitResult.GetActor();
                                    UE_LOG(LogTemp, Warning, TEXT("Line trace hit %s"), *HitActor->GetName());
                            
                                    InteractableTarget = Cast(HitActor->GetComponentByClass(UInteractableTarget::StaticClass()));
                                    if (InteractableTarget)
                                    {
                                        UE_LOG(LogTemp, Warning, TEXT("Interactable target found, opening menu"));
                                        InteractableTarget->OpenInteractionMenu();
                                    }
                                }
                                else
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("Line trace did not hit any interactable target"));
                                }
                            }
                            
                            void UInteractComponent::HandleInteract()
                            {
                                if (bCanInteract)
                                {
                                    InteractableObjectCheck();
                                }
                            }
                            
                        
                            
                            // OverloadComponent.cpp 
                            #include "OverloadComponent.h"
                            #include "BoobytrapComponent.h"
                            #include "Components/SphereComponent.h"
                            #include "GameFramework/Actor.h"
                            #include "TimerManager.h"
                            
                            UOverloadComponent::UOverloadComponent()
                            {
                                PrimaryComponentTick.bCanEverTick = true;
                            
                                SphereComponent = CreateDefaultSubobject(TEXT("SphereComponent"));
                                SphereComponent->SetHiddenInGame(false);
                                SphereComponent->SetSphereRadius(300.0f);
                                SphereComponent->SetCollisionProfileName(TEXT("OverlapAllDynamic"));
                            
                                SphereComponent->OnComponentBeginOverlap.AddDynamic(this, &UOverloadComponent::OnComponentBeginOverlap);
                                SphereComponent->OnComponentEndOverlap.AddDynamic(this, &UOverloadComponent::OnComponentEndOverlap);
                            
                                OverloadState = E_OverloadState::NotOverloaded;
                                OverloadDuration = 10.0f;
                                CurrentCountdownTime = 0.0f;
                            }
                            
                            void UOverloadComponent::BeginPlay()
                            {
                                Super::BeginPlay();
                                
                                AActor* Owner = GetOwner();
                                if (Owner)
                                {
                                    BoobytrapComponent = Owner->FindComponentByClass();
                                    if (BoobytrapComponent)
                                    {
                                        UE_LOG(LogTemp, Warning, TEXT("BoobytrapComponent found and assigned."));
                                    }
                                    else
                                    {
                                        UE_LOG(LogTemp, Error, TEXT("BoobytrapComponent not found!"));
                                    }
                                }
                            }
                            
                            void UOverloadComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
                            {
                                Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
                            }
                            
                            void UOverloadComponent::StateOverload()
                            {
                                if (OverloadState == E_OverloadState::NotOverloaded)
                                {
                                    OverloadState = E_OverloadState::Overloaded;
                                    OnOverloadStarted.Broadcast();
                                    CurrentCountdownTime = OverloadDuration;
                                    
                                    GetWorld()->GetTimerManager().SetTimer(CountdownTimerHandle, this, &UOverloadComponent::UpdateCountdown, 1.0f, true);
                                    UE_LOG(LogTemp, Warning, TEXT("Overload started"));
                                }
                            }
                            
                            void UOverloadComponent::UpdateCountdown()
                            {
                                if (CurrentCountdownTime > 0)
                                {
                                    CurrentCountdownTime--;
                            
                                    if (GEngine)
                                    {
                                        GEngine->AddOnScreenDebugMessage(1, 1.0f, FColor::Yellow, FString::Printf(TEXT("Overload Time Remaining: %.0f seconds"), CurrentCountdownTime));
                                    }
                                }
                                else
                                {
                                    EndOverload();
                                }
                            }
                            
                            void UOverloadComponent::EndOverload()
                            {
                                GetWorld()->GetTimerManager().ClearTimer(CountdownTimerHandle);
                                OnOverloadFinished.Broadcast();
                                OverloadState = E_OverloadState::NotOverloaded;
                                UE_LOG(LogTemp, Warning, TEXT("Overload finished"));
                                
                                if (BoobytrapComponent && BoobytrapComponent->GetBoobytrapState() == E_BoobytrapState::Boobytrapped)
                                {
                                    BoobytrapComponent->EndBoobytrap(); 
                                }
                            }
                            
                            void UOverloadComponent::OnComponentBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
                            {
                                UE_LOG(LogTemp, Warning, TEXT("Overlap detected with %s"), *OtherActor->GetName());
                            
                                if (BoobytrapComponent && BoobytrapComponent->GetBoobytrapState() == E_BoobytrapState::Boobytrapped)
                                {
                                    UE_LOG(LogTemp, Warning, TEXT("Enemy entered boobytrapped zone!"));
                                    BoobytrapComponent->TriggerBoobytrap(); 
                                }
                            
                                if (OverloadState == E_OverloadState::Overloaded && OtherActor && OtherActor != GetOwner())
                                {
                                    if (OtherActor->ActorHasTag(TEXT("Enemy")))
                                    {
                                        UE_LOG(LogTemp, Warning, TEXT("Enemy entered Overload zone! Destroying enemy!"));
                                        OtherActor->Destroy();
                                    }
                                }
                            }
                            
                            void UOverloadComponent::OnComponentEndOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex)
                            {
                                // No specific behavior for ending overlap
                            }
                            
                        
                            
                            // PedestrianSpawner.cpp - lots of hardcoded stuff because we didn't have animations and i lacked expirience in that field
                            #include "PedestrianSpawner.h"
                            #include "Kismet/GameplayStatics.h"
                            #include "Components/SkeletalMeshComponent.h"
                            #include "Components/SceneComponent.h"
                            #include "Animation/AnimInstance.h"
                            #include "Engine/World.h"
                            
                            APedestrianSpawner::APedestrianSpawner()
                            {
                                PrimaryActorTick.bCanEverTick = true;
                                
                                static ConstructorHelpers::FClassFinder WalkingOnlyBP(TEXT("/Game/Core/AI/Animation/WalkingOnly"));
                                if (WalkingOnlyBP.Succeeded())
                                {
                                    WalkingOnlyAnimBlueprintClass = WalkingOnlyBP.Class;
                                }
                                
                                MinSpawnTime = 10.0f;
                                MaxSpawnTime = 15.0f;
                            }
                            
                            void APedestrianSpawner::BeginPlay()
                            {
                                Super::BeginPlay();
                                UE_LOG(LogTemp, Warning, TEXT("PedestrianSpawner BeginPlay called"));
                                
                                TArray PedestrianSpawnPointActors;
                                UGameplayStatics::GetAllActorsOfClass(GetWorld(), AActor::StaticClass(), PedestrianSpawnPointActors);
                            
                                for (AActor* Actor : PedestrianSpawnPointActors)
                                {
                                    if (Actor->GetName().Contains("PedestrianSpawnPoint"))
                                    {
                                        PedestrianSpawnPoints.Add(Actor);
                                        SetNextPedestrianSpawnTimer(Actor); 
                                    }
                                }
                            
                                UE_LOG(LogTemp, Warning, TEXT("Found %d PedestrianSpawnPoints"), PedestrianSpawnPoints.Num());
                            }
                            
                            void APedestrianSpawner::Tick(float DeltaTime)
                            {
                                Super::Tick(DeltaTime);
                            
                                for (int32 i = SpawnedPedestrians.Num() - 1; i >= 0; i--)
                                {
                                    AActor* Pedestrian = SpawnedPedestrians[i];
                                    if (Pedestrian)
                                    {
                                        USkeletalMeshComponent* PedestrianMeshComponent = Pedestrian->FindComponentByClass();
                                        if (PedestrianMeshComponent)
                                        {
                                            FVector CurrentLocation = Pedestrian->GetActorLocation();
                                            FVector ForwardVector = Pedestrian->GetActorForwardVector();
                                            FVector NewLocation = CurrentLocation + (ForwardVector * PedestrianSpeed * DeltaTime);
                                            Pedestrian->SetActorLocation(NewLocation);
                            
                                            if (NewLocation.X > 10000.0f || NewLocation.X < -10000.0f || NewLocation.Y > 10000.0f || NewLocation.Y < -10000.0f)
                                            {
                                                Pedestrian->Destroy();
                                                SpawnedPedestrians.RemoveAt(i);
                                            }
                                        }
                                    }
                                }
                            }
                            
                            void APedestrianSpawner::SetNextPedestrianSpawnTimer(AActor* SpawnPoint)
                            {
                                float RandomCooldown = FMath::RandRange(MinSpawnTime, MaxSpawnTime);
                                FTimerHandle NewTimer;
                                GetWorld()->GetTimerManager().SetTimer(NewTimer, [this, SpawnPoint]() { SpawnRandomPedestrian(SpawnPoint); }, RandomCooldown, false);
                                PedestrianSpawnTimers.Add(NewTimer);
                            }
                            
                            void APedestrianSpawner::SpawnRandomPedestrian(AActor* SpawnPoint)
                            {
                                UE_LOG(LogTemp, Warning, TEXT("SpawnRandomPedestrian called"));
                            
                                if (PedestrianMeshes.Num() > 0)
                                {
                                    int32 RandomMeshIndex = FMath::RandRange(0, PedestrianMeshes.Num() - 1);
                                    FVector SpawnLocation = SpawnPoint->GetActorLocation();
                                    FRotator SpawnRotation = SpawnPoint->GetActorRotation();
                            
                                    FTransform SpawnTransform;
                                    SpawnTransform.SetLocation(SpawnLocation);
                                    SpawnTransform.SetRotation(SpawnRotation.Quaternion());
                            
                                    AActor* SpawnedPedestrian = GetWorld()->SpawnActor(AActor::StaticClass(), SpawnTransform);
                                    if (SpawnedPedestrian)
                                    {
                                        USceneComponent* RootSceneComponent = NewObject(SpawnedPedestrian);
                                        RootSceneComponent->RegisterComponent();
                                        SpawnedPedestrian->SetRootComponent(RootSceneComponent);
                            
                                        USkeletalMeshComponent* PedestrianMeshComponent = NewObject(SpawnedPedestrian);
                                        if (PedestrianMeshComponent)
                                        {
                                            PedestrianMeshComponent->RegisterComponent();
                                            PedestrianMeshComponent->SetSkeletalMesh(PedestrianMeshes[RandomMeshIndex]);
                                            PedestrianMeshComponent->AttachToComponent(RootSceneComponent, FAttachmentTransformRules::KeepRelativeTransform);
                            
                                            if (WalkingOnlyAnimBlueprintClass)
                                            {
                                                PedestrianMeshComponent->SetAnimInstanceClass(WalkingOnlyAnimBlueprintClass);
                                                PedestrianMeshComponent->SetAnimationMode(EAnimationMode::AnimationBlueprint);
                                            }
                            
                                            FRotator MeshRotation = PedestrianMeshComponent->GetRelativeRotation();
                                            MeshRotation.Yaw += -90.0f;
                                            PedestrianMeshComponent->SetRelativeRotation(MeshRotation);
                            
                                            SpawnedPedestrian->SetActorTransform(SpawnTransform);
                            
                                            UE_LOG(LogTemp, Warning, TEXT("Final Pedestrian Forward Vector: %s"), *SpawnedPedestrian->GetActorForwardVector().ToString());
                            
                                            SpawnedPedestrians.Add(SpawnedPedestrian);
                                        }
                                    }
                                    SetNextPedestrianSpawnTimer(SpawnPoint); 
                                }
                            }