I am trying to add new melee attacks to my AI in the lyra project. I currently have one attack working but I cannot seem to add a second attack. Here is my current Behavior tree for reference. I was thinking that for the second attack I need to add a new service for it, but the issue is that the AI is not sure what to execute first so therefore it just runs the first behavior that doesn’t fail and ignores the second behavior. I need it to randomly switch between the two attacks so that it does both a light and heavy attack.
That’s a great idea! I discovered that the issue was that my animation montage wasn’t set up correctly. I am using AGR for the line trace and I needed to put a notify state in the animation timeline so that would trigger and also I needed to ensure the animation was only using the upper body of the mannequin and I needed to ensure the tags in the service matched the trigger tags in the gameplay ability. Then I ensured the skeleton was targeted correctly. Once all of the pieces were in place I was good to go. Now both the player and the AI can use a light and a heavy attack and the AI randomly switches between the two.