Skip to content
Pablo Rodriguez

Death Respawn System

Import death animation from Mixamo to handle character defeat states:

  • Animation Source: Mixamo “Dying” animation for dramatic effect
  • Import Settings: Standard X Bot skeleton import
  • Animation Properties: Disable loop animation for one-time play
  • Montage Creation: Create animation montage for gameplay integration
  • Dead Boolean: Tracks character death state
  • Health Check: Death triggers when health reaches zero or below
// Master Character Death Implementation
OnHealthReachesZero() {
set_dead_to_true;
F_Dead(); // Override function for child classes
// Animation Integration
mesh.GetAnimInstance().Interface_Dead(true);
}
// Child classes override F_Dead for specific behavior
F_Dead() {
// Base implementation - override in child classes
}

Integrate death state into animation system:

  • Interface_Dead Function: Boolean input for death state
  • Death Variable: Store death state in animation blueprint
  • Blend Poses by Bool: Choose between normal animation and death animation
  • Reset Child on Activation: Ensure death animation resets when triggered
  • Loop Prevention: Death animation plays once and holds final frame

Override death function for unique player experience:

  • Input Disabled Variable: Prevent player control during death
  • Camera Control: Disable camera movement during death state
  • Movement Prevention: Stop all character movement and abilities

Create comprehensive death screen interface:

// Player Death UI Structure
W_Dead {
- SizeBox Root (1920x1080 coverage)
- Canvas Panel Body
- Background Image (black, 70% alpha)
- Background Blur (strength 10)
- Death Text ('YOU DIED' in dark red)
- Respawn Button
- New Character Button
- Restart Level Button
}

Polish death screen with dramatic entrance:

  • Duration: 2.5 seconds total
  • Delay: 1 second before fade begins
  • Opacity: 0 to 1 transition
  • Blur Effect: Synchronized with opacity for dramatic impact
  • Duration: 1 second
  • Trigger: When respawn selected
  • Visibility: Hidden after fade completes

Provide three distinct respawn approaches:

  • Health Restoration: Reset health to maximum
  • State Reset: Clear death state, enable input
  • Location: Character remains at death location
  • Use Case: Forgiving gameplay approach
// New Character Respawn
PlayerController_Respawn(NewCharacter = true) {
old_pawn = GetControlledPawn();
current_class = old_pawn.GetClass();
spawn_location = F_Get_Spawn_Location();
UnPossess();
new_pawn = SpawnActor(current_class, spawn_location);
Possess(new_pawn);
DestroyActor(old_pawn);
}
  • Console Command: “Restart Level”
  • Complete Reset: Reload entire level from beginning
  • Use Case: Hardcore or puzzle game modes

Create respawn checkpoint system:

  • Sphere Mesh: Visual indicator for designers (hidden in game)
  • Sphere Collision: Activation trigger (600 unit radius)
  • Static Mesh: Decorative respawn monument or waypoint
  • Activated Variable: Tracks whether respawn point discovered
// Smart Respawn Location Selection
F_Get_Spawn_Location() {
respawn_actors = GetAllActorsOfClass(Actor_Respawn);
activated_respawns = FilterByActivatedStatus(respawn_actors);
if (activated_respawns.Num() > 0) {
closest_respawn = FindClosestToPlayer(activated_respawns);
return closest_respawn.GetActorTransform();
} else {
// Fallback to PlayerStart if no respawns activated
player_starts = GetAllActorsOfClass(PlayerStart);
return GetRandomActorTransform(player_starts);
}
}
  • Overlap Detection: Player enters respawn sphere to activate
  • One-Time Activation: Each respawn activates once and remains active
  • Distance-Based: Respawn at closest activated checkpoint
  • Visual Feedback: Optional effects when respawn point activates

Create polished, game-ready death interface:

  • Full-Screen Coverage: 1920x1080 sizing with proper scaling
  • Background Treatment: Dark overlay with blur effect
  • Typography: Large, impactful “YOU DIED” text
  • Button Layout: Clear, accessible respawn options
  • Respawn: Revive character at nearest checkpoint
  • New Character: Destroy and recreate character
  • Restart: Reload level from beginning
  • Dramatic Entrance: Delayed fade-in with blur effect
  • Smooth Exit: Quick fade-out when option selected
  • Audio Integration: Sound effects for death and respawn events

The death and respawn system provides multiple gameplay approaches while maintaining immersive presentation and clear player feedback about failure states and recovery options.