By the end, you’ll be able to:
- Register actors for respawn
- Trigger respawn callbacks
- Restore actors to an active state
- Use the system from both Blueprints and C++
1. Subsystem Overview
The Respawn Manager is implemented as a World Subsystem.This means:
- It is automatically created when the world loads
- It persists for the entire lifetime of the world
- Any actor can access it easily through Blueprint or C++
2. Accessing the Respawn Manager
Blueprint
You can access the manager using:C++
Access it in BeginPlay, PostInitializeComponents, or Actor-tick functions.
3. Marking an Actor as Respawnable
To be used with the Respawn Manager, an actor should:- Have a way to become inactive
- Register itself for respawn
- Implement a respawn callback
Option A — Implement the Respawn Interface (Recommended)
Create (or use the provided) Blueprint/C++ interface:Interface: BPI_Respawnable
Methods:
- OnRespawnRequested()
Called by the manager when it’s time to respawn. - GetRespawnDelay() (optional)
Allows different actors to specify their own cooldown.
Option B — Direct Function Call
If you don’t want an interface, you can expose a normal function such as:4. Registering a Respawn Request
When an actor is harvested, destroyed, looted, or otherwise becomes inactive, call:Blueprint
C++
5. Respawn Callback
When the delay expires, the subsystem triggers the callback.Blueprint (Interface)
Implement:- Reset collision / visibility
- Reset internal variables (
bHasBeenHarvested=false, etc.) - Reset loot (
LootComponent → Reset Loot) - Restore meshes or materials
- Enable interaction again
C++ (Interface Implementation)
6. First Example — Simple Resource Node (Blueprint)
7. First Example — Simple Resource Node (C++)
8. What Counts as “Inactive”?
A respawnable actor typically becomes inactive by:- Being harvested
- Running out of loot
- Being destroyed or visually disabled
- Being consumed (e.g., traps, destructibles, buildings collapsing)
- Being hidden or placed into “cooldown” state
The Respawn Manager doesn’t enforce behavior—it just triggers respawn events.
9. Good Defaults to Use
| Setting | Recommended |
|---|---|
| Respawn Time | 120–600 seconds (2–10 minutes) |
| Use Interface | Yes |
| Register on server | Yes (server authoritative) |
| Visual restoration | In OnRespawnRequested |
| Collision | Disabled when inactive, enabled on respawn |
| Loot reset | Call ResetLoot() for LootComponents |
10. Additional Tips
✔️ Centralize All Respawn Logic
Use Respawn Manager for every respawnable object in your project.Don’t mix per-actor timers and subsystem timers — consistency matters.