Sound Increase-decrease

cabeça

First time out of the vault
There is a car in one of the cities.
I want that this car plays a sound continually.
Is there a way to do the sound to increase and to decrease, with the approach or the player's distance?

If you understand, help me.

Thanks
 
Marcelo said:
There is a car in one of the cities.
I want that this car plays a sound continually.
Is there a way to do the sound to increase and to decrease, with the approach or the player's distance?

If you understand, help me.

Thanks

The play_sfx script command plays a sound, like this:
play_sfx("car");

If you have a wav file that you want to use, you have to make an acm file using snd2acm. It should be mono sound (not stereo). If you open the sound in windows sound recorder, you can save different ways (mono, bitrate, etc). You want 22.050 kHz, 16-bit, mono. Then you convert to acm:

snd2acm -16 car.wav car.acm

To make this work the sndlist.lst file needs to be updated and the easiest way to do this is with the regsnd utility. Put the new sound file (acm) in \sound\sfx, copy the fallout2 original sndlist.lst file there. Also copy the regsnd utility there, and then just run that utility on the command line. It will update the sndlist.lst with the details of your new sound file.

Now as for volume, I see no script commands for setting sound volume, so the only way to do what you want would be to have more than one sound file (the volume would be different in the actual sound file).

To determine how close the player is to the car, there is the script command tile_distance(tile1,tile2) ... could be used to determine the distance of player from car. There is a script command tile_num(object) to get the time numbers. For example in the script attached to the car:

variable distance;

distance := tile_distance(tile_num(self_obj), tile_num(dude_obj));

Test the distance and play a different sound depending on how far away the player is.

A timer_event on the car could play sounds continually, although it might be tricky to make it actually sound continuous.
 
Back
Top