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

Members Online

»
0 Active | 10 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
Page
Previous Page Next Page
subscribe
Author Topic: Fire and Sound
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 07:52 pm
what targetname? key and values?
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 09:22 pm
That wont work cause they are all pointing to the same file :)
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 09:25 pm
so what do i do?
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Tuesday, Aug. 7, 2007 09:06 am
The sound will work, but because all your 5 soundaliases are loading the same file, they will all sound the same - add your other sounds and edit the csv file accordingly.

To test the sound:

In radiant right-click -> script -> model.

Close the browse window (or choose a random model - it doesn't really matter).

Bring up the entity box (n). Give the script_model a key of targetname and value of soundtest.

Save and compile map.

In your script add the lines
Code:
sound = getent("soundtest","targetname");
sound playloopsound ("scream");


This should make the sound loop at the origin of the model you placed in your map.

[thumbs_up]
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Tuesday, Aug. 7, 2007 08:35 pm
Two things. does that code go in my csv file? I have five sound files labeled scream1 to scream5. in your code you have "scream". How is that correct?
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Tuesday, Aug. 7, 2007 08:39 pm
Quote:
Give them all the same name, then give all 5 a different sequence number 1 through 5. That way CoD should randomly pick one of the 5 files.

That's why it's correct.

TheArmy, the script goes in your .gsc file. Maybe you should read up on some of the scripting tutorials... because this is pretty basic stuff. Which most of is explained in the tutorials in the CoD, CoDUO and CoD2 sections.
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Tuesday, Aug. 7, 2007 09:46 pm
ok ur prolly right on me needing to read up on some tutorials. but lets just talk windows for a sec. You said make all the files the same name. Windows doesnt allow you to do that. So there is some confusion between what you are telling me to do and what I am trying to do.
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Wednesday, Aug. 8, 2007 01:59 am
No, caretaker meant "make all the ALIAS names the same, then give each one an index from 1 to 5, each line then points to the relevant filename, filenames can be anything.

For eg:
alias,1,misc/scream_omg.wav
alias,2,misc/ohdammit.wav
alias,3,misc/iwantmymommy.wav
alias,4,misc/ohno.wav
alias,5,misc/wtf.wav

[biggrin]

get the idea now?
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Wednesday, Aug. 8, 2007 02:55 am
Ok the map was tested at the scripts must be working because the sounds play. However there are a few big issues.

1) The sounds sound like crap. I think that may be because in the script they are looping. I just want one of the sounds to be played once. Is this why the sounds sound like crap? What do i do?

2) Right now the sounds play automatically. I only want the sounds to play when someone gets killed by fire. I only want one of the five sounds to play each time someone gets killed. How do I do this?
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Wednesday, Aug. 8, 2007 04:47 am
Change the pitch values or just remove them in the sound properties in your csv, it shows you were they are in the example line.

To play a sound once change them to nonlooping.

To play a sound only when a player dies involves scripting way above your current capabilities at this stage.

Grassy
Share |
Restricted Access Topic is Locked
Page
Previous Page Next Page
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

»