Scripting help :@

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

Moderator: Core Staff

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

Re: Scripting help :@

Post by Drofder2004 » July 7th, 2012, 3:41 pm

Open you CSV in Excel and change the relevant row and column to "streamed" and save as CSV
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

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Re: Scripting help :@

Post by darkpheonixz4x » July 7th, 2012, 5:12 pm

That fixed that issue. But the song doesn't play. :S

Any ideas? :P

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

Re: Scripting help :@

Post by Drofder2004 » July 7th, 2012, 5:47 pm

Sorry, that is something I have never bothered to do.

It could be many things from the CSV, the music file or the structure within the FF/IWD.
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

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Re: Scripting help :@

Post by darkpheonixz4x » July 8th, 2012, 3:08 pm

Thanks for replying.

1 - This could be the problem because i left a lot of cells empty in my .CSV. I have the file,name,type and channel.

2 - I converted the song from an .mp3 to a .wav, is that an issue?

3 - Could the issue be that i don't have an .iwd file? Am i supposed to create one with my file in sound/ambient?

4 - I reffered the name in my level and csv as amb_dub, so it's an ambient. Was that wrong to do?

Sorry for so many questions! I really want to learn. Thank you again,
darkpheonixz4x :)

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

Re: Scripting help :@

Post by Drofder2004 » July 8th, 2012, 5:17 pm

1. No. (unless you missed a required slot)
2. I have heard about issues with certain files, but not sure which
3. I would assume it is required. All stock sounds are stored in IWDs
4. Filename/folder location are not an issue if correctly referrenced.
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

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Re: Scripting help :@

Post by darkpheonixz4x » July 9th, 2012, 1:44 pm

Hi again,

i didn't solve this problem but i did find the error message.

It stated: Couldn't play stream "sound/mymapname\myfile.wav" from alias "amb_dub" - Unable to open file.

PS - my map name is mp_wwe_arena and my file is Kyoto.wav.

Does this give me a hint on what to fix?

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

Re: Scripting help :@

Post by Drofder2004 » July 9th, 2012, 2:13 pm

darkpheonixz4x wrote:Hi again,
i didn't solve this problem but i did find the error message.
It stated: Couldn't play stream "sound/mymapname\myfile.wav" from alias "amb_dub" - Unable to open file.
PS - my map name is mp_wwe_arena and my file is Kyoto.wav.
Does this give me a hint on what to fix?
Assuming you are using "mymapname" and "myfile.wav" as placeholder and they are not spelling errors... Have you placed the file inside an IWD and placed the IWD in the correct folder?
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

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Re: Scripting help :@

Post by darkpheonixz4x » July 9th, 2012, 2:28 pm

No,

so i create an .iwd, which includes the folders sound and images, and inside sound a folder named ambient which consists of my file? Yes?

But where should i place this?

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

Re: Scripting help :@

Post by Drofder2004 » July 9th, 2012, 7:55 pm

yes, all sounds go inside the "sounds" folder and depending on how you set up your CSV file, which subfolder.

Place the IWD inside usermaps/my_mapname/
or inside the mod folder.
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

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Re: Scripting help :@

Post by darkpheonixz4x » July 10th, 2012, 12:11 pm

Arghhh still doesn't work! It says the same error (Unable to open file). I'm just going to assume that the file is damaged or something! :mrgreen: . I'll try to use another .wav and get back to you.

Thanks for the help.

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Re: Scripting help :@

Post by darkpheonixz4x » July 11th, 2012, 9:02 am

Grr i tried with many different files including ones that are actually used in various maps. Still getting the Unable to open file error! Arghhh! Frustration. >.<

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

Re: Scripting help :@

Post by <LT>YosemiteSam[NL] » July 11th, 2012, 1:47 pm

darkpheonixz4x wrote: It stated: Couldn't play stream "sound/mymapname\myfile.wav
Let's see if I can help. I'll post the soundscripts I made for my map when I get home as a reference (they are for CoD2 but I think that is pretty much the same)...if I have the time :?
But in the above line is that backslash in the error message or is that a typo ? If so than you put a backslash instead of a forward slash in your script ?

Btw, you don't need an IWD for this to work (in CoD2 it worked without one, I don't think it's any different for CoD4)

trollingcat
CJ Wannabe
CJ Wannabe
Posts: 3
Joined: July 7th, 2012, 6:46 am

Re: Scripting help :@

Post by trollingcat » July 11th, 2012, 1:54 pm

Even i got this error :S

darkpheonixz4x
CJ Newbie
CJ Newbie
Posts: 51
Joined: July 2nd, 2012, 11:15 am

Re: Scripting help :@

Post by darkpheonixz4x » July 11th, 2012, 1:59 pm

Thanks for replying, and the sound script would be much appreciated.

No, the error doesn't have any typos. It's exactly like that.

Although in my zone file and my csv file i have used a backslash, it displays a forward slash in the error.

:shock: :? :shock: :?

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

Re: Scripting help :@

Post by <LT>YosemiteSam[NL] » July 11th, 2012, 2:11 pm

Mmmm, strange.
Well i have a question for drofder or Rezil.....is the way of playing sounds in CoD2 the same as in CoD4 ?
If so I am able to help otherwise I can't cause I never scripted for CoD4.
Cause in Cod2 you just do it like this;

Code: Select all

trigger waittill ("trigger");
door rotateyaw(90,2);
door1 rotateyaw(-90,2);
door playsound ("doorsound");
door1 waittill("rotatedone");
wait 2;

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest