Have you checked whether the playlocalsound script is actually being called?
Printable View
Have you checked whether the playlocalsound script is actually being called?
Ummm , I added the playlocalsound in sd.gsc into spawnPlayer() function so that's must being called when player spawned... after the playlocalsound I wrote iprintlnBold("Music playing") and that's working ... but I didn't hear any sound.
Could be some things:
- Soundalias pointing to a non-existing sound in "sounds" folder -> check the "file" column points to the right file (also, in console you should see an error like "Couldn't find sound xxxxx.mp3"
- Sound being overlapped by another sound which is also played in the same channel (eg. if you play music on the local channel and then shoot your weapon, it might kill the previous sound)-> try using another channel, I'd say "auto".
- Problem with the sound itself: I had trouble months ago with some sounds, apparently it happened because they were being played at 48Khz and in stereo channel; changing the frequency to 44KHz, forcing them to be mono, and making sure they are at least 4 seconds-length (you can generate silence), with the help of an audio editing program (eg. Audacity) fixed it. Just check out how sounds from other mods (or stock ones) are, and edit yours like them.
make sure your folder structure is correct, with the examples posted here your folders should look like this:
modfoldername(preffered) or main / sound / music / soundfile.xxx
and offcourse the csv in the soundaliases folder with the header too
here is a snippet of my file if it looks like this and is placed like described it should work ("my folder name here is fmj")
name,sequence,file,vol_min,vol_max,vol_mod,pitch_m in,pitch_max,dist_min,dist_max,channel,type,probab ility,loop,masterslave,loadspec,subtitle,compressi on,secondaryaliasname,volumefalloffcurve,startdela y,speakermap,reverb,lfe percentage
deathx,1,fmj/death01.mp3,1,1,,,,1000000,,auto,streamed
deathx,2,fmj/death02.mp3,1,1,,,,1000000,,auto,streamed
deathx,3,fmj/death03.mp3,1,1,,,,1000000,,auto,streamed
deathx,4,fmj/death04.mp3,1,1,,,,1000000,,auto,streamed
deathx,5,fmj/death05.mp3,1,1,,,,1000000,,auto,streamed
deathx,6,fmj/death06.mp3,1,1,,,,1000000,,auto,streamed
deathx,7,fmj/death07.mp3,1,1,,,,1000000,,auto,streamed
deathx,8,fmj/death08.mp3,1,1,,,,1000000,,auto,streamed
deathx,9,fmj/death09.mp3,1,1,,,,1000000,,auto,streamed
:)
just do randomint maybe?