[problem] Can't hear sound playing

Discussion and feedback on Construct 2

Post » Thu Dec 19, 2013 5:36 am

So I have my program setup to play one of three sounds when a button is pressed, but the problem is that in preview mode, I can't hear the sounds. I've tried it at different volumes, but nothing. In bug mode I noticed that the cpu usage resets, so the button is doing something.

https://drive.google.com/file/d/0B0gf0yi2MHX3UVhOYmtsYlRzczA/edit?usp=sharing
B
7
S
2
G
1
Posts: 28
Reputation: 881

Post » Thu Dec 19, 2013 5:50 am

You need to use floor(random(1,4)

This will choose the number 1, 2 or 3 like you want. If you don't use floor then you will get back decimals like 1.2333452 which is why your Tone = 1 would never (well almost never) be true.

Also, you need to add the condition "Trigger once while true" to your audio triggers (and Start trigger as well, in your case), or else the audio will start to play a new instance every tick rather then just once.Burvey2013-12-19 05:59:57
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Thu Dec 19, 2013 6:21 am

How do I go about adding that "Trigger once while true" condition?
B
7
S
2
G
1
Posts: 28
Reputation: 881

Post » Thu Dec 19, 2013 11:51 am

We will tell just, just please... That profile picture... Please no.

System > Trigger once while true.
Also, you could try choose(1,2,3,4) as this works decently enough for when you don't have too many options.Stiivais2013-12-19 11:52:13
B
10
S
1
Posts: 163
Reputation: 1,436


Return to Construct 2 General

Who is online

Users browsing this forum: NadeemAbbass and 5 guests