#46 Sanity Based Ghost Hunt Chance - How to Make a Ghost Hunting Game in Unreal

In this lesson, we improve the ghost hunting system for our Unreal Engine 5 ghost hunting game. Until now, the hunt was basically always active once the sanity condition was met. That means the ghost had no real chance to stop hunting or switch into other behavior branches like roaming, interaction, or passive ghost activity. In this video, we change that by adding a more flexible sanity-based hunt chance. Instead of simply checking if one player is below a fixed sanity value, we calculate the average sanity of the whole team. This is important for multiplayer, because the ghost should react to the group situation instead of only one player. After we get the team sanity, we turn it into a hunt chance. The lower the team sanity is, the higher the chance that the ghost will start a hunt. For example, if the team sanity is still high, the hunt chance is low. If the team sanity drops, the ghost becomes more dangerous and is more likely to start hunting. We then add a random float check, so the hunt does not start every single time the condition is checked. This gives the system a more natural feeling and creates space for unpredictable ghost behavior. To avoid checking this logic every frame, we move the hunt check into a timer. The ghost now checks the hunt chance every few seconds instead of constantly running the logic on Tick. This is cleaner, more controlled, and easier to balance later. During testing, we also fix an important issue where the team sanity value kept adding up over time. To solve this, we reset the team sanity before each new calculation. By the end of this video, the ghost can start and stop hunts based on a timed sanity chance system. This prepares the Behavior Tree for the next step, where the ghost can finally move into passive branches like roaming and interaction when it is not hunting. What you will learn in this video: How to improve the ghost hunt start logic How to calculate average team sanity How to turn sanity into a hunt chance How to use a random float roll for hunt probability How to avoid hunts being active all the time How to use a timer instead of checking every frame How to reset values before recalculating team sanity How to prepare the Behavior Tree for roaming and interaction behavior Chapters: 0:00 Intro & Hunt Logic Goal 0:21 Reviewing the Current Hunt Problem 0:47 Replacing the Simple Sanity Check 1:26 Creating the Team Sanity Value 2:09 Getting Sanity from the Player 3:24 Adding Player Sanity Together 4:03 Calculating Average Team Sanity 4:43 Creating the Hunt Chance Roll 5:00 Turning Sanity into Hunt Probability 7:49 Connecting the Hunt Result to the Blackboard 8:21 Adding a Timer for Hunt Checks 10:34 Testing with Faster Timer Values 11:32 Fixing the Team Sanity Reset 12:18 Setting the Final Hunt Check Timer 12:31 Testing the Timed Hunt Chance 13:14 Final Result Course Goal: We are building a first-person ghost hunting horror game in Unreal Engine 5 step by step. The project includes player movement, multiplayer, interaction systems, inventory, equipment, ghost hunting tools, evidence systems, ghost AI, sanity, investigation gameplay, and a complete horror game loop. #UnrealEngine5 #UE5 #UnrealEngine #GhostHuntingGame #HorrorGame #GhostAI #SanitySystem #HuntChance #GhostHunt #BehaviorTree #Blackboard #EnemyAI #UE5Blueprints #BlueprintTutorial #HorrorGameDevelopment #IndieGameDev #FirstPersonHorror #PhasmophobiaInspired

#45 Ghost AI Hearing & Last Seen Location - How to Make a Ghost Hunting Game in Unreal
▶︎

#45 Ghost AI Hearing & Last Seen Location - How to Make a Ghost Hunting Game in Unreal

I Trapped A Scammer For 12 Days (he's furious)
▶︎

I Trapped A Scammer For 12 Days (he's furious)

Don't Buy Mocap Gear! Do This Instead in Unreal Engine 5.8
▶︎

Don't Buy Mocap Gear! Do This Instead in Unreal Engine 5.8

MORNING PRAYER | Surrender Your Family to God with Faith and Walk this Day in His Peace and Prote...
▶︎

MORNING PRAYER | Surrender Your Family to God with Faith and Walk this Day in His Peace and Prote...

I Made REALISTIC Norse Fantasy Armor
▶︎

I Made REALISTIC Norse Fantasy Armor

My Favorite Piece of Stock Footage
▶︎

My Favorite Piece of Stock Footage

#39 Finish Item Equip System  - How to Make a Ghost Hunting Game in Unreal
▶︎

#39 Finish Item Equip System - How to Make a Ghost Hunting Game in Unreal

Eine Anleitung für die Autobahn
▶︎

Eine Anleitung für die Autobahn

Why Sperm Whales Are The Most TERRIFYING Apex Predator On Earth
▶︎

Why Sperm Whales Are The Most TERRIFYING Apex Predator On Earth

#43 Ghost AI Sight & Hunt Detection - How to Make a Ghost Hunting Game in Unreal
▶︎

#43 Ghost AI Sight & Hunt Detection - How to Make a Ghost Hunting Game in Unreal

World's Longest Flight in Economy Class! AeroNewsGermany
▶︎

World's Longest Flight in Economy Class! AeroNewsGermany

AJ Styles On Retirement, Gunther, Hall Of Fame, John Cena, One More Match?
▶︎

AJ Styles On Retirement, Gunther, Hall Of Fame, John Cena, One More Match?

#40 Base Ghost AI with Behavior Tree & Blackboard - How to Make a Ghost Hunting Game in Unreal
▶︎

#40 Base Ghost AI with Behavior Tree & Blackboard - How to Make a Ghost Hunting Game in Unreal

Why do politicians lie to us so shamelessly? (Applied Rational Theory)
▶︎

Why do politicians lie to us so shamelessly? (Applied Rational Theory)

CHOSEN ONE! SOMEONE IN A SUIT JUST ASKED "WHO TRAINED THEM?" ...NOBODY DID. THAT'S THE MYSTERY
▶︎

CHOSEN ONE! SOMEONE IN A SUIT JUST ASKED "WHO TRAINED THEM?" ...NOBODY DID. THAT'S THE MYSTERY

Alexander Mercouris: NATO gerät bald in Panik und riskiert Krieg mit Russland
▶︎

Alexander Mercouris: NATO gerät bald in Panik und riskiert Krieg mit Russland

We Installed a Turbo Diesel Tractor Engine in a King Midget Microcar and It RIPS!
▶︎

We Installed a Turbo Diesel Tractor Engine in a King Midget Microcar and It RIPS!

Unreal Engine Grid Movement: Movement Points & Turn Reset (Blueprint Tutorial)
▶︎

Unreal Engine Grid Movement: Movement Points & Turn Reset (Blueprint Tutorial)

I Hosted the SWEATIEST Fortnite Tournament Ever
▶︎

I Hosted the SWEATIEST Fortnite Tournament Ever

Chosen One, This Is Why God Kept You Single All This Time
▶︎

Chosen One, This Is Why God Kept You Single All This Time