Trying to remove aim completely and assign right click to secondary attack in melee.

zoicelols

Member
I am trying to make left click use different kick based attacks and right click use different punch based attacks. How would I implement this using the body item?
 
For this I would setup two different melee items on the body: kicking with an action id of 0, and then punching with an action id of 1. You can then add two use abilities and have the left kick use the first use ability, and the right click use the second use ability.
 
Do you mean not using the body item at all? Like I would create two different items one being punch and the other being kick. Then creating two different animation state trees specific to the two?

Or do you mean adding specific duplicate item scripts onto the body item so that it works properly?
 
Or do you mean adding specific duplicate item scripts onto the body item so that it works properly?
This one - you'll want to add two MeleeWeapon actions (doing so through the item manager) and set the different animations under the Use AnimatorAudioStateSet.
 
Okay so I have followed this so far, but now both right click and left click only punch. I created a second Use ability and assigned it to right click and then I disabled aim ability.

Below I have specified a substate of 5 and then specified the same thing in the animator states. I'm sure I just don't understand how this adding and conditioning animations states and how it works. I tried to copy the other animation states with what knowledge I think I understand. Yet I can't get the character to kick.

index.php


1539478282497.png
 

Attachments

  • 1539477758426.png
    1539477758426.png
    44.7 KB · Views: 107
That is the item component - you only want to have one item component, but multiple melee item components, sort of similar to how the assault rifle has a ShootableWeapon and MeleeWeapon.
 
Oh I do only have one item component. I do have two MeleeWeapon Scripts attached. I did change the item component substate from 5 back to 0 by default and then made the kicking MeleeWeapon substateindex to 5. Now he does a shoulder movement that gets stuck and disables punching, but still no kick. That movement is definitely the start of the animation but it stops and doesnt do the rest of the animation.

1539570418715.png
 
Last edited:
Top