Problem with custom sounds on map

Have questions about CoD2 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
Ilya1996
CJ Wannabe
CJ Wannabe
Posts: 5
Joined: August 7th, 2012, 4:06 pm

Problem with custom sounds on map

Post by Ilya1996 » August 30th, 2012, 2:49 am

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. :(

User avatar
<LT>YosemiteSam[NL]
Core Staff
Core Staff
Posts: 2155
Joined: December 7th, 2004, 2:07 am
Location: Netherlands
Contact:

Re: Problem with custom sounds on map

Post by <LT>YosemiteSam[NL] » August 30th, 2012, 6:16 pm

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.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Problem with custom sounds on map

Post by Drofder2004 » August 31st, 2012, 12:30 am

Code: Select all

sound = getent("soun4sound", "targetname");
May wish to check your spelling also.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Ilya1996
CJ Wannabe
CJ Wannabe
Posts: 5
Joined: August 7th, 2012, 4:06 pm

Re: Problem with custom sounds on map

Post by Ilya1996 » August 31st, 2012, 3:21 am

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?

User avatar
RAGEQUiT
CJ Newbie
CJ Newbie
Posts: 59
Joined: March 1st, 2011, 7:16 pm

Re: Problem with custom sounds on map

Post by RAGEQUiT » August 31st, 2012, 12:12 pm

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 .

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Problem with custom sounds on map

Post by Rezil » August 31st, 2012, 2:14 pm

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.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

User avatar
RAGEQUiT
CJ Newbie
CJ Newbie
Posts: 59
Joined: March 1st, 2011, 7:16 pm

Re: Problem with custom sounds on map

Post by RAGEQUiT » August 31st, 2012, 2:36 pm

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

IzNoGoD
CJ Worshipper
CJ Worshipper
Posts: 343
Joined: January 6th, 2009, 8:39 pm
Location: Netherlands/Holland

Re: Problem with custom sounds on map

Post by IzNoGoD » December 22nd, 2016, 1:41 pm

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.
LMGTFY!

Its not a glitch... Its the future!

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests