Page 1 of 1

Problem with custom sounds on map

Posted: August 30th, 2012, 2:49 am
by Ilya1996
Hello mappers, scripters, modders and usual users!

I have a problem with sound. I made script_origin with trigger.
Image

==SCRIPT_ORIGIN OPTIONS==
Key: targetname
Value: sound4sound

==TRIGGER OPTIONS==
Key: targetname
Value: trig_sound


I wroten in .gsc this:

Code: Select all

thread sounk();

sounk()
{
	trigger = getent("trig_sound", "targetname");
	sound = getent("soun4sound", "targetname");

	while(1)
	{
		trigger waittill("trigger");
		sound playsound("stopcamp");
	}
}

In folder sound i put music file (.mp3 format).

mp_graveyard.csv puted in soundalias folder. It's contents:

Code: Select all

name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage  
#place music

stopcamp,,band.mp3,0.75,0.9,,,,100,1300,voice,streamed,,looping,,mp_graveyard,,,,,,,,


Map started. I attained point with sound and... music not work. I changed the music file format, created a folder misc in the folder sound. But... Nothing helps. Tutorials not helps. I want that you help me. :(

Re: Problem with custom sounds on map

Posted: August 30th, 2012, 6:16 pm
by <LT>YosemiteSam[NL]
try this:

change this;

Code: Select all

stopcamp,,band.mp3,0.75,0.9,,,,100,1300,voice,streamed,,looping,,mp_graveyard,,,,,,,,
into this ;

Code: Select all

stopcamp,,SOUND/band.mp3,0.75,0.9,,,,100,1300,voice,streamed,,looping,,mp_graveyard,,,,,,,,
Where SOUND is the folder where the stopcamp sound is located.

Re: Problem with custom sounds on map

Posted: August 31st, 2012, 12:30 am
by Drofder2004

Code: Select all

sound = getent("soun4sound", "targetname");
May wish to check your spelling also.

Re: Problem with custom sounds on map

Posted: August 31st, 2012, 3:21 am
by Ilya1996
Drofder2004 wrote:

Code: Select all

sound = getent("soun4sound", "targetname");
May wish to check your spelling also.
you was be right! this is spelling. But sound not work.


Can you make a tutorial-map with scripts?

Re: Problem with custom sounds on map

Posted: August 31st, 2012, 12:12 pm
by RAGEQUiT
Just use " .wav " instead of mp3, works way better & you don´t need to put the soundfile into your iwd.
- Ok, first off go into your raw/sound folder and create a new folder called " mp_graveyard " ( i assume that is your map name ) & put band.wav into it.

change your soundalias :

Code: Select all

stopcamp,,mp_graveyard/band.wav,,1,na,0.95,1.05,100,400,,,,,,all_mp,,,,,,,,,,,50,100,0.55
Build Fastfiles & test .

Re: Problem with custom sounds on map

Posted: August 31st, 2012, 2:14 pm
by Rezil
It's for cod2, you have to put the sound in your .iwd. You can try using .wav for .mp3 though, it sometimes fixed sounds that weren't playing for me.

You can also try changing the channel to 'auto' in your .csv.

Re: Problem with custom sounds on map

Posted: August 31st, 2012, 2:36 pm
by RAGEQUiT
Rezil wrote:It's for cod2, you have to put the sound in your .iwd. You can try using .wav for .mp3 though, it sometimes fixed sounds that weren't playing for me ...
oh nvm, didn´t realise that this was for cod2 :p

Re: Problem with custom sounds on map

Posted: December 22nd, 2016, 1:41 pm
by IzNoGoD
Your sound gets started each frame, on the same channel each time. So you will not hear it.

Add a wait [lenth of sound] after the playsound.

Edit: sorry for the extreme necro.