Play a sequence of songs
Hi, guys, I'm kinda new in UE4 but using some tutorials and thinking through things I'm trying to make something that's not completely rubbish... OK, here's the idea... I've got a big speaker in the scene I'm working on. I want to make it so when I go to the speaker and press the interaction key it plays a song. So far so good. I want to make it so that when I press the "next song" key or the "Previous song" key it plays the right track and I'm having some trouble with that. What I've got so far makes so that every time the BP hits a branch it's always False and so it never plays the next/previous song. Since this project is just for me and no one else I'm using some songs downloaded from youtube. The pictures show you what I have now and so it should be easier for you to help me. Thank you in advance !!!
Help reading the screenshots: 1st screenshot is the event graph with everything but since you can barely read it I took the 2nd screenshot which is a zoomed in version of the first one where you can see everything you need because it all repeats itself. The Disable Input node is there because I'm using it to connect the "Next song" and "Previous Song" in it but I disconnected them to try something and forgot to reconnect them for the screenshot. 3rd and 4th screenshots represent 2 functions I created (the Next song and Previous Song) so that I can check what song is playing.
P.S: If you're interested to further help me with my project you can also try to answer my other question - https://answers.unrealengine.com/questions/561415/focus-on-object.html
asked Feb 11 '17 at 11:30 PM in Blueprint Scripting
Always use an INT variable to change the pointer, then use an array of your sounds to activate as in the example below. You can also use 'Swtich INT' to indicate the correct output of the variable 'INT'.
You can also create a macro to use an array directly, without setting the max and min (auto).
answered Feb 12 '17 at 12:29 AM
You should use Sound Cues.. You can build all of your audio logic into the cue, and your blueprint can just tell it when to play. You can also use the Switch node in the Sound Cue to change the track. Check out the reference here:
answered Feb 12 '17 at 12:34 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here