AnimNotify for triggering important actions

Hi guys,

I’m trying to create bring some things in my game in sync with the animations and I’m asking myself if it is a good idea to trigger “important” actions from within an Animation Blueprint.

The following things are triggered currently with Animation Notifiers in my game:

  • Particle Effects
  • Sounds (for example footsteps)
  • Attaching of meshs to skeleton sockets (for example when switching weapons)

I suppose that this is absolutely ok but I’m not sure if it is ok to also trigger things like methods of the Character class which do things like “traces” for hit scan weapons and the suiting “I hit something”-call to the server.
Another idea would be to trigger the “Throw grenade” method (in the Character Blueprint) with AnimNotifies.

What do you think. Is this legit to trigger these “important” methods?

Currently I’m using timers in the game logic (partly in c++) to trigger things like the weapons hit scan etc.
This is absolutely ok for fast firing weapons but when having slower weapons you sometimes have the feeling that things are not in sync to the animation.

What do you think?

Go for it. AnimNotifies are awesome for the timing reason. No need to make life more difficult for yourself by setting up custom timers from code.
Also, if you decide to have the animation disruptable by - for example - performing another action mid-way through or taking damage, a custom timer will still fire; making your game feel less responsive, whereas Notifies won’t.

Great to hear that. I’m trying around with it currently and it is really working great.
I was really afraid that the whole work I’m doing at the moment would be for nothing at the end because of something I ignored or forgot.

I’m a developer and normally I try to separate graphical user interfaces from background logic and so on, so I wasn’t sure about it … but it sounds promising :slight_smile: