Should I be using Anim Notifies for Weapon/Attack Behavior in this way?

I’ve been prototyping a system for a Single Player (For now) Souls-like type game I’m developing in my free time. For attacks that any NPC,Player,Enemy, etc…, does there is a BehaviorComponent with an array of current weapon references associated to the pawn. In the animation montage for each attack type the animation relies on anim notifies that define the behavior of the animation by adding components to the weapon directly. The Classes are “InvokeWeaponBehavior” Anim Notify States/Anim Notifies that have a few subclasses Such as “InvokeMeleeWeapon”, “InvokeRangedWeapon”. They take different inputs, for instance MeleeWeapon takes a Behavior class that decides what to do with the input and SocketPairArray that contains socket names to connect to form the MeleeCollision and a WeaponReference Index. Theres a callback on the Hit function of the behavior class to handle all the hits and damage.

Using this method I’m able to make things driven by the animation notifies and it makes adding new weapon behaviors easier by just editing new montages with new behavior or reusing some montages already for a quick melee weapon.
My Question is, by trying to use this system for Player Weapons, Enemy Attacks, Boss Attacks, etc…
Will there be any fundamental flaws of using Anim Notifies for all this type of behavior? Should I put the behavior in the weapons themselves to avoid notifies not firing when blending out? I want a way to have different attacks behave differently and stack behaviors such as a melee swing, with a ranged slash at the same time. I’m trying to find a dynamic way of designing such a system.
I’m hoping for advice since I’m early in the prototyping stage and haven’t created any other entity or AI classes apart from the Player Character.

I hope I explained it well enough, any help is greatly appreciated!

A simple forum search will tell you in all uppercase letters: NO.

If your system is already more or less done and you are using montages, ditch the notify but take and set Delay nodes off the montage play time to replicate actual function/event calls.

But its probbaly best you scrap and start over properly.

Yeah ill look into setting it up with timers instead. Thanks for pointing me in the right direction.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.