Is this the right way to use callbacks?

hello everyone, I am pretty newb so I am reading the user guide and I am pretty sure my blueprint isnt connected the desired way.

Here is a small example that prints the markers name as it passes by:

It is working but I wonder if this is the right way. Like if I want that when a beat/marker trigger many things on the game everything would need to be hookedup there? isnt there a more modular way where my event PrintMarkerFmod could be also in other blueprints and all are triggered at the same time when passing by a marker? It would look like it is in the userguide:

Sorry I am very new to this topic

Okkk I think I got a better way to handle (?)

The way is to place the fmod music event in the map, Enable callbacks, select the music event
, convert it to a blueprint class (music player).

Then at the music player blueprint activate the audio when needed(if not activated automatically), create an event dispatcher and put a call connected to the On Timeline Marker:

At the level blueprint or other class blueprint put a reference to the music player and drag a Bind Event to (put the created event dispatcher name here), create a custom event from it, it will already create the right outputs to it:
image
How to create these nodes:
musicsynbc

The only drawback I am having with this is that the bind dont work if it is in a actor spawned after the begin of the game

You seem to have the right approach to binding the callback to an event, it’s just a question of how to handle using those callbacks to trigger behavior across multiple blueprints. Having the level blueprint handle playback of your event is one way to approach this; another would be to have a parent blueprint handling the event callback behavior, and then creating blueprints that are children of that parent. Ultimately it depends on your specific use-case, of which you’re the best judge.

1 Like