I have it set up where in my enemy blueprint there is a custom event called attack, which is to just play the animation montage that has been created, except it will not play the montage. I previously had it set up where I was using an UE5 quinn model with a base game montage, and it was working then.
Here are some SS of my blueprint, any help would be greatly appreciated.
First step would be to throw some print string nodes in the attack event to make sure everything is firing. Also, check if IsAttacking bool’s default value is true. I’ve had situations before where UE decided some new bool should be true by default because reasons, and branches needing a false always failed.
Or, since you’re already casting to enemy in the btt, you could get the mesh and play montage right from the task. Then you could use the async completed and interrupted pins to finish the task. On that note, could also set isattaking bool to false from completed pin in event if you get it to work, to stop ai from potentially restarting anim.
Bonus round: If you plan to reuse behavior tree for multiple enemies, you might want to make a blueprint interface to call the attack function. Then each enemy could just be told to attack by the BT, and the interface implementation will decide which attack logic to use.
Ive had success with the play animation node tho, doing that the animation does play, however it does not return to the behavior tree and remains still after doing so