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

Members Online

»
0 Active | 60 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: Elevator sound not play
Toast1991
General Member
Since: Sep 14, 2006
Posts: 22
Last: Feb 24, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Monday, Jan. 29, 2007 04:09 pm
Hi everybody,

i have followed the tutorial of the MP Elevator, and working fine. But there is no music playing. I have in the main map a map with sound/misc/elevator_med.wav.

But when i go up, i don't hear anything.

the soundaliases file

===========================
name,sequence,file,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,channel
,type,probability,loop,masterslave,loadspec,subtitle

null,,null.wav,,,,,,,,,,,,,

# Personal Sounddefinitions,,,,,,,,,,,,,,,
elevator1,,misc/elevator_med.wav,,,,,,,auto,,,,,,
===========================

The GSC file

===========================
main() {
level.elevatorDown = true; // elevator starts at bottom: true/false
level.elevatorMoving = false; // elevator is not currently moving
thread elevator_start();
}

elevator_start() {
elevator = getentarray ("elevatorswitch","targetname");
if ( isdefined(elevator) )
for (i = 0; i < elevator.size; i++)
elevator thread elevator_think();
}

elevator_think() {
while (1) {
self waittill ("trigger");
if (!level.elevatorMoving)
thread elevator_move();
}
}

elevator_move() {
elevatormodel = getent ("elevatormodel", "targetname");
level.elevatorMoving = true;
speed = 2;
height = 192;
wait (1);
if (level.elevatorDown) { // moves to top
elevatormodel playsound ("elevator1"); // sound definition for soundaliases.csv
wait (1); // wait a second to hear the motor start and then start the movement of the lift - feels more realistic
elevatormodel moveZ (height, speed);
elevatormodel waittill ("movedone");
level.elevatorDown = false;
}
else { // moves to bottom
elevatormodel playsound ("elevator1"); // sound definition for soundaliases.csv
wait (1); // wait a second to hear the motor start and then start the movement of the lift - feels more realistic
elevatormodel moveZ (height - (height * 2), speed);
elevatormodel waittill ("movedone");
level.elevatorDown = true;
}
level.elevatorMoving = false;
}
============================
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Monday, Jan. 29, 2007 05:31 pm
Try playing the sound "beep" instead of elevator1.... just to see if the error is in your script, or your .csv/.wav file.

so replace elevatormodel playsound ("elevator1");

with

elevatormodel playsound ("beep");
Share |
Toast1991
General Member
Since: Sep 14, 2006
Posts: 22
Last: Feb 24, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Monday, Jan. 29, 2007 06:36 pm
I have changed it, but i heard no sound. [ohwell]
Share |
privategrob
General Member
Since: May 19, 2004
Posts: 54
Last: Dec 2, 2008
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Thursday, Feb. 1, 2007 08:05 am
Type this in your csv:

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

elevator1,,misc/elevator_med.wav,1,,,,,,,local,,,,,mp_yourmapname

Is the elevator_med.wav a stock sound and in the misc folder? If not, make a folder sound in this folder an folder misc and in this folder must be the wav file. Remember a costum wave must be a mono sound, not a stereo sound.

There is only one problem with "local". If someone drive with the elevator you can hear the sound on the whole map [ohwell]

Regards
Private Grob
(Micka)


edited on Feb. 1, 2007 03:08 am by privategrob
Share |
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Wednesday, Apr. 11, 2007 09:01 pm
privategrob writes...
Quote:
Type this in your csv:

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

elevator1,,misc/elevator_med.wav,1,,,,,,,local,,,,,mp_yourmapname

Is the elevator_med.wav a stock sound and in the misc folder? If not, make a folder sound in this folder an folder misc and in this folder must be the wav file. Remember a costum wave must be a mono sound, not a stereo sound.

There is only one problem with "local". If someone drive with the elevator you can hear the sound on the whole map [ohwell]

Regards
Private Grob
(Micka)


edited on Feb. 1, 2007 03:08 am by privategrob


If you already have ambient entries in your CSV, would this be right?

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,,,,,,,,,,,,,,,,,,,,,,,

ambient_mp_msp4,,ambient/amb_russia01b.mp3,0.63,,,,,,,local,streamed,,looping,,mp_msp4,,,,,,,,
elevator_msp4,,misc/elevator_msp4.mp3,1,,,,,,,auto,,,,,mp_msp4


ps my map is mp_msp4 and my elevator is elevator_msp4... Could it be that I'm trying to use an mp3 or is my script wrong? I'm trying to use auto instead of local so it won't play over the whole map...
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

»