Secondary Item Ability Wont Activate

Secondary Item Ability Wont Activate

I am attempting to have a character have an Item called Fists have 2 Item Abilities. I would like to use the Mouse 1 button to punch and Mouse 2 for kick. The punch seems to work fine but my character will not do the kick. I disabled the "Aim" Item Ability and unchecked it.

I have created a Fists Item. This fists Item is the same as the Body Item in the tutorial. I was examining the Nolan character in the demo.

I see that every Item Game Object has at least 4 scripts on the Item an “Item” script, ”Third Person Perspective Item” script, “Third Person Melee Weapon Properties” script and a “Melee Weapon” script.

The “Item” script has the “Slot ID” of the Item in the inventory and the “Animator Movement Set ID” to reference the items animation in the animator.
The “Third Person Perspective Item” script just designates the Game Object used the represent the Item and the bone it is attached to.
Each additional ability for an item has both a “Third Person Melee Weapon Properties” script and a “Melee Weapon” script. The Action IDs in each must match and correlate to the “Ultimate Character Locomotion” script’s “Item Ability” –Action ID added to perform the action. I created an additional “Use” Item Ability with the same Slot ID referenced in the “Item” script on my Item and Action ID referenced in both the “Third Person Melee Weapon Properties” script and a “Melee Weapon” scripts. I think I have the concept figured out but it is not working.

Here are images to show settings

Slot ID 0, Action ID 0
IS-TPPI-MWA0-TPMWP0.jpg


Ultimate Character Locomotion Item Ability Use

Slot 0, Action ID 0





Slot Item 0, Action ID 1



Ultimate Character Locomotion Item Ability Use

Slot 0, Action ID 1

UCL-US0-A1.jpg
 

Attachments

  • MW1-TPMWP1.jpg
    MW1-TPMWP1.jpg
    110.5 KB · Views: 4
Last edited:
Your understanding is correct. When you press the secondary input button does the ability activate? If you swap actions 0 and 1 does the original action 1 work?
 
Good Idea. I did the swap and my kick worked when assigned to Action ID: 0.
What could be the problem with Action ID:1 then?
 
Hopefully this will help. When I add the second Item Ability neither will work. Also, on the first press of the secondary Item Ability I will get the sound but the after the first time I get nothing. I get no errors in the console so I have no idea how to troubleshoot this...
 
There is likely something setup wrong with your second Use ability. Just as a test I would keep the same parameters are your first Use ability but specify the different action ID.

Hopefully this will help. When I add the second Item Ability neither will work. Also, on the first press of the secondary Item Ability I will get the sound but the after the first time I get nothing. I get no errors in the console so I have no idea how to troubleshoot this...
Is the second Use ability active? One way to troubleshoot is to place a breakpoint within Use.AbilityStarted and see why it is ending if it is ending early. If it is still active then Use.LateUpdate should point you to what it is waiting for.
 
Top