play sound based on Player race

Post » Mon Mar 14, 2011 3:42 pm

Hi guys, first of all let me say that I'm new to modding.

Anyways, I'm developing a little mod of my own and I've run into a problem:

Inside a script, I want to play a sound (the Player should be play it) which should be different based on the actor race.
I know I can define those sounds in the CS and use some conditional structure to check for race and play the relevant sound, but since those I want to use are some vanilla combat sounds, I was wondering if there's some way to have the Player play a specific combat sound (in my case generic_attack_00038ee4_1.mp3) based on Player race.

If I'm not mistaken PlaySound or PlaySound3D can't access those sounds since they're not defined in the main database.

Thanks for the attention.
User avatar
Heather M
 
Posts: 3487
Joined: Mon Aug 27, 2007 5:40 am

Post » Mon Mar 14, 2011 9:43 pm

The Combat tab of the Generic quest contains topics for combat sounds.
Player.Say Hit

should do the trick.
You may need to edit the conditions if you want the game to play a specific info for that topic as opposed to picking one at random.
User avatar
Avril Louise
 
Posts: 3408
Joined: Thu Jun 15, 2006 10:37 pm

Post » Mon Mar 14, 2011 2:19 pm

The Combat tab of the Generic quest contains topics for combat sounds.
Player.Say Hit

should do the trick.
You may need to edit the conditions if you want the game to play a specific info for that topic as opposed to picking one at random.


That's just what i was looking for! I did not know where the voice files were defined nor how the game chose to play them. Thanks a lot!
User avatar
victoria gillis
 
Posts: 3329
Joined: Wed Jan 10, 2007 7:50 pm

Post » Mon Mar 14, 2011 8:01 pm

This is a cool idea would you mind showing me the script your using?
User avatar
Victoria Vasileva
 
Posts: 3340
Joined: Sat Jul 29, 2006 5:42 pm


Return to IV - Oblivion