Jump to content

Changing unit sounds


false_god123
 Share

Recommended Posts

I want to change some unit sounds, i have attempted by making a audio testsound.ogg file in audio/voice/global along with testsound.xml in the same location

The testsound.xml looks like this :

SoundGroup>
    <Gain>1</Gain>
    <Priority>100</Priority>
    <ConeGain>1</ConeGain>
    <Looping>0</Looping>
    <RandOrder>1</RandOrder>
    <Distanceless>1</Distanceless>
    <RandGain>1</RandGain>
    <RandPitch>1</RandPitch>
    <PitchUpper>1</PitchUpper>
    <PitchLower>0.7</PitchLower>
    <Threshold>1</Threshold>
    <Path>audio/voice/global</Path>
    <Sound>testsound.ogg</Sound>
</SoundGroup>

 

And i used this code here in my axeman unit :    

<SoundGroups>
      <select>voice/global/testsound.xml</select>
      <attack>attack/weapon/sword.xml</attack>
      <death>actor/human/death/death.xml</death>
    </SoundGroups>

And put it in my simulation/templates/unuits/gaul/gaul_champion.xml file

Only the first line has been changed to a custom ogg file

When i test this i don't get any errors so all seems well but when i select this unit i can hear the default sound still and do not hear my custom sound. Is this the correct way of changing unit sounds?

Sorry for spamming the forums with this stuff!

 

 

Link to comment
Share on other sites

Is the <SoundGroup> tag within a <Sound> tag?

It should be something like this:

  <Sound>
    <SoundGroups>
      <select>voice/global/testsound.xml</select>
      <attack>attack/weapon/sword.xml</attack>
      <death>actor/human/death/death.xml</death>
    </SoundGroups>
  </Sound>

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...