[C2] Play random sound effect

Get help using Construct 2

Post » Tue Nov 08, 2011 5:50 pm

Hi all, im new here.
Making games with Construct 2 is fun, but there are tons of things of which i have no idea how to do them. One of them is playing a random sound effect.

I've added two explosion sounds into my project. Im working on an Asteroids-ish game where you shoot enemies. When they are destroyed, there's an explosion. Now i want to add an explosion sound effect and let the game pick either one of them for variation sake.

How do i do that? It's probably very easy but i've only just picked up Construct 2.
B
6
G
2
Posts: 16
Reputation: 1,357

Post » Tue Nov 08, 2011 6:08 pm

Capx
I've commented it, it should be quite straightforward.

You need to adapt it to your project, but the idea is there.Kyatric2011-11-08 18:08:54
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Tue Nov 08, 2011 6:54 pm

Ah, yes, that makes sense. I guess it WAS very easy. :)

But!

When i add my own global variable and enter int(random(2)) in the value textbox, Construct 2 crashes when click the Done button:



It does this every time a try it again. What now? :(
B
6
G
2
Posts: 16
Reputation: 1,357

Post » Tue Nov 08, 2011 7:03 pm

@TheMightyAtom
This has already been reported numerous times in the 'Bugs' section, and is currently been dealt with.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,849
Reputation: 48,299

Post » Tue Nov 08, 2011 7:17 pm

Yeah, i found the thread in the Bugs forum right after i posted that.

I'll be waiting for a fix. :)
B
6
G
2
Posts: 16
Reputation: 1,357


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], Justin1967, qaisarehman and 31 guests