Page 1 of 1

custom wav file not working?

Posted: Sat Oct 25, 2014 2:30 am
by [SMUG]Ipecac
Hey I found a post from GR1 that says i can:

playSound("mod_assets/sounds/sound_name.wav")

I put a wav file in there and called for it, but it says no sound exists? anyone know what I need to do here?

Re: custom wav file not working?

Posted: Sat Oct 25, 2014 3:46 am
by DrKojak
.wav sound files need to be 44,100 Hz, 16 bit and mono (you can do this in Audacity) otherwise they will not even load.
.ogg music files only need to be 44,100 Hz as far as i know. and can be stereo

http://grimwiki.net/wiki/Custom_Sound_Tutorial here's a handy tutorial/guide

the entry in your sounds text file (in the scripts folder) also needs to look like this
Image

Additionally, in-game you can create a 'sound' asset, then un-tick 'sound' in the inspector and have a trigger that, when pressed, it will activate the sound.

Re: custom wav file not working?

Posted: Sat Oct 25, 2014 5:07 am
by [SMUG]Ipecac
Ah okay. Ive avoided those .lua things! Thanks for the direction.

Re: custom wav file not working?

Posted: Sat Oct 25, 2014 8:14 am
by [SMUG]Ipecac
got it! Thanks :)