My ItemAbility appears to ignore the Animator Controller for my FP Arms

MallNinjaMax

New member
I'm trying to hook up the Reload ItemAbility to my FP Arm's Animator Controller. I created a new controller but it contains all the original parameters. The gun fires and reloads fine, it just doesn't update the AC. Maybe I'm missing something?

The transition:
Snag_bd5982.png

The arms selected:
Snag_c0f9fa.png

The ItemAbility in Locomotion:
Snag_c46846.png

The Item script on the gun:
Snag_c51afc.png

Unity version: 2018.2.7f1
UCC version: 2.0.2
 
Last edited:
Thanks, I didn't know about that. That said, the Reload ItemAbility is still ignoring my animator controller. It's not updating the Slot0ItemStateIndex. It doesn't play the animation.
 
Here's the scene, if you want to peek at it at some point. I've been pouring over the docs, the demo, the tutorials, etc. for hours (days if you count my earlier attempt with regular abilities). I feel like it's something pretty dumb that I just overlooked, but I've also gone over what seems like everything. Just short of digging through the code. Weird thing is, I just repurposed an existing ability this time. You can ignore the Inventory Check animation. However, that is the only thing I've got working when it comes to interacting with the AC parameters.
 
I spent another two hours on this, but got nowhere. I added animation events (had to duplicate one of your animations to make it readable so I knew what to put in the fields for the animation event), checked "wait for event" (with variations of these), and still nothing. The Slot0ItemIndex is not being passed at all. I don't quite understand the concept of waiting for an animation event to play an animation. I thought the parameter would just be passed to the AC regardless, and those checkboxes were just used to halt the ShootableWeapon's functionality. But, I'm pretty lost at this point.

I'm uploading the scene again in it's current state. Please tell me if I need to do anything differently, or try a different approach altogether.
 
Last edited:
As a test what happens if you disable "Wait For Animation Event" for the Reload and Reload Complete Event Triggers? You can then specify a duration of something like 0.5. If you do this then the item won't require any animation events. Also, is the reload ability activating?
 
When I disable them I'm back to where I started: I don't see the (Active) tag show up but the reload ability does function (the gun reloads and I can fire again), but no parameters are passed to the Animator Controller. If I disable the WFAE for "Reload" but activate it for "Reload Complete" I actually see the (Active) tag next to the ability until I fire. If I have both enabled, or just "Reload", The ability shows (Active) and remains active and doesn't do anything else.

Here's a screenshot of the animation event I have on the animation for ItemSlot0StateIndex 3 (as per the ability):
Snag_61162f.png

It seems no matter what I do, the animation will not play. Something is stopping the ItemSlot0StateIndex from passing to the AC. I tested it manually, and the animation plays.
 
Last edited:
Looks like you have two Reload abilities - you only need the top one. The Stop Type should also be set to Manual instead of Button Up. When I do that and I log the parameter changes the index is correctly changed:

28 Changed Slot0ItemStateIndex to 3.
28 Changed Slot0ItemSubstateIndex to 0.

The animation still doesn't play but at least it's now on the animator side.
 
Got it! I had two of them because one is the default (which I disabled) and the other was one I was planning to modify. I changed the input type on the duplicate, because I wanted to see how many of your abilities I could hijack for my custom weapon control system. These two things actually had no effect on my problem.

What did have an effect was the order the abilities are in the stack. Having the Reload ability below Aim seems to be what broke it (I put it below all the others and it worked). I read about the priority stack in the docs, but that was before I ran into this issue, so I didn't think to apply it here. I guess I'm gonna need to be a bit more conscious of that. It is now working as expected. Thanks!
 
Question: I noticed the docs say that the ItemAbilities do not use a priority stack, when the order they were in was actually the source of my problem. It seems to only affect Reload, but I think I might have run into other strange behavior with it (I've been unable to reproduce it yet, though). Would this be a bug? Do you want me to make a new thread in Discussion for it?
 
Last edited:
The docs were wrong - I just updated it to:

  • Item abilities do not use a priority system to determine which abilities can be active. They do use the priority system when determining which ability should set the animator parameter.
 
Top