Complete Horror Game Framework for Unreal Engine 5
Zero Blueprint work required. Set 4 classes in your GameMode and press Play. Everything auto-creates: HUD, widgets, full player movement with WASD + mouse look, sprint, crouch, jump, interact, flashlight, lean, inventory — all input bindings are built-in.
Go to Edit → Plugins, search for "Horror Framework", enable it, and restart the editor.
Create or open your GameMode Blueprint. Set these 4 classes in the Details Panel:
That's it. You now have all of this working automatically:
WASD, mouse look, sprint (Shift), crouch (C), jump (Space). Gamepad support included.
HP with damage, healing, regen, invincibility frames, death, and revive.
Sanity drains in darkness. Fear spikes from scares. Visual effects intensify automatically.
Toggle with F key. Battery drains over time. Flickers when low. Auto-created SpotLight.
Line trace from camera. "[E] Open Door" prompts on HUD. Works with all built-in interactables.
12-slot system with stacking, weight, equip/unequip. Toggle with Tab.
HP / Sanity / Stamina / Battery bars, crosshair, interaction prompt, damage vignette.
Walk/run/crouch produce different noise levels. AI hears you through AwarenessComponent.
Create a Character Blueprint. Set HF_HorrorAIController as AI Controller Class. Drop it in the level. The AI will automatically detect the player via sight + hearing, chase when awareness is high enough, patrol between points, and search hiding spots.
Input works out of the box! The PlayerController auto-creates all InputActions, MappingContext, and key bindings on BeginPlay. No manual Input setup required.
Want to change keys? Open your PlayerController Blueprint → Details → Horror | Input | Keys:
These are auto-created in the constructor. You get them all instantly when you use HF_HorrorCharacter as your Default Pawn Class.
| # | Component | What It Does |
|---|---|---|
| 1 | CameraBoom (SpringArm) | Camera mount. First-person by default (TargetArmLength = 0). |
| 2 | FirstPersonCamera | Player camera, attached to boom. |
| 3 | HF_HealthComponent | HP, damage, healing, regen, i-frames, death, status effects, stagger. |
| 4 | HF_FearSanityComponent | Sanity drain in darkness, fear spikes from scares, visual effects. |
| 5 | HF_InteractionComponent | Line trace from camera, shows prompts on HUD when aiming at interactables. |
| 6 | HF_InventoryComponent MULTIPLAYER | Slot-based inventory with stacking, weight, equip/unequip. |
| 7 | HF_NoiseSystemComponent | Tracks player noise (walk/run/crouch). AI hears it. |
| 8 | HF_NoteReaderComponent | Collect and read notes/documents. Widget auto-shows. |
| 9 | HF_HorrorHUDComponent | Bridges character state (HP, sanity, stamina, battery) to HUD widget. |
| 10 | HF_LeanPeekComponent | Lean left/right to peek around corners without exposing your body. |
| 11 | HF_DeathManager | Handles death: respawn, permadeath, lives, or downed state. |
| 12 | HF_CameraManager | Head bob, sprint FOV boost, fear tremble, night vision. |
| 13 | HF_AccessibilityComponent | Scare intensity scaling, subtitles, motion sickness mode. |
| 14 | HF_FlashlightComponent | Toggle flashlight on/off. Battery drains. Flickers when low. |
| 15 | HF_BreathHoldComponent | Hold breath while hiding to reduce detection chance. |
| 16 | HF_WeaponSocketComponent | Attaches visible weapon meshes to character skeleton sockets. |
You don't need to add any of these manually. They're all created as default subobjects in the constructor. Just use HF_HorrorCharacter and they're there.
Already included on HF_HorrorCharacter with bIsPlayer = true. For custom characters or enemies, add HF_HealthComponent manually.
Two ways to deal damage to anything with a HealthComponent:
| Property | Default | What It Does |
|---|---|---|
| MaxHealth | 100 | Maximum HP. Horror games typically use 50–100. |
| bEnableRegeneration | false | ON: modern horror (RE7). OFF: classic survival horror (healing items only). |
| RegenRate | 1.0/s | HP per second when regenerating. 0.5 = punishing, 5.0 = forgiving. |
| RegenDelay | 5.0s | Seconds after last damage before regen starts. |
| bEnableIFrames | true | Invincibility after taking damage. Prevents stunlock. |
| IFramesDuration | 0.5s | 0 = enemies can stunlock. 0.5–1.0 = fair. 2.0+ = very forgiving. |
| Armor | 0 | Flat damage reduction. Applied before damage type multipliers. |
| bIsPlayer | false | Set true for player — applies difficulty DamageMultiplierToPlayer. |
| bIsImmortal | false | Cannot take any damage at all. Used by EnemySlasher. |
| bIsUnkillable | false | HP cannot drop below 1. Takes damage but never dies. |
| bEnableStagger | false | Accumulated damage triggers stagger at threshold. |
| StaggerThreshold | 50 | Damage needed to trigger stagger. Resets after triggering. |
| Function | Description |
|---|---|
| ApplyDamage(DamageInfo) | Full damage with type, direction, armor, crits, difficulty scaling. |
| ApplySimpleDamage(Amount, Causer) | Quick damage — just amount + who caused it. |
| Heal(Amount) | Restore HP. Clamped to MaxHealth. |
| HealToFull() | Full heal to MaxHealth. |
| Kill(Killer) | Instant death (blocked by bIsUnkillable/bIsImmortal). |
| Revive(HP) | Bring back from death. Sets bIsAlive = true. |
| SetInvincible(Duration) | Timed invincibility. |
| GetHealthPercent() | 0.0–1.0 for HP bars. |
| Event | When | Parameters |
|---|---|---|
| OnDamageReceived | Any damage taken | FHF_DamageInfo (amount, type, instigator) |
| OnHealed | Any healing | HealAmount, NewHealth |
| OnDeath | HP reaches 0 | DeadActor |
| OnHealthChanged | Any HP change | CurrentHP, MaxHP, Delta |
| OnStaggered | Stagger threshold reached | — |
HealthComponent manages 10 status effects: Bleeding, Poisoned, Burning, Frozen, Infected, Stunned, Blinded, Slowed, Hallucinating. Each can stack, deal tick damage, and auto-expire.
MULTIPLAYER CurrentHealth, MaxHealth, bIsAlive, bIsInvincible are replicated. Damage and healing only process on the server (authority check in ApplyDamage and Heal). Clients receive replicated values via OnRep.
Sanity = long-term mental state. Drains passively in darkness, recovers in safe zones.
Fear = short-term reaction. Spikes from scare events, decays over time. Both drive visual effects, hallucinations, and gameplay penalties.
| Level | Threshold | Effects |
|---|---|---|
| Calm | 0 | Normal gameplay |
| Uneasy | 15 | Subtle vignette begins |
| Anxious | 35 | Heartbeat audio starts |
| Scared | 55 | Camera trembles, breathing gets heavy |
| Terrified | 75 | Hallucination chance, chromatic aberration |
| Panic | 90 | Maximum distortion, heavy grain, loud heartbeat |
| Property | Default | What It Does |
|---|---|---|
| MaxSanity | 100 | Maximum sanity value. |
| PassiveSanityDrain | 0.5/s | Drain rate in darkness. 0.1 = slow (explore freely). 2.0 = flashlight CRITICAL. |
| SafeZoneRecoveryRate | 2.0/s | Recovery in safe rooms. High = powerful safe rooms. |
| bSanityDepletionKills | false | ON: zero sanity = death (Amnesia). OFF: zero = visual effects only (Eternal Darkness). |
| FearDecayRate | varies | How fast fear naturally decays. |
| ScareIntensityMultiplier | 1.0 | Scale all scare impacts (0 = no fear, 2 = double fear). Set by AccessibilityComponent. |
| DarknessDrainMultiplier | 1.0 | Extra multiplier for darkness drain. |
| Function | Description |
|---|---|
| DrainSanity(Amount) | Reduce sanity by amount. |
| RestoreSanity(Amount) | Restore sanity. |
| SetSanity(Value) | Set exact sanity value. |
| AddFear(Amount) | Spike fear. |
| SetFear(Value) | Set exact fear value. |
| CalmDown() | Instantly reset fear to 0. |
| GetSanityPercent() | 0.0–1.0 for sanity bar. |
| GetFearPercent() | 0.0–1.0 for fear indicator. |
| EnterDarkness() / LeaveDarkness() | Toggle darkness drain. |
| Event | When |
|---|---|
| OnSanityChanged | Any sanity change — use for sanity bar |
| OnFearLevelChanged | Fear level changed (Calm → Uneasy, etc.) — use for music layers |
| OnSanityDepleted | Sanity hit zero |
MULTIPLAYER CurrentSanity, CurrentFear, and CurrentFearLevel are all replicated.
HF_InteractionComponent fires a line trace from the camera every tick. If it hits an actor implementing IHF_InteractableInterface, it shows the interaction prompt on HUD.
Create a new Actor Blueprint.
Class Settings → Interfaces → Add → HF_InteractableInterface
Right-click Event Graph → Add Event from Interface: Interact, Get Interaction Prompt, Can Interact, Get Interaction Type.
Built-in interactables that already implement the interface: HF_DoorActor, HF_HidingSpot, HF_GeneratorActor, HF_CombinationLock, HF_LightSwitchActor, HF_WorkbenchActor.
| Property | Default | Description |
|---|---|---|
| InteractionRange | 250 | Trace distance in Unreal units. Lower = more immersive. |
| TraceChannel | Visibility | Collision channel for the trace. |
MULTIPLAYER Slot-based inventory with stacking, weight limit, equip/unequip. Slots array is replicated.
| Function | Description |
|---|---|
| AddItem(ItemData, Qty) | Returns number actually added. Inventory might be full or too heavy. |
| RemoveItem(ItemID, Qty) | Returns number actually removed. |
| UseItem(SlotIndex, Target) | Triggers OnItemUsed event. Consumes item if bConsumable. |
| HasItem(ItemID, Qty) | Check if player has at least Qty of item. |
| EquipSlot(Index) | Set active equipped item. |
| ClearInventory() | Remove all items. |
| GetCurrentWeight() | Total weight of all items. |
| IsFull() | No free slots remaining. |
| Property | Default | What It Does |
|---|---|---|
| MaxSlots | 12 | Lower (4–6) = RE-style inventory management. Higher (20+) = hoard everything. |
| bUseWeight | false | Enable weight limit. OFF = slot-based only. |
| MaxWeight | 50 | Maximum carry weight (only if weight enabled). |
| Field | Type | Description |
|---|---|---|
| ItemID | FName | Unique identifier (e.g. "Medkit", "Key_Basement") |
| DisplayName | FText | Shown in inventory UI |
| Description | FText | Item description text |
| Icon | UTexture2D | Inventory icon image |
| Weight | float | Weight per unit (if weight system enabled) |
| bStackable | bool | Can multiple units share one slot? |
| MaxStackSize | int32 | Max units per stack |
| bConsumable | bool | Consumed when UseItem is called? |
| bKeyItem | bool | Key items (doors, puzzles) |
| Event | When |
|---|---|
| OnItemAdded | Item added — use for "+1 Medkit" floating text |
| OnItemRemoved | Item removed |
| OnItemUsed | Item consumed/used |
| OnInventoryChanged | Any change — use to refresh inventory UI |
HF_WeaponComponent handles melee attacks, firearms with ammo/reload, and throwables. Add it to any actor — weapon pickups, NPCs, or the player. It handles cooldowns, stamina cost, noise generation, and sound.
| Type | Behavior |
|---|---|
| Melee | No ammo. Attack within range, consumes stamina, respects cooldown. |
| Firearm | Uses ammo from clip. Must reload when empty. Plays empty-click at 0. |
| Throwable | Single-use throw. Implement throw logic in your Blueprint on OnAttack. |
| Property | Default | Description |
|---|---|---|
| Damage | 25 | Damage dealt per attack |
| AttackRange | 150 | Melee range (units) |
| AttackCooldown | 0.8 | Seconds between attacks |
| StaminaCost | 10 | Stamina consumed per attack |
| NoiseLoudness | 0.7 | Noise generated — AI hears this via NoiseSystem |
| MaxAmmo | 12 | Total reserve ammo (firearm) |
| ClipSize | 6 | Max ammo per clip (firearm) |
| ReloadTime | 2.0 | Seconds to reload (firearm) |
| Property | Description |
|---|---|
| WeaponMesh | Static Mesh to display on the character's socket (e.g. SM_Axe, SM_Pistol) |
| AttachSocketName | Per-weapon socket override (empty = use WeaponSocketComponent default) |
| SocketOffset | Position/rotation/scale offset on the socket |
Applying damage to a target is YOUR responsibility. Bind to OnAttack and do a line trace, overlap, or any hit detection you want. Then call HealthComp→ApplySimpleDamage() on whatever you hit. The weapon handles the "can I attack?" logic — you handle the "what did I hit?" logic.
| Event | When | Params |
|---|---|---|
| OnAttack | Attack performed | float Damage |
| OnReloadComplete | Reload finished | — |
| OnAmmoEmpty | Tried to fire at 0 ammo | — |
MULTIPLAYER CurrentAmmo is replicated. Attack() and Reload() block on simulated proxies.
HF_WeaponSocketComponent attaches a visible weapon mesh to your character's skeleton socket. Already on HF_HorrorCharacter.
weapon_r to your skeleton (right-click hand_r → Add Socket)WeaponMesh to your Static MeshWeaponSocketComp→EquipWeapon(WeaponComp). Mesh appears on socket. UnequipWeapon() removes it.Swapping: EquipWeapon() auto-unequips the previous weapon. Events: OnWeaponEquipped, OnWeaponUnequipped.
Already on HF_HorrorCharacter. Auto-creates a SpotLight if none assigned. Toggle with F key (auto-bound).
| Property | Default | What It Does |
|---|---|---|
| MaxBattery | 120s | 2 minutes of light. Lower (30–60s) = scramble for batteries. |
| DrainRate | 1.0/s | Battery per second when on. Higher = faster drain, more panic. |
| bUseBatteries | true | OFF: infinite light, no resource anxiety. |
| FlickerThreshold | 0.15 | Battery % when flickering starts. |
| Function | Description |
|---|---|
| Toggle() | Switch on/off |
| TurnOn() / TurnOff() | Explicit control |
| RechargeBattery(Amount) | Add battery from pickup |
| ReplaceBattery() | Full recharge to max |
Events: OnToggled, OnBatteryLow, OnBatteryDepleted. MULTIPLAYER bIsOn and CurrentBattery are replicated.
No animations or meshes included. This is a C++ runtime plugin — you bring your own character mesh, animations, and sounds. The plugin provides all AI logic, awareness, pathfinding, and behaviors.
Content Browser → Blueprint Class → Character. Add your Skeletal Mesh.
In Details Panel: AI Controller Class = HF_HorrorAIController, Auto Possess AI = Placed in World or Spawned.
When the enemy spawns, HF_HorrorAIController possesses it. The controller auto-creates an AwarenessComponent, auto-targets the player, applies difficulty scaling, and starts listening to events. Zero Blueprint logic needed.
Content Browser → AI → Behavior Tree. Content Browser → AI → Blackboard. Assign in AI Controller.
Place Nav Mesh Bounds Volume in level → Build → Build Paths → Press P to visualize (green = walkable).
Without a Nav Mesh, the AI cannot move. All enemies use Unreal's navigation for pathfinding.
HF_AwarenessComponent handles sight + hearing. States progress: Unaware → Suspicious → Searching → Alerted → Chasing → Attacking → LostTarget.
| Property | Default | Description |
|---|---|---|
| SightRange | 1500 | How far the AI can see |
| SightAngle | 60° | Field of view. 360 = omnidirectional (Slender-style) |
| HearingRange | 2000 | How far the AI can hear noise |
| DecayRate | 5/s | Awareness drops if not detecting |
| Node | Type | What It Does |
|---|---|---|
| HF Patrol | Task | Walk between PatrolPoints array |
| HF Chase Player | Task | Chase with rubber-banding speed |
| HF Search Hiding Spots | Task | Check nearby HidingSpots for hidden player |
| HF Stalk | Task | Maintain distance, hide when player looks |
| HF Teleport Behind | Task | Teleport behind player when not looking |
| HF Check Awareness | Decorator | Branch based on AwarenessState |
| HF Update Perception | Service | Keep perception data fresh |
| Class | Description | Key Differences |
|---|---|---|
| HF_EnemyCharacterBase | Base class. HP, attack sphere, death, AI-ready. | Foundation for all enemies. 5 montage slots. |
| HF_EnemyMelee | Killable. Zombie/mutant/infected. | HP=150, HeavyAttack 20% chance (2x damage), ChaseSpeed=400. |
| HF_EnemySlasher | Unkillable. Outlast/Alien:Isolation style. | bIsImmortal=true, Damage=999 (instant kill), FearOnSight=10, FearOnAttack=40. |
| Event | When |
|---|---|
| OnChaseStarted / OnChaseStopped | Chase mode toggle — play chase music |
| OnTargetSpotted / OnTargetLost | First sight / lost player — play roar/confused |
| OnNoiseHeard | Heard a noise — look toward source |
| OnAwarenessStateChanged | Any state transition |
| OnTeleported | AI teleported — play VFX |
Place in level (closets, lockers, under beds). Player interacts → enters hiding. AI can search with configurable find chance.
| Property | Description |
|---|---|
| SpotType | Closet, Locker, UnderBed, Curtain, Barrel, Dumpster |
| HidingCameraOffset / Rotation | Camera position and angle when hiding |
| bCanPeek | Player can peek while hiding |
| NoiseReductionMultiplier | Noise output while hiding (0.1 = 10%) |
| CustomFindChance | AI probability of finding player (0.15 = 15%) |
Already on HorrorCharacter. Hold breath to become nearly silent. Drains over time. Releasing makes a gasp noise.
| Property | Description |
|---|---|
| MaxBreathHoldTime | Seconds the player can hold breath |
| WarningThreshold | % remaining when warning event fires |
Place in level as a safe area.
| Property | Default | Description |
|---|---|---|
| bBlocksAI | true | AI enemies cannot enter |
| bRestoresSanity | true | Sanity recovers inside |
| bAllowsSaving | true | Player can save here |
| Actor | Description |
|---|---|
| HF_ScareTrigger | Box trigger — player enters → sound + camera shake + fear spike. Configurable: FearImpact, SanityImpact, bOneShot. |
| HF_MannequinScare | Moves toward player when not looking (SCP-173 style). |
| HF_ApparitionActor | Ghost appears, fades in/out, disappears when looked at directly. |
| HF_ObjectMoveScare | Object slides/moves when player isn't looking. |
| HF_FlashbackTrigger | Screen fades, shows flashback scene, fades back. |
| HF_RandomScareScheduler | Randomly triggers scare events at configurable intervals. |
| HF_HallucinationComponent | Spawns hallucination actors when sanity is low. |
| HF_FlickerLightComponent | Random light flicker. Attach to any light component. |
| HF_FogManager | Dynamic fog transitions based on threat level. |
| HF_ScriptedEventSequencer | Timed sequence of events (sounds, spawns, fear spikes). |
| HF_PossessionComponent | Player gets "possessed" when sanity drops below threshold. |
States: Closed → Open → Locked → Barricaded → Broken. Auto-animates rotation.
| Function | Description |
|---|---|
| OpenDoor() / CloseDoor() | Open/close with sound |
| LockDoor() / UnlockDoor() | Lock/unlock |
| TryUnlockWithKey(KeyID) | Check inventory for correct key |
| BreakDoor() | Permanently open (broken state) |
| DamageDoor(Amount) | Reduce door HP, breaks at 0 |
MULTIPLAYER DoorState is replicated.
| Actor | Description |
|---|---|
| HF_BarricadeActor | Boards to block enemies. Each board adds HP. |
| HF_WindowActor | Breakable windows with health. Barricadable. |
| HF_LightSwitchActor | Toggle connected lights. MULTIPLAYER |
| HF_GeneratorActor | Fuel-powered. Powers linked systems. |
| HF_KeyLockComponent | Requires specific key from inventory. |
| HF_DarknessZone | Triggers sanity drain when player enters. |
| HF_DayNightCycle | Directional light rotation. Day/night with colors. |
| HF_TrapActor | Damage + stun on trigger. Configurable for player/AI. |
HF_CameraManager auto-finds the CameraComponent and applies effects.
| Property | Default | Description |
|---|---|---|
| bEnableHeadBob | true | Sinusoidal bob when walking/running |
| HeadBobIntensity | 0.5 | Bob strength. 1.5+ = nausea risk. |
| BaseFOV | 90 | Default field of view |
| SprintFOVBoost | 10 | Extra FOV when sprinting |
| bEnableNightVision | false | Night vision toggle with battery |
Additional: HF_DollyZoomComponent (Hitchcock vertigo), HF_FixedCameraTrigger (classic RE angles), HF_ForcedLookComponent (force camera at target), HF_PostProcessFearDriver (auto vignette/grain from fear), HF_LeanPeekComponent (lean around corners).
HF_DeathManager auto-connects to HealthComponent::OnDeath.
| Mode | Behavior |
|---|---|
| Respawn | Teleport to last checkpoint after delay, full heal |
| Permadeath | Game over — death screen shows |
| Lives | Limited lives, respawn until 0, then game over |
| DownedState | Co-op: go down, teammates revive within time limit |
HF_CheckpointActor — place in level, player walks through → respawn point updated.
HF_ConsequenceManager — escalating penalties per death (enemies faster, fewer resources).
HF_InjuryComponent — persistent injuries: Leg (slow), Arm (slow interact), Bleeding (HP drain), Infection (worsens).
HF_SaveManager is a Blueprint Function Library. Call from anywhere.
| Data | Source |
|---|---|
| Player position + rotation | Character transform |
| Health, MaxHealth, bIsAlive | HealthComponent |
| Active status effects (all) | HealthComponent |
| Sanity + Fear level | FearSanityComponent |
| Full inventory (items + quantities + icons + everything) | InventoryComponent |
| Equipped item | InventoryComponent |
| Flashlight battery | FlashlightComponent |
| Lives remaining + last checkpoint | DeathManager |
| Objective progress (active + completed) | ObjectiveTracker |
| Story flags (dialogue branching) | DialogueComponent |
| Game phase + difficulty | GameMode |
| Threat level, death count, play time | GameState |
| Solved puzzles, collected keys, triggered scares | GameState |
Custom data: use SaveGame→SetModuleValue(ModuleName, Key, Value) and GetModuleValue() for your own systems.
HF_NoiseSystemComponent on HorrorCharacter. AI hears noise through AwarenessComponent.
| Property | Default | Description |
|---|---|---|
| WalkNoise | 0.3 | Noise when walking |
| RunNoise | 0.7 | Noise when sprinting — running is dangerous! |
| CrouchNoise | 0.1 | Noise when crouching — nearly silent |
| NoisePropagationRadius | 1500 | How far noise travels (units) |
WeaponComponent automatically calls MakeNoise(NoiseLoudness) on attack. No extra setup needed.
| Component | Description |
|---|---|
| HF_DialogueComponent | Node-based branching dialogue with story flags. Widget auto-shows. SetStoryFlag("HasKey", true) / GetStoryFlag("MetNPC"). |
| HF_NoteReaderComponent | Collect and read notes/documents. Widget auto-shows. |
| HF_MonologueComponent | Sequential voice lines with subtitles. Play(), PlaySingle(), Stop(). |
| HF_RadioContactComponent | Incoming radio messages with static noise and speaker name. |
| HF_WalkieTalkieComponent | Range-based walkie-talkie with signal quality (distance-based). |
| Component | Description |
|---|---|
| HF_CraftingComponent | Recipe-based. CanCraft(ID), Craft(ID), DiscoverRecipe(ID). Auto-consumes from inventory. |
| HF_ConsumableComponent | Use items: Health, Sanity, Stamina, Battery, Antidote, Custom. Events: OnUsed. |
| HF_DurabilityComponent | Tools/weapons break after use. Repair at workbench. BreakSound on zero. |
| HF_FuelSystemComponent | Generic fuel/resource for generators. AddFuel(), StartConsuming(), StopConsuming(). |
| HF_WorkbenchActor | Interactable crafting station. OnWorkbenchUsed event. |
| Component | Description |
|---|---|
| HF_CompanionComponent | AI companion: Following, Waiting, Hiding, Downed, Dead. Morale + Trust system. CommandFollow(), CommandWait(), CommandHide(). |
| HF_CompanionAIController | AI logic for companion behavior. Detects threats, assists player. |
| HF_NPCScheduleComponent | Time-based NPC routines. Schedule entries: start/end time, location, idle anim. |
Ghost-hunting equipment. Each is a separate component — add only what you need.
| Component | Description |
|---|---|
| HF_EMFReaderComponent | Levels 0–5 based on proximity. BeepSound on detection. Events: OnEMFLevelChanged, OnHighEMFDetected. |
| HF_ThermometerComponent | Temperature drops near ghost. FreezingThreshold. Event: OnFreezingDetected. |
| HF_SpiritBoxComponent | Radio-frequency communication. ResponseChance per scan. Event: OnGhostResponse. |
| HF_PhotoCaptureComponent | SceneCaptureComponent2D photo evidence. MaxPhotos, ShutterSound. Event: OnPhotoCaptured. |
| HF_EvidenceComponent | Tracks collected evidence. CollectEvidence(), HasEvidence(), GetCompletionPercent(). |
| HF_ExamineComponent | Pick up and 3D-rotate objects to inspect. ExamineDistance, RotationSpeed. |
HF_CoopManager — player proximity, isolation detection, shared sanity, revive system.
| Property | Description |
|---|---|
| CoopMode | SinglePlayer, CoopSymmetric, CoopAsymmetric (1 ghost), Versus |
| MaxPlayers | Maximum players (default 4) |
| bSharedSanity | All players share lowest sanity value |
| bReviveSystem | Enable downed/revive mechanic |
| IsolationDistance | Distance to be "isolated" — AI prioritizes lone players |
HF_SpectatorComponent — dead players spectate living teammates. NextTarget() / PrevTarget().
Replicated systems (22 properties): Health, FearSanity, Inventory, DoorState, Flashlight, GameState, CoopManager, LightSwitch, WeaponAmmo.
Everything is automatic. Set HF_HorrorHUD as HUD Class. It auto-creates 10 widgets on BeginPlay.
| Widget | Visibility | When Shown |
|---|---|---|
| HorrorHUDWidget | Always | HP, sanity, stamina, battery bars, crosshair, prompt |
| InventoryWidget | Hidden | ShowInventory() / ToggleInventory() |
| PauseMenuWidget | Hidden | ShowPauseMenu() |
| DeathScreenWidget | Hidden | Auto on player death |
| DialogueWidget | Hidden | Auto when dialogue starts |
| NoteReaderWidget | Hidden | Auto when reading note |
| SubtitleWidget | Hidden | During monologue/dialogue |
| CombinationLockWidget | Hidden | ShowCombinationLock() |
| EvidenceBoardWidget | Hidden | ShowEvidenceBoard() |
| LoadingScreenWidget | Hidden | ShowLoadingScreen() |
Create Widget Blueprint → Parent Class = the widget you want to replace. Customize colors/sizes in Details. Assign in HUD Blueprint under Horror|UI|Widgets. If a slot is None, the built-in C++ default is used automatically.
| Component | Description |
|---|---|
| HF_AdaptiveMusicManager | Layered music responding to threat/fear level. SetFearLevel(), PlayStinger(). |
| HF_HeartbeatComponent | Heartbeat speeds up with fear or low HP. SetIntensity(), ForceSpike(). |
| HF_BreathingAudioComponent | 4 states: Normal, Heavy, Panicked, Holding. Auto-transitions from stamina/fear. |
| HF_AmbientSoundManager | Named audio layers. EnableLayer("Wind"), SetLayerVolume("Crickets", 0.3). |
| HF_AudioOcclusionHelper | Auto line-trace occlusion for 3D sounds. Volume reduces through walls. |
| HF_StingerSystem | One-shot scare sounds with cooldown. PlayStinger("JumpScare01"), PlayRandom(). |
| HF_ReverbZoneComponent | Per-zone reverb effects (caves echo, bathrooms tile). |
5 presets. Change at runtime: GameMode→SetDifficulty(NewDifficulty). All systems update immediately.
| Setting | Story | Easy | Normal | Hard | Nightmare |
|---|---|---|---|---|---|
| Damage to Player | 0.25x | 0.5x | 1.0x | 1.5x | 2.5x |
| Enemy Speed | 0.7x | 0.85x | 1.0x | 1.15x | 1.3x |
| Enemy Detection | 0.5x | 0.75x | 1.0x | 1.3x | 1.75x |
| Sanity Drain | 0.3x | 0.6x | 1.0x | 1.5x | 2.0x |
| Resources | 2.0x | 1.5x | 1.0x | 0.7x | 0.4x |
| Permadeath | No | No | No | No | Yes |
The ActiveModules bitmask in PluginSettings controls which systems run. Disabled modules auto-deactivate — zero CPU cost.
| Module | What Gets Disabled When OFF |
|---|---|
| Core | GameMode, GameState, EventHub, SaveManager — never turn off |
| HealthDamage | HealthComponent, InjuryComponent |
| FearSanity | FearSanityComponent, PostProcessFearDriver |
| AIEnemy | HorrorAIController, all BT tasks |
| AwarenessDetection | AwarenessComponent (sight, hearing) |
| EnvironmentAtmosphere | DarknessZone, FlickerLight, Fog, DayNight |
| InteractionInventory | Interaction, Inventory, Crafting, Grabbable, Examine |
| HidingStealth | HidingSpot, BreathHold, Noise, LeanPeek |
| PuzzleProgression | PuzzleBase, CombinationLock, ObjectiveTracker |
| JumpScareEvents | ScareTrigger, MannequinScare, Apparition, ObjectMove |
| CameraPerspective | CameraManager, ForcedLook, DollyZoom |
| NarrativeStory | Dialogue, NoteReader, Monologue |
| Multiplayer | CoopManager, Spectator |
| UIHUD | HorrorHUDComponent, all 10 widgets |
| Audio | AdaptiveMusic, Heartbeat, Breathing, Reverb |
| DeathConsequence | DeathManager, ConsequenceManager |
| CraftingResources | Crafting, Consumable, Durability, Fuel |
| PhysicsDestruction | Destructible, Throwable, Rope |
| TimeWorldState | DayNight, WorldPhase, Timer, Trail |
| ProceduralReplayability | RandomPlacement, DifficultyMutators, MultipleEndings |
| PhotoEvidence | PhotoCapture, EMF, SpiritBox, Thermometer |
| CompanionNPC | Companion, CompanionAI, WalkieTalkie |
| Accessibility | AccessibilityComponent |
Begin with only Core + HealthDamage + FearSanity + UIHUD enabled. Add modules as you build features. This way you see only what you need and keep performance tight.
Your master control panel. One file controls everything.
HF_PluginSettingsHorrorSettingsControls: ActiveModules bitmask, player health/regen, fear/sanity settings, AI defaults, flashlight, inventory, hiding, save, audio, camera, accessibility, and difficulty presets. Without it, all systems use hard-coded defaults.
UHF_EventHub is a GameInstance Subsystem. Central event bus — all systems broadcast through it.
Use EventHub instead of direct component references. This decouples your systems — e.g., your audio manager listens to OnScareTriggered without knowing about ScareTrigger directly.
HF_CheatManager — type in the UE console (press ~):
| Command | Description |
|---|---|
| HF_God | Toggle invincibility |
| HF_HealFull | Full HP |
| HF_Kill | Instant death |
| HF_MaxSanity / HF_ZeroSanity | Set sanity |
| HF_MaxFear / HF_ZeroFear | Set fear |
| HF_InfiniteBattery | Toggle infinite flashlight |
| HF_SetThreat [0–100] | Set threat level |
| HF_SetPhase [0–5] | Set game phase |
| HF_AddItem [ID] [Qty] | Add item to inventory |
| HF_ClearInventory | Remove all items |
| HF_TeleportToCheckpoint | Teleport to last checkpoint |
| HF_NoClip | Toggle fly mode |
Make sure your GameMode has HF_HorrorHUD as HUD Class.
Make sure you're using HF_HorrorPlayerController — it auto-creates Enhanced Input.
You need a Nav Mesh Bounds Volume in your level. Build → Build Paths. Press P to visualize.
Call GameMode→SetDifficulty() — it broadcasts through EventHub.
Module checks happen in BeginPlay. Restart PIE after changing settings.
FlashlightComponent is auto-created on HorrorCharacter. Make sure you're using HF_HorrorCharacter as Default Pawn Class.