Game Mechanics

Counter Attack System

A Blueprint-based Unreal Engine combat component with multiplayer support, multi-direction counter detection, enemy AI, and DataTable-driven animation setup.

Counter Attack SystemGame Mechanics

Resource overview

When a combat scene requires precise reaction timing against incoming AI attacks, managing the logic for directional detection, rotation synchronization, and animation playback can quickly become a tangled web. The Counter Attack System approaches this by collapsing the entire workflow into a single Blueprint component. Instead of building custom state machines and detection logic from scratch, developers drop the component into a project and drive the behavior through a DataTable, letting the system handle the runtime execution while the creator focuses on animation assets and timing.

Single-Component Architecture and DataTable Setup

The core of the system is the Counter Attack System Component. Because it is a single component, it can be integrated into existing projects without requiring a massive refactor of character blueprints. The system operates entirely on Blueprints, meaning developers do not need to touch C++ to access the functionality. This makes the setup process accessible for teams that rely on visual scripting.

Configuration is centralized in one DataTable. Developers populate this DataTable with their chosen counter animations, assigning them based on the direction of the incoming attack—front, back, left, or right. The system supports adding as many counter animations as desired for each direction. This allows for varied visual responses instead of repeating a single animation every time a counter triggers. Beyond directional differentiation, the counter animation can also vary based on the specific type of attack, which is determined through the Counter time notification. This two-layered approach to animation selection—direction and attack type—gives creators granular control over how combat looks and feels.

Multi-Direction Detection and Player Synchronization

Counter Direction Detection evaluates incoming attacks across four distinct quadrants: front, back, left, and right. When a counter is triggered, the system does not simply play an animation in place. It syncs player rotation and distance to the victim. This synchronization ensures that the counter animation aligns correctly with the enemy's position, preventing visual disconnects where a player appears to counter in the wrong direction or at the wrong distance.

The system includes a Cinematic Camera feature, which activates during counter sequences. Combined with Hit Sound and Camera Shake effects, the camera and audio feedback create a more impactful moment when a counter successfully lands. These elements are built into the system rather than requiring separate implementation.

Enemy AI Behavior and Counter Notifications

The asset provides a complete AI framework based on an AI Behavior Tree. The enemy AI is capable of chasing the player and executing attacks. During an attack, the AI auto-rotates to face the player, maintaining proper alignment for combat interactions. An AI Spawn Manager is included to handle the spawning of enemies within the scene.

Crucially, every AI attack has a notification widget timing for the player counter. This manifests as a Counter Timing Notif Widget, which presents the player with a timing window to execute a counter. The interaction between the AI attack and the notification widget is what makes the counter system playable. The AI attacks, the widget signals the opportunity, and the player acts within the timing window.

Ragdoll and Multiplayer Replication

When an enemy is defeated through a counter, a Dead Ragdoll System takes over. The enemy transitions into a ragdoll state, providing a physical reaction to the final blow. The system is 100% Blueprint and supports multiplayer. Replication tags indicate that the counter logic, AI behavior, and synchronized animations are built to function in networked environments, allowing multiple players to engage with the same combat systems.

Included Animation Assets and Expansion

The animations shown in the trailer are included with the system. This means developers can test the component immediately without sourcing custom animation sets first. For projects that require a larger library of combat animations, additional counter and finisher animations are available separately.

The goal of the product is to enable the creation of counter attacks against AI quickly and simply. Developers set up their counter animations in the DataTable based on the chosen direction, and the system manages the detection, synchronization, and playback. The inclusion of AI behaviors, spawn management, and multiplayer support means the package covers both sides of the combat equation.

Related Resources Worth Checking

Free Download

Download this resource

Loading your download options...

Resources are manually reviewed before listing to improve quality and reduce obvious risks.

Resource archiveContent.7z

Related resources