Cast to Levelblueprint

Hey guys,

I want to start and stop the background music. Therefore I create a Customevent in the levelblueprint, which fade the music in and out. I want to stop the music when a button is clicked. So I need to cast to the LevelBlueprint and call the CustomEvent but I dont know how to cast to the levelblueprint… and I dont know another way. I watched few videos and thats the only way (the only way I saw). Maybe there is a way how I can get the ambientsound into my EventGraph in my UMG?

Thank you guys!

Because your GUI blueprint could be instantiated anywhere, it can’t really know about “the” level blueprint. Each level has its own blueprint, with its own nodes and members. This makes level blueprints not terribly useful for things that belong to the GAME rather than to the LEVEL.
I suggest you create a blueprint class called something like BP_MusicManager.
Then, place one of these into each of your levels that needs music.
Then, in the GUI, when you want to change the music, do a “find all actors of type” for BP_MusicManager, and you can poke at the music from there. (Get the first element of the array that returns.)

Thank you for your answere! I chose the the parent class ambientsound. First I just want to fade in and out the music in one level. If its working Ill try it with all levels. My problem ist now that the music does not stop. Press F->FadeOut(target audiocomponent). Is Fade out the right node for stopping the music?

I find new nodes: activate and deactivate. Both of them dont work. When I press F it should activate the sound. L it should deactivate the sound. Can anyone take time for me and show me how to do it correctly? Or any video which shows how to start and stop time with an input key

Hey guys,

Where do I find the Object of the different Blueprint Classes. I mean for controller I just have to type get player controller. Or for character I just have to type get player character. For ambient sounds? What do I have to type?
Would this work?:

Do not know which target I have to connect to… any help appreciated!

Please guys. I need just one example of how to start/stop music. When I see it I will learn it!