How do you import sounds in construct?

For questions about using Classic.

Post » Sat Jan 12, 2008 12:18 pm

I made a DirectSound object, but I don't get how construct will find the wav file I want it to play.

Halp D:


edit: I found how to import the file, but it doesn't play it...

Here's an image:

B
1
G
4
Posts: 4
Reputation: 1,033

Post » Sat Jan 12, 2008 4:27 pm

Sorry, this is an unfinished feature - ideally it would work like that, but DirectSound doesn't look in resources yet. You'll have to have the .wav files as external files. 'Play music', 'Play sound' etc all only look on disk at the moment.

Resources will be working by 1.0!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Sun Jan 13, 2008 10:58 am

[quote="Ashley":1gzxqk8b]Sorry, this is an unfinished feature - ideally it would work like that, but DirectSound doesn't look in resources yet. You'll have to have the .wav files as external files. 'Play music', 'Play sound' etc all only look on disk at the moment.

Resources will be working by 1.0![/quote:1gzxqk8b]
Okay, thanks.
B
1
G
4
Posts: 4
Reputation: 1,033

Post » Tue Feb 19, 2008 1:26 am

I thought i'd bump this thread instead of starting a new one.. so how exactly do I play a sound effect?
Am I supposed to load each sound into a channel then play it or is there a more straightforward way?
When I try to load an .mp3 into a channel, the game crashes.
B
2
G
4
Posts: 44
Reputation: 1,138

Post » Tue Feb 19, 2008 2:59 pm

If you have the latest build, just add a .wav file in a resource, and the simplest way to play it is via 'Autoplay resource'. Alternatively have the file on disk and play it using 'Autoplay file'.

Only 'Play music' supports MP3 files, the rest are sound effects and must be .wav format.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Tue Feb 19, 2008 7:33 pm

I see, thanks!
My engine is coming along beautifully, I'll be sending a donation your way as soon as I can :)
B
2
G
4
Posts: 44
Reputation: 1,138


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests