Question about Melee Attack Combo

Velsthinez

New member
I have been tinkering with ThirdPersonController, and I'm planning to mod the melee system for combos. After studying the script a little, it seems there's a variable that m_AllowAttackCombo that seems to be for that but turning it on and off only seems to affect wether it will continue attack

Reading the script, it seems to suggest that it will activate the next state of some sort. Is there a way to call a specific state in the melee item after a specific combo count?
For example, on landing first hit, call State("Combo1") and on second hit ("Combo2") and then after a way, back to default.
 

Velsthinez

New member
Going deeper into the script, there's an ImpactStateName that can be called specifically on the target hit, which seems to be what I wanted, is there a way to the same but to itself? So OnImpact, I wanna trigger and set the state on the melee script calling the impact and changing the state.
 

Velsthinez

New member
That makes sense, however looking at the script, it seems like only Audio has the custom sub state with the substate selection. I would like to change the state of the script itself directly, as I want to tweak certain variables like damage and etc.

I can create a custom script that hook things up back to the melee script but is there any specific place I could hook up the melee script to an external script, similar to the OnImpactEvent ? Or do I have to modify the melee script itself?
 

Justin

Administrator
Staff member
The Item Substate Index field will allow you to determine which animation should play (and also the audio to go along with it). This does not allow for different damage amounts based on the animation though - I like that idea and will add it in. I will also update the melee documentation to talk more about how the combo system works - based on what you've mentioned I don't think you need to change any code, you may just need to add a new selector.
 

Velsthinez

New member
Yup, cause it seems to be similar to UFPS state system, but you had to call it from a custom script. So I was really surprise by the substate manipulation through the selector. I am looking forward to the new addition, would be really helpful!
 

Genmnij

New member
Though selector can change sub states by sequence, but it wont reset to default if I stop the chain in the middle.
 

Genmnij

New member
1538537401601.png
This part, the selector only provide sequence, and it wont reset to the first one if the sequence stops in the middle.
 

Velsthinez

New member
The Item Substate Index field will allow you to determine which animation should play (and also the audio to go along with it). This does not allow for different damage amounts based on the animation though - I like that idea and will add it in. I will also update the melee documentation to talk more about how the combo system works - based on what you've mentioned I don't think you need to change any code, you may just need to add a new selector.

This, the custom selector being able to affect damage
 

Justin

Administrator
Staff member
Ah, for that I won't be adding another selector, rather it will be a field similar to "Allow During Movement". Right now I am doing only bug fixes but things are going well so I think that I'll be able to start adding new features soon. I have this one written down and it'll be a small one so I should be able to get it in pretty quickly.
 

MrQuaid

Member
Hey, is this something your still working on? I want to be able to change the amount of damage via a script on the thirdPersonMeleeWeaponProperties.

What I do is instead of changing weapons, I just change the art of my sword, kind of like visual upgrades, dont need a whole new item or animation but I would like to change the amount of damage it deals based on upgrades.
 

Rin

New member
I don't mean to bring up an old topic, but I'm also having trouble getting proper combos in. The issue is with the sequence option. I have 2 states set up with item substates of 2 and 3 respectively. I have allow combos selected and when I attack, I go through the moves just fine. The problem is after completing the first attack and stopping, it keeps my place in the combo. I want it to go back and do the first attack again after not initiating the second attack but it always goes to the second attack. Any help on this would be appreciated.
Capture.PNG
 

Justin

Administrator
Staff member
The Sequence Selector will always continue onto the next animation rather than resetting. What you are describing will require a new selector. It looks like it will also require a more advanced API so I can add the hooks to version 2.1.
 
  • Like
Reactions: Rin
Top