How do I add background music?

Get help using Construct 2

Post » Thu Jun 09, 2016 2:08 pm

I really need background music, sound effects too! :oops:
B
6
Posts: 46
Reputation: 336

Post » Thu Jun 09, 2016 2:22 pm

@Armouredank
Insert New Object > "Media" Audio

In your project folder on the right > Musicfolder or Soundsfolder you can import Sounds
B
20
S
2
G
1
Posts: 19
Reputation: 1,004

Post » Thu Jun 09, 2016 2:27 pm

I already imported sounds. But its not playing.
B
6
Posts: 46
Reputation: 336

Post » Thu Jun 09, 2016 2:29 pm

Armouredank wrote:I already imported sounds. But its not playing.

Event sheet.. on start layout > play : your song name
B
13
S
5
G
4
Posts: 119
Reputation: 3,353

Post » Fri Jun 10, 2016 6:09 am

Armouredank wrote:I really need background music, sound effects too! :oops:


By the way, this may be early but put your music in the sound folder as well.
Intel XDK has a trouble of detecting anything in the music folder so all sounds in the music folder will not be played on a real device when you export the game.
Image Image Image
B
31
S
11
G
27
Posts: 748
Reputation: 17,093

Post » Fri Jun 10, 2016 6:13 am

after you have inserted Audio Plugin
then
>>>>>>>>>>>
on start of the layout >>>
sub event
if "BG_Music" is not playing > play "BG Music"
>>>>>>>>>>>
Note:
1) is not playing can be done by inverting the condition >> is playing
2) purpose for doing in sub event is, if we do only >> on start of the layout >> play "BG Music" >> This will play your music every restart of other layout and your "BG music" will play more than 1 time , depend on how many time you restart layout
Last edited by luckyrawatlucky on Fri Jun 10, 2016 6:17 am, edited 1 time in total.
Image
B
64
S
39
G
46
Posts: 656
Reputation: 32,728

Post » Fri Jun 10, 2016 6:16 am

luckyrawatlucky wrote:after you have inserted Audio Plugin
then
>>>>>>>>>>>
on start of the layout >>>
sub event
if "BG_Music" is not playing > play "BG Music"
>>>>>>>>>>>
Note: is not playing can be done by inverting the condition >> is playing


This is neat, I always used "on start of layout -> Play X" but it didnt always work, thanks
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Fri Jun 10, 2016 8:34 am

Inverting? how does that work?
B
6
Posts: 46
Reputation: 336

Post » Fri Jun 10, 2016 8:44 am

Wait a second. Is it because my sounds are mp3s?
B
6
Posts: 46
Reputation: 336

Post » Fri Jun 10, 2016 8:45 am

It works fine for me
>>>>>
on start of the layout when "BG Music" is not playing than action will be fired and "BG Music" will play
after that on every start of the layout when "BG Music" is already playing than their is not action to be fired
So "BG Music" will play continuously
If you do not invert it every restart it wil play "BG Music" and "BG Music" will be playing twice, thrice at a single time
Image
B
64
S
39
G
46
Posts: 656
Reputation: 32,728

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 51 guests