I got my level working, the clearing up the lagoon one? Posted the other day, nevermind
Anyway, when the player picks up an item (bottle, tire, barrel) the ambient sound stops.
My music is set up so when the player leaves the water they hit a trigger box which starts a tropical beach ambience, then when they reenter the water the tropical ambience fades away and they hit another trigger box underwater, this starts the underwater ambience.
The problem occurs when the player picks up an item it triggers the EndOverlap event like theyâve left the trigger box, but I donât understand why? I think itâs something to do with the âpick upâ event cancelling it out but Iâm unsure how to fix it.
Any help would be greatly appreciated
P.s If you need other screenshots of my Blueprint just ask
Perfect! It works fine now.
I like the story of the pins talking to each other
Thanks so much, this was the last thing I needed to fix to complete my level.
The problem is that the red overlap triggers there will fire when -any- Actors enter or leave those volumes. What you want to do instead is test those blue âOther Actorâ pins first and only let your players have an effect on those audio components. To do that, drag a wire off of the blue Other Actor pin and type âCast Toâ and choose whatever one matches whatever your player class is. This node will have two execution pins, connect the top one to Fade Out node and leave the Cast Failed one hanging empty. Make sure to connect the front pin back to the red OnActorBeginOverlap node.
That way, letâs say you shoot a bullet in the water. Red pin says âyo, somebody entered meâ - the next node says âwas it a player?â - nope it was a bullet and nothing bad happens. But if you jump in the water itself the red pin says âyikes, here comes another actorâ - the next node says âwas it a player?â - yes, okay lets play some underwater ambient now.