📶Combo Manager
1.4.2b
Last updated
1.4.2b
Last updated
This component uses Modes Abilities Index in the Animal Controller to create combo sequences.
It requires an Animal Controller component. It does not have to be in the same gameobject as the Animal script. I recommend being in a Child GameObject
The combo manager uses Modes to play animations. It will check the right time for an Ability to play the next animation given a Branch value. The Branch value is the Input you give the character.
E.g. Branch 0 is Left click; Branch 1 is Right Click. You can have as many branches as you like.
To play a combo, call the method. ComboManager.Play(int Branch)
Connect the method to your Input Provider:
Reference for the Animal Component
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 highlighted in yellow
If the Active Combo Index is set to -1, no combo will play. (The combo manager will be disabled
This value holds the branching value for the combo sequences. 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.
If the Animal Controller is sleep, the combo manager will be disabled internally too.
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 of the combos. Use it to set the current active Combo with the method: ComboManager.SetActiveCombo(int Index)
. An example of this is when a new weapon is equipped. The active combo will change from Unarmed to Melee.
Name of the Combo. Use this value if you do not want to use the index value with the method: ComboManager.SetActiveCombo(string Index)
The mode that will be used in the Combo.
Each sequence holds the values needed to activate the proper animation at the proper time.
Helps activate different sequences with different inputs.
Used to Identify which is the current Playing Ability on the mode.
If is set to Zero then the Ability is a Started Combo Sequence
Is recommended that All Combo starters are set at the top of the list. They are color coded with green.
Used to Activate an Ability on the Mode if the Required Ability is within the Activation time
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.
Used to identify if the current playing sequence is the Finisher Animation. This is color coded as Cyan.
All the sequences use a mode Ability index to identify which Animation can be activated:
Invoked when the sequence starts. the value given is (Mode ID*1000 + Ability Value)
Invoked when the combo played a finisher sequence
Invoked when the combo played did not play a finisher sequence
void Play(int branch)
Set the Branch value. and plays a combo
void SetActiveCombo(int Index)
Set the current active combo on the Manager
void SetBranch(int branch)
Set the Branch value.