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.
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.
Attacks
It holds all the attacks that have been extracted from the enemy configuration.
Cooldown Register
A register of all attacks, showing their current cooldown timestamp.
Active Attack
The currently active attack. This is set when an attack is performed.
Current Anim Instance
This is the animation instance on which the active attack is played.
Config
The enemy configuration asset requested from owner.
State
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.
Get Config
Tries to retrieve the enemy configuration from the owning actor via the agent provider interface.
Prepare Attacks
Sorts attacks into map with default timestamp.
Mark Attack Used
Marks an attack as used. Provides a new timestamp within map.
Play Attack
Plays an animation montage on the owners anim instance, if found.
Toggle Colliders
Activates / Deactivates damage hitboxes based on toggle state set trough anim notify state.
Select Attack
Algorithm to select a new attack based on weight and cooldown.
Get Combat Component
Allows to return direct reference to combat system (basically returns self).
Perform Attack
Performs (Select, Play, Dispatch) new attack within combat system.
Toggle Combat System
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.
On Attack Started
Invoked when the combat system performed a new attack.
On Attack Finished
Invoked when an attack played by the combat system has done playing or was aborted.
Last updated