x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Ambient music stopping after item is picked up

Hello all,

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

alt text

Product Version: UE 4.9
Tags:
ambient sounds.png (118.6 kB)
more ▼

asked Jun 21 '16 at 08:00 PM in Blueprint Scripting

avatar image

PartyFish88
3 2 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Jun 21 '16 at 09:43 PM

avatar image

1l2Hawk
690 36 35 74

avatar image PartyFish88 Jun 21 '16 at 09:53 PM

Perfect! It works fine now. I like the story of the pins talking to each other :D Thanks so much, this was the last thing I needed to fix to complete my level.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question