# Combat Manager

<div align="left"><figure><img src="/files/SPfsFMUrLuoobqwxAWkq" alt=""><figcaption></figcaption></figure></div>

The **Combat Manager (AC\_CombatManager)** component is the core combat handler for the player, responsible for managing all aspects of player combat, including unarmed attacks, weapon attacks, guarding, poise system, combo chains, and damage application. It is the counterpart to [**AC\_AI\_CombatManager**](/components-managers/ai-only-components/ai-combat-manager.md), but tailored for a more interactive, **player-driven combat system.**

It is added to the **Character** class by default **(B\_Soulslike\_Character).**

### **How It Works**

1. **Initialization & Event Bindings**
   * When initialized , it binds to key events such as **OnAnyDamage** and **OnStatUpdated**.
   * It listens for stat changes to respond relatively&#x20;
     * For example, death event when Health <= 0, poise break when Poise <= 0, etc.
2. **Damage Handling**
   * Handles incoming damage from various sources (weapons, projectiles, unarmed).
   * Checks player invincibility and adjusts HP accordingly.
   * If the damage reduces HP to 0, it triggers the **HandleDeath()** function.
3. **Unarmed Combat & Hit Tracing**
   * Supports **tracing-based melee attacks** for unarmed combat using **hand sockets**.
   * Tracks traced actors in **FistTracedActors** and processes hit reactions accordingly.
4. **Guarding & Perfect Guard System**
   * Implements a **guard system** with tracking for active guard state, stamina drain, and **perfect guard mechanics**.
   * **Perfect Guard** window is based on **PerfectGuardDuration** and **FacingDirectionAcceptance**.
   * If a perfect guard is executed, an effect is played (**PerfectGuardEffect**) and the incoming damage is completely ignored.
5. **Combo System**
   * Tracks combo sections through **ComboSection** and executes **Montages** dynamically.
6. **Poise System**
   * Tracks the player's **Poise** stat.
   * If poise is broken, plays a **Poise Break Montage** which is used to punish the player.
7. **Hit Reactions**
   * Upon taking damage, after relative stats have been adjusted, tries to play a directional hit reaction **only if the player's Stance stat <= 0** (stagger resistance)**.**
8. **Death & Respawning Logic**
   * Clears lock-on and clears the guard state.
   * Determines the **direction of death** and plays appropriate **ragdoll/death montage**.
   * Drops currency at the death location.
   * Initiates **respawning logic**.

### Example Usage

<figure><img src="/files/TM9EKCQWlPqfYgDGYNFf" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://soulslike-framework.isik.vip/components-managers/player-specific-components/combat-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
