Page 1 of 1

Multiple sounds from same weapon? [Solved]

Posted: Tue Dec 09, 2014 11:29 am
by DrDrSheldonLeeCooper
Maybe you know the mod "rise of the empire" if you are playing the clones you can hear that the rifles have sometimes different sounds.

How can I make that the rifles has different sounds after every shot?
Hope you can understand me,my english isn´t the best.

Thx :)

Re: Changing sounds

Posted: Wed Dec 10, 2014 2:32 am
by AQT
DrDrSheldonLeeCooper wrote:my english isn´t the best.

Thx :)
You should probably type out "thanks," then. :wink:

To answer your question, simply add more samples to your SampleList. For instance, if you want your weapon to make three different possible fire sounds:

Code: Select all

    SampleList()
    {
        Sample("customweaponsound1", 0.33);
        Sample("customweaponsound2", 0.33);
        Sample("customweaponsound3", 0.33);
    }
Notice that the 0.33 is the result of dividing 1 by 3 because there are three different possible fire sounds.

Re: Changing sounds

Posted: Wed Dec 10, 2014 5:56 am
by Marth8880
AQT wrote:Notice that the 0.33 is the result of dividing 1 by 3 because there are three different possible fire sounds.
You actually don't have to make it so all of the deviations of the samples in a sample list equate to 1.0. They function exactly the same as AI goal weight. :o

For example, this would also be perfectly acceptable:

Code: Select all

    SampleList()
    {
        Sample("customweaponsound1", 1.0);
        Sample("customweaponsound2", 1.0);
        Sample("customweaponsound3", 1.0);
    }

Re: Changing sounds

Posted: Wed Dec 10, 2014 10:05 am
by DrDrSheldonLeeCooper

Code: Select all

    SampleList()
    {
        Sample("customweaponsound1", 1.0);
        Sample("customweaponsound2", 1.0);
        Sample("customweaponsound3", 1.0);
    }
Where do I have to put this?

thank you two :)

Re: Changing sounds

Posted: Wed Dec 10, 2014 12:26 pm
by Anakin
How GT works:
Hidden/Spoiler:
0. You ask something.
1. GT'll give you this link: FAQ Thread
=> http://www.gametoast.com/viewtopic.php?f=27&t=9541
=> http://www.gametoast.com/viewtopic.php?f=27&t=6166
=> http://www.gametoast.com/viewtopic.php? ... &sk=t&sd=a
=> ...

2. You tell them you already read them
3. GT'll tell you to read them again
4. You did so, but still have questions, so you ask again
5. You'll find help here :D
So i hope you are not at stage 2. otherwise i'd continue with 3 ;)

Re: Changing sounds

Posted: Wed Dec 10, 2014 1:41 pm
by DrDrSheldonLeeCooper
I can´t find something :/

Re: Changing sounds

Posted: Wed Dec 10, 2014 2:25 pm
by Anakin
:funny2: We are at stage 3.
http://www.gametoast.com/viewtopic.php?f=27&t=6166
PR-0927 wrote: 10. Get a .snd file. Copy one from other sound folders and rename to whatever you would like. Mine is called swrcweapons.snd. In it (I will not teach you how to put stuff in it), mine says this for that above .wav:

Code: Select all

SoundProperties()
{
    Name("rifledc17");
    Group("weapons");
    Inherit("weapon_template");
    SampleList()
    {
        Sample("dc17_rifle", 1.0);
    }
}
The SampleList is a bit smaller but that's how it's working ;)

Re: Changing sounds

Posted: Wed Dec 10, 2014 2:35 pm
by DrDrSheldonLeeCooper
I know how to add custom sounds,but i have to know how I can that a rifle have sometimes different sound.
For example.

I´m firing two shoots and they have a sound called "fire1"
Now I´m shooting again but now the rifle has a firing sound called "fire2"

I´m bad in explaining.

Maybe you can watch a "Rise of the Empire"-mod on YouTube,there you can hear that the guns sometimes has different sound.
:)

Re: Changing sounds

Posted: Wed Dec 10, 2014 3:51 pm
by Marth8880
Here's what your sound property should look like if you have three samples for the sound property.

Code: Select all

SoundProperties()
{
    Name("rifledc17");
    Group("weapons");
    Inherit("weapon_template");
    SampleList()
    {
        Sample("dc17_rifle1", 1.0);
        Sample("dc17_rifle2", 1.0);
        Sample("dc17_rifle3", 1.0);
    }
}
This should get you the exact result you desire.

Re: Changing sounds

Posted: Wed Dec 10, 2014 5:08 pm
by DrDrSheldonLeeCooper
EDIT :

It works! Thanks @all :)