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: Sounds are not working.
Zelzahim
General Member
Since: Dec 31, 2008
Posts: 42
Last: Sep 23, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Tuesday, Jun. 9, 2009 11:40 am
Good evening gents.

I have a rather delicious problem here, im building a "Hill" map and at one crossing over the river which is guarded by bunkers the peeps in the bunker will be able to call in artillery barrage on the crossing.

Damage and fx's works just fine, but the sounds don't. I would love to have sounds aswell because otherwise it'd just be lame.

I don't get any errors or something they just dont play. So, here's my scripts.

My artbarrage_b1.gsc

Code:
main227750">()
227750">{

level227750">._effect227750">["Arthit_gnd"227750">] 227750">= loadfx227750">("fx/explosions/artilleryExp_dirt_brown.efx"227750">);
level227750">._effect227750">["Arthit_water"227750">] 227750">= loadfx227750">("fx/explosions/mortarExp_water_rhine.efx"227750">);
level227750">._effect227750">["impact_mud"227750">] 227750">= loadfx227750">("fx/impacts/large_mud.efx"227750">);

227750">thread barrage227750">();

227750">}
barrage227750">()
227750">{

trig 227750">= getent 227750">("trig_b1"227750">,"targetname"227750">);
sounds 227750">= getent 227750">("b1_sound"227750">,"targetname"227750">);
radio 227750">= getent 227750">("radio"227750">,"targetname"227750">);

hit1 227750">= getent 227750">("artstr_b1_7"227750">,"targetname"227750">);
hit2 227750">= getent 227750">("artstr_b1_6"227750">,"targetname"227750">);
hit3 227750">= getent 227750">("artstr_b1_1"227750">,"targetname"227750">);
hit4 227750">= getent 227750">("artstr_b1_3"227750">,"targetname"227750">);
hit5 227750">= getent 227750">("artstr_b1_5"227750">,"targetname"227750">);
hit6 227750">= getent 227750">("artstr_b1_4"227750">,"targetname"227750">);
hit7 227750">= getent 227750">("artstr_b1_2"227750">,"targetname"227750">);

trig waittill trigger227750">();

radio playsound227750">("radiosound"227750">);

wait 227750">(5227750">);

hit1 227750">= hit1 getorigin227750">();
hit2 227750">= hit2 getorigin227750">();
hit3 227750">= hit3 getorigin227750">();
hit4 227750">= hit4 getorigin227750">();
hit5 227750">= hit5 getorigin227750">();
hit6 227750">= hit6 getorigin227750">();
hit7 227750">= hit7 getorigin227750">();

227750">//explosioner

227750">//1

hit1 playsound227750">("incoming"227750">);
waittill 227750">("movedone"227750">);

hit1 playsound227750">("explosion"227750">);
playfx227750">(level227750">._effect227750">["Arthit_gnd"227750">], hit1227750">);
playfx227750">(level227750">._effect227750">["impact_mud"227750">], hit1227750">);
earthquake227750">(0227750">.3227750">, 3227750">, hit2227750">, 5000227750">);
radiusDamage227750">(hit2227750">, 4000227750">, 8000227750">, 1000227750">);

wait 227750">(2227750">);

227750">//2

playfx227750">(level227750">._effect227750">["Arthit_gnd"227750">], hit2227750">);
playfx227750">(level227750">._effect227750">["impact_mud"227750">], hit2227750">);
earthquake227750">(0227750">.3227750">, 3227750">, hit2227750">, 5000227750">);
radiusDamage227750">(hit2 4000227750">, 8000227750">, 1000227750">);

wait 227750">(1227750">);

227750">//3

playfx227750">(level227750">._effect227750">["Arthit_water"227750">], hit3227750">);
playfx227750">(level227750">._effect227750">["impact_mud"227750">], hit3227750">);
earthquake227750">(0227750">.3227750">, 3227750">, hit3227750">, 5000227750">);
radiusDamage227750">(hit3 4000227750">, 8000227750">, 1000227750">);

227750">//4

playfx227750">(level227750">._effect227750">["Arthit_gnd"227750">], hit4227750">);
earthquake227750">(0227750">.3227750">, 3227750">, hit4227750">, 5000227750">);
radiusDamage227750">(hit4 4000227750">, 8000227750">, 1000227750">);

wait 227750">(1227750">);

playfx227750">(level227750">._effect227750">["Arthit_gnd"227750">], hit5227750">);
playfx227750">(level227750">._effect227750">["impact_mud"227750">], hit5227750">);
earthquake227750">(0227750">.3227750">, 3227750">, hit5227750">, 5000227750">);
radiusDamage227750">(hit5 4000227750">, 8000227750">, 1000227750">);

wait 227750">(1227750">);

playfx227750">(level227750">._effect227750">["Arthit_gnd"227750">], hit6227750">);
playfx227750">(level227750">._effect227750">["impact_mud"227750">], hit6227750">);
earthquake227750">(0227750">.3227750">, 3227750">, hit6227750">, 5000227750">);
radiusDamage227750">(hit6 4000227750">, 8000227750">, 1000227750">);

playfx227750">(level227750">._effect227750">["Arthit_water"227750">], hit7227750">);
earthquake227750">(0227750">.3227750">, 3227750">, hit7227750">, 5000227750">);
radiusDamage227750">(hit7 4000227750">, 8000227750">, 1000227750">);

wait 227750">(10227750">);

227750">}


And then my. csv file.

Code:
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

#Ambiance,,,,,,,,,,,,,,,,,,,,,,,

radiosound,,radio/germanradio1.wav,1,,,,,50,500,auto,streamed,,looping,,
incoming,,Explosions/incoming06.wav,1,,,,,150,3000,auto,,,nonlooping,,,,,,,,,,
explosion,,Explosions/mortar_dirt06.wav,1,,,,,150,3000,auto,,,nonlooping,,,,,,,,,,


Save me, Jeebus!
Share |
Zelzahim
General Member
Since: Dec 31, 2008
Posts: 42
Last: Sep 23, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Tuesday, Jun. 9, 2009 02:33 pm
Anyone?
Share |
Zelzahim
General Member
Since: Dec 31, 2008
Posts: 42
Last: Sep 23, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Wednesday, Jun. 10, 2009 06:46 am
Bump yet again, someone must be able to help me around here.
Share |
Zelzahim
General Member
Since: Dec 31, 2008
Posts: 42
Last: Sep 23, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Jun. 12, 2009 05:19 am
And for the glory of still-not-working-sounds, bump.
Share |
scillman
General Member
Since: Nov 23, 2006
Posts: 360
Last: Sep 1, 2012
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Friday, Jun. 12, 2009 06:08 am
Did you take a look into the console?!

P.S. try setting min-volume on 0.9 and max-volume on 1
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Jun. 12, 2009 06:32 am
There seem to be a couple of errors in your soundalias, as the sounds dont seem to be playing on the right bus channel.

Here is what I believe will work:

Code:
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

#Ambiance,,,,,,,,,,,,,,,,,,,,,,,

radiosound,,radio/germanradio1.wav0.4,0.5,,0.9,1.1,1,300,auto,streamed,,looping,,all_mp,,,,,,,,
incoming,,Explosions/incoming06.wav,0.5,0.65,explosion,0.9,0.9,1000,8000,,streamed,,,0.7,,,,,,,,,
explosion,,Explosions/mortar_dirt06.wav,0.5,0.65,explosion,0.9,0.9,1000,8000,,streamed,,,0.7,,,,,,,,,



Also, your code could do with some sprucing up. Try this instead:

Code:
main227750">()
227750">{

	level227750">._effect227750">["Arthit_gnd"227750">] 227750">= loadfx227750">("fx/explosions/artilleryExp_dirt_brown.efx"227750">);
	level227750">._effect227750">["Arthit_water"227750">] 227750">= loadfx227750">("fx/explosions/mortarExp_water_rhine.efx"227750">);
	level227750">._effect227750">["impact_mud"227750">] 227750">= loadfx227750">("fx/impacts/large_mud.efx"227750">);

	227750">thread barrage227750">();

227750">}

barrage227750">()
227750">{

	trig 227750">= getent 227750">("trig_b1"227750">,"targetname"227750">);
	sounds 227750">= getent 227750">("b1_sound"227750">,"targetname"227750">);
	radio 227750">= getent227750">("radio"227750">,"targetname"227750">);

	hit1 227750">= getent 227750">("artstr_b1_7"227750">,"targetname"227750">);
	hit2 227750">= getent 227750">("artstr_b1_6"227750">,"targetname"227750">);
	hit3 227750">= getent 227750">("artstr_b1_1"227750">,"targetname"227750">);
	hit4 227750">= getent 227750">("artstr_b1_3"227750">,"targetname"227750">);
	hit5 227750">= getent 227750">("artstr_b1_5"227750">,"targetname"227750">);
	hit6 227750">= getent 227750">("artstr_b1_4"227750">,"targetname"227750">);
	hit7 227750">= getent 227750">("artstr_b1_2"227750">,"targetname"227750">);

	trig waittill trigger227750">();

	radio playLoopSound227750">("radiosound"227750">);

	wait 227750">(5227750">);

	227750">//explosioner

	227750">//1

	hit1 playsound227750">("incoming"227750">);
	
	waittill227750">("movedone"227750">);

	hit1 playsound227750">("explosion"227750">);
	playfx227750">( level227750">._effect227750">["Arthit_gnd"227750">], hit1227750">.origin 227750">);
	playfx227750">( level227750">._effect227750">["impact_mud"227750">], hit1227750">.origin 227750">);
	earthquake227750">( 0227750">.3227750">, 3227750">, hit2227750">.origin227750">, 5000 227750">);
	radiusDamage227750">( hit2227750">.origin227750">, 4000227750">, 8000227750">, 1000 227750">);

	wait 227750">(2227750">);

	227750">//2

	playfx227750">( level227750">._effect227750">["Arthit_gnd"227750">], hit2227750">.origin 227750">);
	playfx227750">( level227750">._effect227750">["impact_mud"227750">], hit2227750">.origin 227750">);
	earthquake227750">(0227750">.3227750">, 3227750">, hit2227750">.origin227750">, 5000227750">);
	radiusDamage227750">(hit2227750">.origin227750">, 4000227750">, 8000227750">, 1000227750">);

	wait 227750">(1227750">);

	227750">//3

	playfx227750">(level227750">._effect227750">["Arthit_water"227750">], hit3227750">.origin227750">);
	playfx227750">(level227750">._effect227750">["impact_mud"227750">], hit3227750">.origin 227750">);
	earthquake227750">(0227750">.3227750">, 3227750">, hit3227750">.origin227750">, 5000227750">);
	radiusDamage227750">(hit3227750">.origin227750">, 4000227750">, 8000227750">, 1000227750">);

	227750">//4

	playfx227750">(level227750">._effect227750">["Arthit_gnd"227750">], hit4227750">.origin227750">);
	earthquake227750">(0227750">.3227750">, 3227750">, hit4227750">.origin227750">, 5000227750">);
	radiusDamage227750">(hit4227750">.orign227750">, 4000227750">, 8000227750">, 1000227750">);

	wait 227750">(1227750">);

	playfx227750">(level227750">._effect227750">["Arthit_gnd"227750">], hit5227750">.origin227750">);
	playfx227750">(level227750">._effect227750">["impact_mud"227750">], hit5227750">.origin227750">);
	earthquake227750">(0227750">.3227750">, 3227750">, hit5227750">.origin227750">, 5000227750">);
	radiusDamage227750">(hit5 4000227750">, 8000227750">, 1000227750">);

	wait 227750">(1227750">);

	playfx227750">(level227750">._effect227750">["Arthit_gnd"227750">], hit6227750">.origin227750">);
	playfx227750">(level227750">._effect227750">["impact_mud"227750">], hit6227750">.origin227750">);
	earthquake227750">(0227750">.3227750">, 3227750">, hit6227750">.origin227750">, 5000227750">);
	radiusDamage227750">(hit6227750">.origin227750">, 4000227750">, 8000227750">, 1000227750">);

	playfx227750">(level227750">._effect227750">["Arthit_water"227750">], hit7227750">.origin227750">);
	earthquake227750">(0227750">.3227750">, 3227750">, hit7227750">.origin227750">, 5000227750">);
	radiusDamage227750">(hit7227750">.origin227750">, 4000227750">, 8000227750">, 1000227750">);

	wait 227750">(10227750">);

227750">}


Once you've gotten an entity with getEnt() (or getEntArray()) there is no need to get its origin again with getOrigin(), as its redundant.

Also, if you use getOrigin(), and you move an entity, you need to get the origin again after the move, as the getorigin() funtion only returns the current origin, whereas the game will "track" the entity with getEnt() and then use its origin flag there after - ent.origin will always return its origin whether or not its been moved or not.

edited on Jun. 12, 2009 02:36 am by DemonSeed
Share |
Zelzahim
General Member
Since: Dec 31, 2008
Posts: 42
Last: Sep 23, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, Jun. 13, 2009 05:27 pm
Thanks for your time, it didnt work tho.

maybe it isn't the script that's wrong, it could be some weird setting or something?
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

»