updating sounds IS A JOKE!

Discussion and feedback on Construct 2

Post » Sun Jul 06, 2014 11:32 pm

Sethmaster wrote:Why don't you skip all that and just use the Play (by name) option in the audio? I am using that for futureproofing since my past projects have the issues that the thread starter is speaking of. Especially when you team up with a competent audiobro who keep doing iteration to improve the overall music atmosphere. What I find out is that if you use Play (by name), you can delete the previous audio file and put in a new one without any difficulty at all.


That would also work. I like to be able to try out a bunch of different sounds by having them all imported into C2 at the same time and then trying back-to-back comparisons. Using a dictionary allows me to do that by changing just one reference.
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,245
Reputation: 46,464

Post » Sun Jul 06, 2014 11:37 pm

Just come up with an iterative naming scheme. Something like play by name "soundfx"&myVariable.
Image ImageImage
B
170
S
50
G
179
Posts: 8,379
Reputation: 113,427

Post » Mon Jul 07, 2014 7:17 pm

ok! Ashley has responded to the re-importing sounds and sprites problem in another thread... so hopefully soon we will all be saving a load of time and pain...

Its very impressive that Ashley is so active in the forums and listens to our problems... credit to him.
B
7
S
2
Posts: 16
Reputation: 771

Post » Mon Jul 07, 2014 7:51 pm

Jayjay and Colludium's solutions are the best, depending on what you want to accomplish. Still, it's a shame that we can't have an option to right-click and replace a sound...
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Mon Jul 07, 2014 10:07 pm

Colludium wrote:For what it's worth, I heard some very good advice on this subject a while ago. Use a Dictionary object and set a key to the audio file name you want to play. Then, to play sounds, select "Play (by name)" and get the file name from the key value that you set earlier. Then, if you need to update an audio file, all you need to do is import the new audio file and change the name in the appropriate Dictionary key. The old file(s) can be deleted and you won't need to find every audio command in your game events to change the reference. For example:

audio filename linking.png



That's one way. You can also just make a function, so there is only one play event per sound.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Post » Mon Jul 07, 2014 11:08 pm

^^ Now that's a good idea! Thanks @megatronx - and just before I started to put sounds in (phew)!
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,245
Reputation: 46,464

Post » Tue Jul 08, 2014 1:49 am

Colludium wrote:^^ Now that's a good idea! Thanks @megatronx - and just before I started to put sounds in (phew)!

You're welcome :)
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 16 guests