Have you checked whether the playlocalsound script is actually being called?
Have you checked whether the playlocalsound script is actually being called?
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
kung foo man (17th November 2020)
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.
kung foo man (17th November 2020)
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.
Last edited by pollo; 16th November 2020 at 01:00.
kung foo man (17th November 2020)
PHP Code:
class CoronaVirus
{
CoronaVirus(int m = 1): multi(m) { Peoples.RandomDeaths(m); }
~CoronaVirus() { CoronaVirus * again = new CoronaVirus((this->multi * 2)); }
int multi = 1;
} y_2020;
kung foo man (17th November 2020)
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
kung foo man (17th November 2020)
Last edited by maxdamage99; 17th November 2020 at 13:09.
PHP Code:
class CoronaVirus
{
CoronaVirus(int m = 1): multi(m) { Peoples.RandomDeaths(m); }
~CoronaVirus() { CoronaVirus * again = new CoronaVirus((this->multi * 2)); }
int multi = 1;
} y_2020;
just do randomint maybe?