Combo matching input

CSC

Member
Sorry to bother you.
I understand that how combo works, but when it comes to different use ability with different start type, is it possibly to transition to different combo?
For example, i have attacks with substate 2, 3, 4 i and substate 5, 6, 7 in another, they have different start type like fire1 and fire2, how to set up the melee weapon to transition from 2 to 5 before use complete event?
 

Justin

Administrator
Staff member
How are you changing the start type? When you change the start type you could also use the preset system to change/toggle the different Animator Audio State elements so it only plays certain substates.
 

CSC

Member
I use different use ability, but one cannot interrupt another, so combos between different use ability fail. I tried to enable/disable AnimatorAudioState use preset, but it doesn't work.
 

Attachments

  • Different Use Abilities.png
    Different Use Abilities.png
    25.8 KB · Views: 5

Justin

Administrator
Staff member
The animator audio state will need to be enabled or disabled before the actual animation starts otherwise the selector will not know that it has changed enable status.

That also just gave me another idea: you could create a new selector based on the current game state. This will allow you to have full control over what state element is selected. The selector API is described below:

 

CSC

Member
Actually I tried that. But i don't know how to use PlayerInput in a selector, it doesn't have a function like Update to check Input.
 

Justin

Administrator
Staff member
The selector isn't meant to be used to trigger the starting of the ability, so you don't need to check for input every frame. The selector will only run when a new state should run, and that will be triggered by the item action.

Within the Selector you can use the m_CharacterLocomotion variable to determine which use ability is active within StartStopStateSelection. From there you can get the input name and change the returned index based on that input.
 

CSC

Member
But Use Ability cannot interrupt one anothor, is it possible to get the input name after Use Event and Before Use Complete Event and Stop Active Use Ability and change to another?
 

Justin

Administrator
Staff member
In this case I was thinking that you'd do everything within a single ability. If you are using multiple abilities then you should add multiple ItemActions and not have to create a new selector.

You could subclass the Use ability in order to allow one to interrupt another.
 

CSC

Member
I changed some code within Use script in ShouldBlockAbilityStart:
C#:
if (m_UsableItems[i].Item == startingUseAbility.UsableItems[j].Item) {
                            return m_WaitForUseEvent[i];
                        }
But i think the transition isn't as smooth as the sequence selector
 

Justin

Administrator
Staff member
It sounds like you could adjust the animator in order to better account for the transitions when an ability is blocked.
 

CSC

Member
Yeah, now the Use Ability could interrupt one another, I should work on the animator, Thanks a lot!
BTW, I was trying to use block ability using Melee Weapon, not a shield, any recommandation? For example, fire 1 to attack, fire 2 to block
 

EagleGamer15

New member
Sorry to high-jack this thread, but how would one use the m_CharacterLocomotion variable in the selector to get the name of the input that was used?
I'm using only a single Use Item Ability, but want to change which attack based on what button was pressed, it seems similar to what the original asker was doing.
 

CSC

Member
Actually I think you can't get different input names in a single use Ability. Try to create multiple use abilities account for different input names, in doing so, you can use different starters too.
 

EagleGamer15

New member
Darn, I'm trying to make it so the player does a string of light attacks, and then finishes with a heavy attack. But that the heavy attack is different depending on how long the string of light attacks is. So I was hoping to not have to find a way to sync two different selectors.
 

CSC

Member
I suggest you have two different use ability, or even inherit from use ability and create your own attack ability, but either way you should design your own selector of the heavy attack.
 

EagleGamer15

New member
Right, but if I have a simple Button Down Ability Starter, that can be activated by two buttons, how do I determine which button is the one that got pressed?
 

CSC

Member
I think it's very difficult to implement with only one Use Ability, and animations are related with the selector.
 

Justin

Administrator
Staff member
Right, but if I have a simple Button Down Ability Starter, that can be activated by two buttons, how do I determine which button is the one that got pressed?


The ability starter has the PlayerInput as a parameter so you can check for what button is down.
 
Top