Stop the audio

Get help using Construct 2

Post » Sat May 25, 2013 1:31 am


Hello,
I'm using a sound for the game, and I've put it like this:
-> System-> On start of layout-> audio-> play (music that is)
Now what I want when I get out of this layout, the sound stops.
I've proven the opposite:
-> System-> On end of layout-> ...
But it does not stop, can you say me some solution?
Thank you.
B
11
Posts: 26
Reputation: 1,147

Post » Sat May 25, 2013 11:30 pm

Hey,

Well, if I am not mistaken you have to do the following:

(assuming you have imported the sound file correctly) let's say that the audio file is named "music"...

                               Conditions -> Actions

1) System/On start of Layout -> Audio/Play
                               (Audio file)- select: music
                               (Loop) - choose what ever you want
                               (Volume) - "0" is the original volume of the sound file
                               (Tag) - important! give it a tag, let's say "soundtrack". Leave the quotes.

To stop the particular sound:

2) System/On end of layout -> Audio/Stop
                               (Tag)- "soundtrack".

That's it!
composer - multimedia artist
www.eli0s.com/en/
B
53
S
21
G
3
Posts: 1,127
Reputation: 8,095

Post » Mon May 27, 2013 9:47 am


That's what I'm doing does not work.
That is, the expose here, that is no longer where the error may be, or what may be the solution.
You do not know another way to put the audio, so you can try to remove it otherwise?.
Thank you.
B
11
Posts: 26
Reputation: 1,147

Post » Fri May 31, 2013 11:55 pm


Nobody gives me a solution to stop the sound?, Someone happened something?
B
11
Posts: 26
Reputation: 1,147

Post » Sat Jun 01, 2013 12:14 am

Post your CAPX see we can see what you are doing.
ImageImageImage
B
67
S
19
G
123
Posts: 3,209
Reputation: 73,905

Post » Mon Jun 03, 2013 11:54 am



I leave CapX lionk discharge, so you can see where the error can be

https://dl.dropboxusercontent.com/u/127488641/construct2/Naves%202D.capx
B
11
Posts: 26
Reputation: 1,147

Post » Mon Jun 03, 2013 12:11 pm

Hi @fumeque,

I looked at your capx, and you just needed to 'Tag' your sound with the same name you're calling in the stop action (i.e. Tag = "Sonido de Timbre pner en juegos").

Here's your update project (capx fixed)

Hope that helps :)Blacksmith2013-06-03 12:19:04
B
32
S
6
G
7
Posts: 489
Reputation: 8,217

Post » Fri Jun 07, 2013 5:10 pm


Solved.
thank you very much
B
11
Posts: 26
Reputation: 1,147

Post » Fri Jun 07, 2013 6:29 pm

I am reminded of one thing. Since you have the CapX, haveis seen that I have a heart shaped objects?, I want to do is that when you destroy a ship is discounted a heart, it would be each of the lives.
How I can do?
Thank you.
B
11
Posts: 26
Reputation: 1,147

Post » Wed Jul 17, 2013 6:16 pm

eli0s- TY!!!! Nice outline. Works like a charm. Now, if I could just stop misplacing all of my code.

[QUOTE=eli0s] Hey,
                               Conditions -> Actions
1) System/On start of Layout -> Audio/Play
                               (Audio file)- select: music
                               (Loop) - choose what ever you want
                               (Volume) - "0" is the original volume of the sound file
                               (Tag) - important! give it a tag, let's say "soundtrack". Leave the quotes.
To stop the particular sound:
2) System/On end of layout -> Audio/Stop
                               (Tag)- "soundtrack".

That's it! [/QUOTE]
Squirrely12013-07-17 18:17:18
B
16
S
2
G
1
Posts: 35
Reputation: 1,033

Next

Return to How do I....?

Who is online

Users browsing this forum: marekmk and 3 guests