Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 57 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Sound thing
z0d
General Member
Since: Apr 29, 2012
Posts: 33
Last: May 8, 2013
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Tuesday, Aug. 28, 2012 06:36 pm
Uhm, I have a problem with sound. I want to playsoundonplayers with some sound from singleplayer. I have tried using move in sound and it worked but it didn't work when I used SP sound.


in sd.gsc:
Code:
playsoundstart()
{
	wait 2;
	
	level playSoundOnPlayers("hill400_assault_gr5_letsgoget");
}

, sound in sound folder (got all same folders as it is in sound source .iwd file)
and added iw_voiceovers2.csv (which contains my sound) in soundaliases. any idea why it doesnt't work?

edited on Aug. 28, 2012 11:36 am by z0d
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Tuesday, Aug. 28, 2012 06:48 pm
developer 1?

any crashes?
Share |
z0d
General Member
Since: Apr 29, 2012
Posts: 33
Last: May 8, 2013
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Tuesday, Aug. 28, 2012 06:49 pm
well, server does work but just doesn't make any sound
Share |
z0d
General Member
Since: Apr 29, 2012
Posts: 33
Last: May 8, 2013
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Tuesday, Aug. 28, 2012 07:17 pm
hill400assault_gr5_sc03_01_t1.wav (sound) is in folders: sound\Voiceovers\US\400Assault\hill400assault_gr5_sc03_01_t1.wav

and its line in .csv (soundaliases) is - hill400_assault_gr5_letsgoget,,Voiceovers/US/400Assault/hill400assault_gr5_sc03_01_t1.wav,0.99,0.99,voiceover,,,360,6000,voice,streamed,,,master,duhoc_assault duhoc_town hill400_assault,SUBTITLE_HILL400_ASSAULT_GR5_LETSGOGET,,walla_american_small

i tried using hill400assault_gr5_sc03_01_t1 name and hill400_assault_gr5_letsgoget - both ways it doesn't work
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Tuesday, Aug. 28, 2012 07:20 pm
There is no such function as playSoundOnPlayers(). Not as a built-in function; nor is it in maps\_utility.gsc. That is where your problem lies. Check out the COD2 Script Documentation for a list of all the sound functions.
Share |
z0d
General Member
Since: Apr 29, 2012
Posts: 33
Last: May 8, 2013
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Tuesday, Aug. 28, 2012 07:24 pm
playsoundonplayers is used in all gametypes etc etc. i even used it for "move in" sound and it worked.
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Tuesday, Aug. 28, 2012 08:13 pm
z0d writes...
Quote:
playsoundonplayers is used in all gametypes etc etc. i even used it for "move in" sound and it worked.


First of all, I thought this was for Single Player.

Second of all, where are you running the function from? Is it in a gametype file? If not, then you will either have to copy it into your custom GSC file, or thread to it:

Code:
maps\mp\gametypes\tdm::playSoundOnPlayers( < alias name > );


Thirdly, you will need to create a custom soundalias file, as the SP one you are trying to use has loadspecs which will only work for stipulated SP maps. You need to replace those stipulated maps with all_mp. like this:

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

hill400_assault_gr5_letsgoget,,,Voiceovers/US/400Assault/hill400assault_gr5_sc03_01_t1.wav,0.99,0.99,voiceover,,,360,6000,voice,streamed,,master,all_mp,,, ,,,,,
Share |
z0d
General Member
Since: Apr 29, 2012
Posts: 33
Last: May 8, 2013
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Wednesday, Aug. 29, 2012 08:26 am
function is in sd gametype but im calling it from some other gsc

just tell me if ill make my own soundalias, will people who doesn't have mod downloaded be able to hear it? and do i need to have that sound in sound folder or no?
Share |
z0d
General Member
Since: Apr 29, 2012
Posts: 33
Last: May 8, 2013
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Wednesday, Aug. 29, 2012 10:47 am
Okay, i made it and it works. i havent used line u gave me but some line ive found in some music/sound mod.

Code:
hill400_assault_gr5_letsgoget,,,Voiceovers/US/400Assault/hill400assault_gr5_sc03_01_t1.wav,1,1,,,,1000000,,auto,streamed


there is no need to have sound in sound folder since its already in .iwd folder but problem is, it doesnt work if u dont have mod downloaded. so is there a way which might let you hear sound without downloading mod?

p.s. when i added your line, i got error:

ERROR: Sound alias file iw_soun2.csv: Unknown sound channel 'streamed'; should be auto, auto2d, menu, weapon, voice, item, body, local, music,
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»