Combat Component

This page aims to explain the technical details of the Combat System Component. Here, you will find tables showing the available properties and functions for this component.


Overview

The Combat System Component contains six properties, nine functions and two event dispatchers. This section of the page contains detailed information about each of these elements, presented in tables for easier understanding.

6 Properties

9 Functions

2 Event Dispatcher

Properties

The Combat System Component comes with a selection of properties that are used throughout the system. Below, you will find a table containing all the properties and some general information.

Name
Type
Description

Attacks

BP_AttackConfig (Array)

It holds all the attacks that have been extracted from the enemy configuration.

Cooldown Register

<BT_AttackConfig, float> (Map)

A register of all attacks, showing their current cooldown timestamp.

Active Attack

BP_AttackConfig

The currently active attack. This is set when an attack is performed.

Current Anim Instance

AnimInstance

This is the animation instance on which the active attack is played.

Config

BP_EnemyConfig

The enemy configuration asset requested from owner.

State

Boolean

The current state of the combat system (Active / Inactive).

Functions

The Combat System Component comes with a range of public and private functions that can be used to initiate and manage attacks. Below, you will find a table containing details of all the systems functions and some general information.

Name
Access
Description

Get Config

private

Tries to retrieve the enemy configuration from the owning actor via the agent provider interface.

Prepare Attacks

private

Sorts attacks into map with default timestamp.

Mark Attack Used

private

Marks an attack as used. Provides a new timestamp within map.

Play Attack

private

Plays an animation montage on the owners anim instance, if found.

Toggle Colliders

private

Activates / Deactivates damage hitboxes based on toggle state set trough anim notify state.

Select Attack

private

Algorithm to select a new attack based on weight and cooldown.

Get Combat Component

public (interface)

Allows to return direct reference to combat system (basically returns self).

Perform Attack

public (interface)

Performs (Select, Play, Dispatch) new attack within combat system.

Toggle Combat System

public (interface)

Toggles the combat system. Activates / Disables damage hitboxes (Armed / Unarmed).

Event Dispatcher

The Combat System Component comes with event dispatchers that allow you to monitor important changes within the system without having to check the code yourself. See the table below for a list of all the included event dispatchers and some general information.

Name
Returns
Description

On Attack Started

None

Invoked when the combat system performed a new attack.

On Attack Finished

None

Invoked when an attack played by the combat system has done playing or was aborted.

Last updated