Links
📶

Combo Manager

✔

Overview

This component uses Modes Abilities Index in the Animal Controller to create combo sequences.
It requires an Animal Controller component.
When a combo starts. it checks for the Activation time of a Mode Animation to Play the Next Ability in the sequence queue.

Parameters

Animal

Reference for the Animal Component

Active Combo Index

Which is the current Active combo. This is used when you want to change combos if the character is unharmed, or if the character equips a weapon. The Active Combo is Highlithed in yellow
If the Active Combo Index is set to -1, no combo will play.

Branch

This value holds the branching value for the combo secuences. For example: You can set the Branch Value 0 to the Mouse Left Click, and 1 for Mouse Right Click. Changing the Branch Value in the middle of a sequence, allows to have different animation variations in a single Combo.

Combo List

Combos are groups of sequences that activate a new Mode Ability on the Animal using the activation time of the current/Required Mode Ability.

Index

Name

Mode

Sequences

Each sequence holds the values needed to activate the proper animation at the proper time.
  • Branch value: Helps activate different sequences with different inputs;
  • Activation Ability: Used to Identify which is the current Playing Ability on the mode.
  • Next Ability: Used to Activate the Next Ability on the Mode if the Playing Ability is within the Activation range
  • Activation range: Search on the Playing Ability Animation the range in a normalized time and if you execute the Activation Combo code within that range, then the Next sequence will be activated.
  • Finisher: Used to identify if the current playing sequence is the Finisher Animation.
All the sequences use a mode Ability index to identify which Animation can be activated:
Steve Attack Mode and its Abilities Index. E.g. Right Punch Index is 1
These combos can have multiple combos sequences inside. Which are activated by changing the Branch value in the middle of the combo.
First: Atk1 +Atk1+Atk1(0-0-0) Second: Atk1+Atk1+Atk2 (0-0-1)
To Start a combo you call the Method ComboManager.Activate(int ComboIndex) to activate the combo you want.
You can do it by connecting it to an Input event like this:
Combos can be also Activates using ComboManager.Activate_XXYY(int) where XX is the Branch value and YY is the Combo Index.
Check the scene 1 - Playground Human to see how Steve can do Combos.
Which means that The Branch value will be set to 0 and the Combo to activate is 0
This is the Recommended Method to use when you want to activate a combo. Otherwise, if you have combos with different Branch Value you will need to call: ComboManager.SetBranch(int)first, and then ComboManager.Activate(int) after..
ComboManager.Activate_XXYY(int) Combines both methods.

Starting Combo Sequence

Every Combo starts with a sequence Activation Ability set to 0. that is why it can be more than one sequence starter on a Combo.

Starting combos must NOT have the same branch.

Is recommended that All Combo starters are set at the top of the list. They are color coded with green.

Global Parameters

Branch

This parameter is an auxiliar parameter that helps to connect more than one input into the combos.
E.g.: To activate a combo; set the Branch you want to start, or change the Branch value on the middle of the combo to finish with a different sequence.
They represent different inputs. So you start pressing Attack1 on a combo and then you change to Attack2. Internally the Branch value changes from 0 to 1 or any other value.

[D] or Debug

Debugs on the console what is happening with the combo manager

Combo Parameters

Index

Index of the Combo. This is used to Activate a combo via the Activate method.

Name

Name of the Combo

Mode

Which mode the Combo will activate

Active

Enable - Disable a Combo.

On Combo Interrupted

Event invoked when a Combo does NOT finish on a Finisher Sequence. Send as parameter the XXYY value of the combo sequence Where XX is the Branch value and YY is the Combo Index.

On Combo Finished

Event invoked when a Combo finish on a Finisher Sequence. Send as parameter the XXYY value of the combo sequence Where XX is the Branch value and YY is the Combo Index.

Sequence Parameters

Index

Index of the Sequence on the Sequence list.

Branch

Helps activating different sequences with different inputs.

Activation Ability

Used to Identify which is the current Playing Ability on the mode.

Next Ability

Used to Activate the Next Ability on the Mode if the Playing Ability is within the Activation range

Finisher

Used to identify if the current playing sequence is the Finisher Animation.

Activation Range

The activation Range is the main factor to activate the next animation on a sequence. It is min and max value of the Animation normalized time. If the Active Animation time is within that range, the next animation of the sequence will be activated.

Sequence Play

Event invoked when the sequence starts. Send as parameter the XXYY value of the combo sequence Where XX is the Branch value and YY is the Combo Index.

Functions and Methods

void Activate(int comboIndex)

Activate a combo by its index

void Activate_XXYY(int BranchCombo)

Activate a combo where the XX values set the branch and the XX value set the combo Index.
E.g. Activate_XXYY(1013) Set the Branch to 10 and tries to activate the combo with the Index 13

void SetBranch(int branch)

Set the Branch value.

void Combo_Enable(int comboIndex)

Set the active value of a combo to true, Active combos can be executed

void Combo_Disable(int comboIndex)

Set the active value of a combo to false , Active combos cannot be executed
​