Hello guys this things been bugging me for some time on my project. what i’m trying to make when the player transforms lets say to super sonic a certain background music playes and after the transformation is = to false i want to remove that background music. no matter what i try it just doesn’t work eather i get some sort of runtime error while doing toggling and setting active. any advice ?
I think it would be better if you would show us your blueprint so we can see how you deleting the music
i added the event on an event tick
any idea why it doesn’t work when i play inside it works fine but when i get off the editor it gives me this error
Hi MrPRODude
Firstly, try to avoid using Tick to call singular events. It is extremely dangerous/bad practice.
I would only use “Sound2D” for UI audio or in widgets. For world objects, it is better to attach an audio component.
If you just want to change the background music depending on the mode, then you can simply swap the asset file.
In this example, I added an audio component to the pawn and ensure it was set to “Auto Activate”
Good luck
Alex