# Is this the right way to use callbacks?

**URL:** <https://qa.fmod.com/t/is-this-the-right-way-to-use-callbacks/19915>\
**Category:** Unreal Engine\
**Created:** [February 27, 2023, 5:28am UTC](https://qa.fmod.com/t/is-this-the-right-way-to-use-callbacks/19915 "2023-02-27T05:28:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniellumertz](https://avatars.discourse-cdn.com/v4/letter/d/7cd45c/32.png) [@daniellumertz](https://qa.fmod.com/u/daniellumertz)\
**Post date:** [February 27, 2023, 5:28am UTC](https://qa.fmod.com/t/is-this-the-right-way-to-use-callbacks/19915/1 "2023-02-27T05:28:22Z")

</div>

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:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/b/beab56eebbc69da2d40680249debf1c0bc2ab81a.png)

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:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/e/e590844199d95fc355c095a4411f4518a072c5a7.png)

Sorry I am very new to this topic

---

<div class="post-metadata">

**Author:** ![daniellumertz](https://avatars.discourse-cdn.com/v4/letter/d/7cd45c/32.png) [@daniellumertz](https://qa.fmod.com/u/daniellumertz)\
**Post date:** [February 27, 2023, 8:46am UTC](https://qa.fmod.com/t/is-this-the-right-way-to-use-callbacks/19915/3 "2023-02-27T08:46:25Z")

</div>

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:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/3/393d0711e6b61c6d0bdf1e1f98d878be8c602c68.png)

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](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/3/375a78e3d178300b8ffa54fdc8b293056a2563b5.png)  
How to create these nodes:  
 ![musicsynbc](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/e/ef20db398f1d66a7ecce81d4a0c1eba3f95fa5aa.gif)

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

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [March 6, 2023, 11:59pm UTC](https://qa.fmod.com/t/is-this-the-right-way-to-use-callbacks/19915/4 "2023-03-06T23:59:22Z")

</div>

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.
