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

Members Online

»
0 Active | 7 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

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: loop a sound in particular area
Jednite
General Member
Since: Jul 16, 2007
Posts: 226
Last: Jul 26, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Wednesday, Aug. 1, 2007 03:59 am
Does anyone know how I could script this?

I have this small room, and it hasLight, which I gave the targetname of radio.

I want it to play a continuous song, but I can't figure out what script to right. I tried


{
radio = getent ("radio", "targetname");
radio playsound("burningbridges")
}
but it was a no go.
any idea?

Also, for some reason, no sounds work on my map! The piano tutorial, I used it on one map and it worked fine. Exact same thing on this map and it does NOT work.

But it cant be the map, because my exploding barrels work, and the sounds are from the iwd file, just like in the piano.

Also, my trigger to sound wont work either! It doesn't give me an error, it acts as if everything is correct, but no sound!
Share |
hansgrubber
General Member
Since: Aug 7, 2004
Posts: 196
Last: Jul 6, 2009
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Wednesday, Aug. 1, 2007 05:37 am
This is what I used for a radio in my map that looped sound.

getent ("radiosound","targetname") playloopsound ("radio_station");

You got to use a script entiy in map where you want the sound
,mine was named "radio_sTation" and the music file it played was "radio_sound".You also have to have a csv file.
Share |
Jednite
General Member
Since: Jul 16, 2007
Posts: 226
Last: Jul 26, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Wednesday, Aug. 1, 2007 05:45 am
what exactly was your line in the csv for that sound?
i must have mine wrong. its an mp3 file.
Share |
Jednite
General Member
Since: Jul 16, 2007
Posts: 226
Last: Jul 26, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Wednesday, Aug. 1, 2007 06:08 am
ok so i made a caulk box, so it will be unseeable, around the light, so it will be at top in the middle, and made it a script brushmodel, with the targetname of radio.

my gsc script:
getent ("radio","targetname") playloopsound ("bridges");

my csv script:
bridges,,misc/burningbridges.mp3,0.5,1,,,,1,50,auto,streamed,,looping,,,,,,,,,,,


It's compiling, and I will soon test it.

Anyone have any idea why my piano wont work though?

edited on Aug. 1, 2007 02:09 am by Jednite
Share |
ahoji
General Member
Since: May 16, 2006
Posts: 74
Last: Jun 27, 2008
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Thursday, Aug. 2, 2007 10:51 am
maybe check comas in cvs (sometimes is problem there)
Share |
scillman
General Member
Since: Nov 23, 2006
Posts: 360
Last: Sep 1, 2012
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Thursday, Aug. 2, 2007 12:52 pm
Jednite writes...
Quote:

{
radio = getent ("radio", "targetname");
radio playsound("burningbridges")
}


Maybe you need to try to change it to this
Quote:
{
radio = getent ("radio", "targetname");
radio playsound("burningbridges");
}


But won't work by me, "Object isn't an entity" that is what he says.
Share |
kuijpers007
General Member
Since: Feb 14, 2006
Posts: 177
Last: Apr 7, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Thursday, Aug. 2, 2007 03:18 pm
That should solve the problem, it's like PHP Scripting, when you forget a ; you get an error, if you fix it , it will probrably work
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

»