Replace an audio file

Get help using Construct 2

Post » Sat Feb 22, 2014 3:50 am

Kind of annoyed how this isn't easier to do... but maybe I'm missing something:

I am trying to change audio files for a number of sound effects I have... however, everytime I delete the file in the project browser, it deletes ALL of my events and actions that I have with that specific sound effect. In order to combat this, I've tried replacing the actual sound files, rather than within construct... yet for some reason, Construct has those sound files loaded into memory, so they don't 'update' unless you restart Construct.

Is there a simpler way to replace sound effects, without having to re enter all of your events and actions? You'd figure right click - replace file would be an option...

I guess I could always change all of my events\actions to "Play (by name)" rather than by object... but I've already made my game... to go through the entire thing and change this, would still be a lot of work.

Any ideas?
B
47
S
15
G
3
Posts: 201
Reputation: 4,625

Post » Sat Feb 22, 2014 3:58 am

Yes, What i do is I go in upload the new sound. Change all the triggers that has the old to the new then remove the old.
B
14
S
4
G
1
Posts: 61
Reputation: 1,459

Post » Sat Feb 22, 2014 4:18 am

CampingCarl wrote:Yes, What i do is I go in upload the new sound. Change all the triggers that has the old to the new then remove the old.


Problem is, my game has over 4,000 events... going through each event to see which one has my specific audio file that I changed would take hours.
B
47
S
15
G
3
Posts: 201
Reputation: 4,625

Post » Sat Feb 22, 2014 4:29 am

sadly i'm not home to test a theary of replacing the file that is saved by constuct.
B
14
S
4
G
1
Posts: 61
Reputation: 1,459

Post » Mon Mar 03, 2014 4:45 am

bump, yes this is exactly what i'm facing.. i have an sound effect that is being called on in many different places. in hindsight i might have been able to make it more modular with layout sheets, but i didn't.

Thinking about it a little as i was writing this, I think I have an approach that should work.. normally i save files as a capx.. nice and neat.. but its a single file.. not something you can really poke / prod in too much i imagine..

yes i just tested it and this will do the trick.. simply save the project as "a project". save this in a new folder of whatever name.. in this project folder you'll see that all of the files audio / visual are in there able to be opened and modified.. go in.. fix up the audio tracks (don't change names.. or overwrite the existing ones with different sounds) and then save the project..

reload that edited project and then go back to saving as capx files and you should be good to go.
B
59
S
9
G
1
Posts: 942
Reputation: 6,553

Post » Mon Mar 03, 2014 8:13 am

Hi @Nitro187

I wouldn't bother notifying C2 that you're changing the files. Audio is being kept as-is, so you can just replace your audio ogg etc files in /Files project subfolder with new ones, and C2 will use the new versions automatically. Of course, it is easiest if you use .cap rather than .capx.

And, you need to replace all audio formats for a given file.
B
18
S
3
G
3
Posts: 83
Reputation: 3,736

Post » Mon Mar 03, 2014 2:46 pm

The only problem with all of that, is the fact that you have to close C2 completely before replacing said audio files, as C2 holds them in memory and doesn't know you changed them, unless you re-load the project.

Regardless, it doesn't matter... I spent a couple of hours and went through my project and changed everything to "Play (name of object)" rather than Play Object. Much easier now.
B
47
S
15
G
3
Posts: 201
Reputation: 4,625

Post » Sat Apr 26, 2014 12:59 am

Bump - I agree...there should be a replace sound file option.
B
33
S
7
G
8
Posts: 312
Reputation: 8,528


Return to How do I....?

Who is online

Users browsing this forum: adventurist, Artcadev, Baidu [Spider], Blendi1223, PROxMTswatTR and 25 guests