Using two firing sounds

Post everything from general questions, to modding questions, to map WIPs to releases. (SWBF1 only)

Moderator: Moderators

Post Reply
User avatar
giftheck
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2218
Joined: Mon Jan 19, 2009 5:58 pm
Projects :: Star Wars Battlefront Legacy

Using two firing sounds

Post by giftheck »

Is it possible to use two firing sounds in a weapon? Not in the standard sense: IE I have a vehicle that has two head cannons which are one weapon. They're technically different weapons but they're under the same ODF so should make different firing sounds. Or in another instance, you have a modified AT-AT chin cannon. We all know the sound they make, but as the sound is set up, the pitch of each shot randonly changes so I've created a single 'two shot' sound but obviously this will sound twice.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Using two firing sounds

Post by Marth8880 »

If you're asking whether it's possible to play two sound samples at the same time with one sound property, then you should look into layered sounds.

From soundreadme.txt:

Code: Select all

ObjectID : SoundLayered
-----------------------

Property        | Description
-------------------------------------------------------------------------------
Name            | Name of the layered sound
Layer           | Layer("layerName", "soundName", playbackDelay, playbackDelayDev, 
                |       playbackTime, playbackTimeDev).
                | The layer name is a label which allows the layer to be 
                | referenced by the application code.  The sound name
                | references the name of a previously defined Sound() 
                | which will be used as a layer of the layered sound.
                | The playback delay, is the time to delay the sound 
                | (in seconds) from the time the sound is initially triggered.
                | The playback delay deviation (playbackDelayDev) allows
                | the playback delay to be randomly varied over a range. 
                | playbackTime is the time to play the layer, if this is not
                | specified the layer will not stop.  Finally, playbackTimeDev
                | is the deviation of the playback time, if this is not specified
                | a deviation of 0.0 is used.
                | Any number of SoundLayers can be specified for a layered sound.

A layered sound (SoundLayered) allows multiple Sounds to be played back at the 
same time or with some delay between each sound.

For example...

SoundLayered
{
    Name("grenade_explode");
    Layer("explosion", "grenade_explode", 0.0);
    Layer("gasleak",   "grenade_gas",     0.5, 0.1);
}

The sound "grenade_explode" will be played when the layered sound 
"grenade_explode" is triggered (played).  Then 0.4 to 0.6 seconds after the 
layered sound "grenade_explode" was triggered, "grenade_gas" will play.
User avatar
giftheck
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2218
Joined: Mon Jan 19, 2009 5:58 pm
Projects :: Star Wars Battlefront Legacy

Re: Using two firing sounds

Post by giftheck »

That isn't quite what I mean. I have a sound effect for the AT-AT that is a two firing sound effect. (in other words, I've edited the AT-AT chinblaster WAV file so it plays twice).
Post Reply