Scripting help :@

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

Moderator: Core Staff

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: Scripting help :@

Post by Rezil » July 11th, 2012, 2:47 pm

The coding is the same, he has a problem with the assets. If I recall correctly, the sound files need to be in <root>/raw/sound/ or in a subfolder of sound/. Make sure your file path is correct. You can probably still use this tutorial. It's written for vCoD but the basic principle is the same. Compile, run map, update zone, retry.

I also found this on modsonline, it's written specifically for CoD4 so this should work for you.

Let us know if that fixed your problem.
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.

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

Re: Scripting help :@

Post by darkpheonixz4x » July 11th, 2012, 2:55 pm

Yes it is strange. :?

Your script looks almost as the same as mine so i don't think there is anything wrong with my script. Must be either the file or it's csv.

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 12th, 2012, 7:22 am

Could the problem be that my music file has a bitrate of 1411kbps? Should i change it to something lower? Like 128?

Also, i feel like something is wrong with my csv. So please take a look at it: http://www.2shared.com/file/DVcFoHyt/mp_wwe_arena.html

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: Scripting help :@

Post by Pedsdude » July 12th, 2012, 6:00 pm

darkpheonixz4x wrote:Could the problem be that my music file has a bitrate of 1411kbps? Should i change it to something lower? Like 128?
Why does it need to be so high anyway? For the sake of a CoD4 map, I would probably put it to 128, 320 max, doesn't really need to be any higher.
Image
Image

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 12th, 2012, 7:58 pm

darkpheonixz4x wrote: 2 - I converted the song from an .mp3 to a .wav, is that an issue?
But in your csv;

Code: Select all

amb_dub,,ambient/amb_dub_ext.mp3,1,1,,1,1,,,local,streamed,,,,,,,,,,,,,,,,,
Still mp3 in there ....maybe that's why it can't be found.

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 12th, 2012, 9:17 pm

<LT>YosemiteSam[NL] wrote:
darkpheonixz4x wrote: 2 - I converted the song from an .mp3 to a .wav, is that an issue?
But in your csv;

Code: Select all

amb_dub,,ambient/amb_dub_ext.mp3,1,1,,1,1,,,local,streamed,,,,,,,,,,,,,,,,,
Still mp3 in there ....maybe that's why it can't be found.
Well spotted.
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

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 12th, 2012, 10:13 pm

thx :)
hopefully problem is solved now.

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

Re: Scripting help :@

Post by darkpheonixz4x » July 13th, 2012, 11:50 am

I used my original mp3 to change the bitrate to 128kbps. I tried to put it in the .iwd file and run it. Nothing. Im really hopeless with this. It is just not happening. :cry: :cry: :cry: :cry: :cry: :cry:

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 13th, 2012, 6:06 pm

Ok, can you email me the iwd file
I'll have a look at it.

I'm wondering about this line tough;

Code: Select all

musicplay ( "amb_dub" );
In CoD2 it was more like this ;

Code: Select all

door playsound ("doorsound");
is musicplay something specific for CoD4 ??

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

Re: Scripting help :@

Post by darkpheonixz4x » July 14th, 2012, 12:36 pm

Here is winrar archive i made which includes: my .csv, my .map, my script and my .iwd

I have removed my sound file from the .iwd because of the upload limit

Hopefully you could derive the error through these files.
You do not have the required permissions to view the files attached to this post.

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 14th, 2012, 10:12 pm

Try and change this;

Code: Select all

musicplay ( "amb_dub" );
into this;

Code: Select all

playsound ("amb_dub");
Second possibility;

change this;

Code: Select all

sound()
{

       trig = getent("sound_activate","targetname");

       while(true)
       {
          trig waittill ( "trigger" );   
          musicplay ( "amb_dub" );

       }

}
into this;

Code: Select all

sound()
{

	door = getent( "door", "targetname" );
	trig = getent("sound_activate","targetname");

       while(true)
       {
          trig waittill ( "trigger" );   
          door playsound ( "amb_dub" );

       }

}
Let me know if it works

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests