How do I properly implement sounds close together

Get help using Construct 2

Post » Fri Nov 16, 2012 6:34 pm

Lets say 5 little enemies that when killed, play a sound.

I have tried different ways of setting it up, but the sounds don't ever match up with the game. They overlap, cut each other off, just basically don't match up with the game.

Are there tricks to having a bunch of sounds play right next to each other? I just can't seem to sync them right.

Looking for tips, this isn't a bug. Thanks!
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Fri Nov 16, 2012 7:35 pm

Construct 2 can only run 1 sound at a time ...
Try to make a sound that haves the 5 sounds in it !
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Fri Nov 16, 2012 8:13 pm

I'm fine with single sounds, but is there a way to prevent overlap? Maybe a Don't try and play if playing already type of thing.

Rather than "Oh shoot, I have to play 5 sounds now, let me make a mess of it"

I would prefer "Oh shoot, I have to play 5 sounds now, let me play the first and if forget the rest since they would overlap"
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Fri Nov 16, 2012 10:28 pm

you could play the sound then wait the a number of secs egal to the duration of the sound and then play the other ? They won't overlap like that ...
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sat Nov 17, 2012 1:55 am

Could it be a browser/platform dependent issue? I seem to have no problems with multiple sounds playing.
B
157
S
114
G
8359
Posts: 42
Reputation: 4,188,239

Post » Sat Nov 17, 2012 5:31 pm

I'm using latest chrome on Win8 :/
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Sat Nov 17, 2012 7:37 pm

Quick fix would be to have a variable called SoundTimer that decreased by 1 every second until zero, each event that activated a sound would set the value of SoundTimer to the length of the audio clip in seconds; and all the sound events would have the conditional of SoundTimer = 0.

Didn't know C2 could only play one sound at a time though?
B
49
S
14
G
3
Posts: 540
Reputation: 5,611

Post » Sat Nov 17, 2012 9:28 pm

C2 has no problem playing many sounds at once.

Try preloading the audio and see if that helps.

If you don't overlap, they won't be in sync with the game if enemies are dying at the same time, but if you don't want overlap, just stop or fade the previous sound before triggering a new sound. You can assign tags to the audio to make this easier.
B
9
S
2
G
3
Posts: 75
Reputation: 1,964

Post » Sun Nov 18, 2012 8:40 pm

[QUOTE=Khalan] C2 has no problem playing many sounds at once.

Try preloading the audio and see if that helps.

If you don't overlap, they won't be in sync with the game if enemies are dying at the same time, but if you don't want overlap, just stop or fade the previous sound before triggering a new sound. You can assign tags to the audio to make this easier.[/QUOTE]

I'm going to look into this, I haven't really focused on audio yet, so I have lots of weird things I have to figure out. For a while, if i played music in the background, no audio would ever play for sound effects.

I think these things are all just me doing it wrong.
B
30
S
10
G
7
Posts: 416
Reputation: 7,239


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests