Secondary Melee Ability - Issues

Omega_5

New member
I'm having some trouble with a punch (melee) ability.

Background;
I have successfully built a left handed grenade, and I'm getting more familiar / comfortable with the ability systems.
What I'm trying to achieve with this one is, I want the punch ability to be a left handed secondary ability, similar to the left handed grenades item ability.
I built the melee per the punch / kick video. I only used the one animation, for a left hand punch, though. I was able to get the ability to work as a primary, in either Slot ID 0 or 1.
When I switched the Action ID from 0 to 1 (as this is where I would like it; Action ID 1), it still functions as intended when used as a primary.
I set the ability up in a new category I called "Left Hand Melee". Body is set to exist in this category. The item ability was setup under this new category, under the Item Set Manager, a set of toggle and equip-unequip item abilities, and a key assignment to use the SecondaryUse key.
Under Slot ID 0, Action ID 1, it functions as intended.

The issue;
When I change the Slot ID to 1 (updating the Item Set Manager and Item Ability slot to suit), it breaks the ability.
I've been chasing this for 2 days, and I can't figure out what I'm doing wrong.

I even went back to my grenade ability, which works fine, and started playing with the Action ID to see if that was the issue. I can't replicate it that way.
I've also tried to modify my grenade category to call the melee ability. It works fine on Slot 0, but breaks when I try Slot 1.

What I find strange, and maybe this is a clue; when I press the SecondaryUse key, it goes active and stays active; it will not deactivate.

Any ideas?
Is there something special about the melee abilities that I can't assign them to Slot 1?
 
Have you set up the animator controller to respond to the correct parameters in slot 1 the same as slot 0? (E.g. Slot1ItemID/StateIndex/SubstateIndex). I believe Nolan's default animator controller is set up to assume the Body item will always be in slot 0, so you may need to go through and change the relevant animator states accordingly, or duplicate them.
 
Thanks for the reply.
I changed the animator to Slot 1 for the entire body state; no change.

As well, I'm still seeing the ability stay active, long after the button is pressed. Note, per the instructional videos, I have 'Wait for Animation' unchecked.
 
Where did you un-check Wait For Animation? In the Melee Weapon use event? I believe that's enabled in the demo, the tutorial video may be outdated a bit, but in any case that's not the main issue here.

The character's Animator Monitor component lets you log ability and item parameter changes, as well as events - try logging with the correctly working Body item in slot 0, then try it with the one in slot 1 and see if there's any difference. If there is, then your Body item isn't quite setup correctly. If there's no difference, then the issue lies somewhere in your animator setup.
 
I should have double checked my work last night before replying; when changing from Slot 0 to Slot 1, I missed that a few conditions had flipped from 'equals' to 'greater', obviously breaking everything.
I fixed up those issues; the punch ability now works in third person, as intended. Thanks again for the help; I never would have thought to look there.

A few residual issues I'm dealing with; the ability does not work in first person view, for some reason. I'll update this post if I figure it out. I'm sure it's something simple, that I'm overlooking.

I also lost control of my grenade function now. Maybe somehow tied to Equip-Unequip or Toggle; when I disable the punch equip, the grenade works again.
Question on this, though; how does UCC handle two (or more) items, in different categories, occupying the same slot?
After reading the documentation and watching the videos, I'm still a bit lost as to how the automatic Equip-Unequip and Toggle systems work, such as those found on the secondary abilities.
In the future I have plans to add a third 'magic' style ability, via a third category, to the left hand. Getting some more in depth knowledge now, will probably save a lot of headache in the future.
 
You can't have more than one active item in the same slot, regardless of categories. E.g. in the demo scene you can't have the sword and shield AND a grenade. However, the number of slots is actually arbitrary, so a common way to have secondary/tertiary items that you always have access to is to create a third slot. So I'm assuming this is the cause of your grenade issue - you're trying to use it whilst both item slots are full?
 
That's exactly the issue. I think I misunderstood how the slot system worked, on items like this. I re-read the documentation, and it makes a lot more sense.
I'm going to revert back to an earlier version of my project and try the whole thing again with a new slot.
Thanks for all the help!

Edit:
I created a Slot 2 for the melee; it works amazing, and the grenade works too!
I'm still having issues with the first person animation. It's getting off the original topic, so I'm going to create a separate thread to tackle that one.
Thank you again for all the help.
 
Last edited:
Top