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"

Main menu map music won't play after map is reloaded

Hi all, I can't seem to figure out how to get my main menu music to play after the main game is launched. In other words, the game fires up to the main menu, music plays fine(hooked to EventBeginPlay), you hit the play button, play for a bit, die, and the main menu map is reloaded. However, the music no longer plays on the main menu screen. It will only play the very first time. I suspect because it's on the event begin play node, and will only fire the once, but if thats the case, why do all the rest of the widget work fine(buttons, images, etc.). I've tried hooking the music to Event LevelReset, but that wouldn't play the sound file at all. :( Any suggestions? Thanks!

Product Version: UE 4.14
Tags:
more ▼

asked Feb 24 '17 at 06:27 PM in Blueprint Scripting

avatar image

riverboy6
1 2 1

avatar image DanZaidan Feb 24 '17 at 08:00 PM

How are you reloading the level? The "Open Level" node?

avatar image riverboy6 Feb 24 '17 at 09:14 PM

Hi, thanks for the reply, yeah, I'm using the open level node from my main menu widget BP

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

You can try this.do in your level blueprint tested now works in my project alt text

level blueprint.jpg (188.8 kB)
more ▼

answered Feb 24 '17 at 07:57 PM

avatar image

MadMarsza
22 3 3 6

avatar image riverboy6 Feb 24 '17 at 09:18 PM

Hey, thanks for this! It's skipping out now, very strange... It will play about fifty percent of the time when it loads. Randomly, sometimes it plays, sometimes it doesn't. Trying to see if there is a pattern to it, but doesn't seem to be :-/ I'm thinking I must have something conflicting with it somewhere, just can't imagine where.

avatar image MadMarsza Feb 25 '17 at 10:43 AM

Would you mind uploading a picture of your main menu widget BP? Also what other events do you have in your main menu level BP?

avatar image riverboy6 Feb 25 '17 at 04:27 PM

Sure, think my first attempt failed LOL Here is the Main Menu BP: alt text

capture.png (123.0 kB)
avatar image riverboy6 Feb 25 '17 at 04:28 PM

And here is the Level BP for the main menu level: alt text

avatar image riverboy6 Feb 25 '17 at 04:34 PM

I also have a pause menu, that you can quit from and it will reload the main menu level. Sometimes the music will play in the main menu, and when I start the game from there, the in game music doesn't play. All the other sound fx work in game, even the triggered events, just no music. The strange thing is, it's random, sometimes the music will play in both, sometimes only one or the other. Thanks so much for helping me with this!

avatar image riverboy6 Feb 25 '17 at 04:35 PM

P.S. I am VERY new to unreal... LOL

avatar image MadMarsza Feb 25 '17 at 04:56 PM

Let me know if your game does pause on death and on the in game pause and I will show you how to fix it,If not let me know and I will setup a project and test

avatar image riverboy6 Feb 25 '17 at 05:06 PM

Oh man, brilliant!! That's it! I took the pause off my character death and now the music plays when the main menu loads :D

Of course, now I can walk around dead for a few seconds after I die LOL That's awesome, this was making me nuts haha

avatar image riverboy6 Feb 25 '17 at 05:07 PM

So, if I pause the game, and then quit to main menu, how would I go about fixing the music?

avatar image MadMarsza Feb 25 '17 at 05:14 PM

Haha glad I could help,You can use the ' Set game paused' node anywhere in your main menu level BP 'event begin play' and it should unpause the game.Just leave it unticked ofcourse.This way you can still use your pause on death function

avatar image riverboy6 Feb 25 '17 at 05:19 PM

Awesome! Thank you SO much for taking the time, really appreciate it.

(comments are locked)
10|2000 characters needed characters left

Okay I don't if this might be the issue,When you pause your game and you open your pause menu I assume your game pause's? And does your game pause on death when you are loaded into the main menu again?if this is the case you need to unpause your game when the main menu is loaded

more ▼

answered Feb 25 '17 at 04:54 PM

avatar image

MadMarsza
22 3 3 6

(comments are locked)
10|2000 characters needed characters left
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