Adding Music

New releases and general discussions.

Post » Sun Nov 24, 2013 10:50 pm

I accidentally posted this in the Construct 2 forums already, and the only suggestion I got involved using an object that isn't available in Construct Classic, so if you guys don't mind, I'm going to try again here:

I'm a total noob. I've been trying to add music that I made to a game for a while now, and I've not yet been successful. What is the most popular way of doing this? I've been trying to use the XAudio2 object to "autoplay resource" at the start of the layout. I have an mp3 and a wav version of the same song in the music folder under Project, but neither of them shows up as available when I try to add them to the event. Am I doing something wrong? Is this not the correct way of going about accomplishing something like this at all? Any advice is welcome. Thanks in advance!
B
4
Posts: 17
Reputation: 228

Post » Sun Nov 24, 2013 11:48 pm

1.) Go to event sheet
2.) Create event start of layout or when you want music to play
3.) Click on New action next to start of event
4.) Go to XAudio2 and click Autoplay file
5.) In the filename to load area write AppPath & "name of song.mp3"

Also have your music file in the same folder as your cap or exe for this method.TunaUppercut2013-11-24 23:51:55
B
10
S
3
G
1
Posts: 103
Reputation: 1,390

Post » Thu Nov 28, 2013 6:55 pm

It worked! Thank you! I didn't have the music in the same folder as the game before. I guess that was my problem.
B
4
Posts: 17
Reputation: 228


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests