[SOLVED] breathing sound looping - stoping

For questions about using Classic.

Post » Wed Oct 07, 2009 3:07 pm

i have a looping sound. Character is breathing fastly while running.

I want it to play while the character is moving but can`t stop looping.

+ (platform object) is walking
++ is on the ground
+++ trigger once xaudio : autoplay resource "filename.wav" loop

when i stop the character, and start to walk again it starts another sound in another channel. I couln`t find enough help on channel topics to stop the sound.

so any help is appreciated.
B
1
G
3
Posts: 8
Reputation: 841

Post » Wed Oct 07, 2009 3:34 pm

ok solved. for other people having this issue :

- at the start of layout add an action as :
Xaudio2: Load resource "yourfile.wav" to channel 1 (loop)

check if your object is moving or create a variable to control if it is moving in an event and add action :
XAudio2: Play channel 1

to stop the sound check if it has stopped and add an action as
XAudio2 : Stop Channel 1

Now it is time for me to create 30 ish channels for each sound i am going to use. Pretty (not) straight forward.

I can autoplay it though. But still too much work for looping sounds and effects.
B
1
G
3
Posts: 8
Reputation: 841


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests