Using two firing sounds

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

Moderator: Moderators

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

Using two firing sounds

Postby ggctuk » Wed Nov 11, 2015 12:36 pm

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.

Resistance Leader
User avatar
Posts: 5087
Joined: Tue Feb 09, 2010 8:43 pm
Location: Los Angeles, CA
Projects :: EVERYWHERE + Zero Munge + TCW
Games I'm Playing :: Civ3 + DEHR
xbox live or psn: Marth8880

Re: Using two firing sounds

Postby Marth8880 » Thu Nov 12, 2015 7:07 pm

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

    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.

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

Re: Using two firing sounds

Postby ggctuk » Fri Nov 13, 2015 3:11 am

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).

Return to All things SWBF1

Who is online

Users browsing this forum: No registered users and 1 guest