SNDINFO modding help - randomising player sounds (Resolved)

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
methoddan
Posts: 7
Joined: Sun Dec 12, 2010 12:42 pm

SNDINFO modding help - randomising player sounds (Resolved)

Post by methoddan »

Hi,

I've been fiddling around with the SNDINFO file in order to add lots of custom sounds into doom, and make them occur a little more randomly.

I've managed to make 16 different death and pain sounds for each monster, no problem - all tested and working.

My next goal was to modify the 'player pain' and 'player death' sounds, add more, and make it a random choice from sounds I've prepared.

... yet no matter how I write the code lines, it doesn't seem to want to do this. Just adding more sounds under the same name resulted in no sound at all in the game, and for some reason the " $random " command didn't seem to be very well accepted.

Does anybody know how I could achieve my goal ?

Thanks in advance for any help,

Dan
Last edited by methoddan on Sat Dec 18, 2010 4:36 am, edited 1 time in total.
User avatar
Kate
... in rememberance ...
Posts: 2975
Joined: Tue Jul 15, 2003 8:06 pm

Re: SNDINFO modding help needed - randomising player sounds

Post by Kate »

player sounds are special, you need to define them with the player commands. However, you can use aliases to do what you are intending:

Code: Select all

player/death1 DSDIE1
player/death2 DSDIE2
$random player/death { player/death1 player/death2 }

$playeralias player male *death player/death
the last line is the key here, it aliases the *death sound (which is played when you die) to the player/death sound instead, which is created using the $random statement above it.

If you want an idea of what sounds the player uses, you can take a look at the [wiki]Predefined sounds[/wiki] which are somewhat self-explanatory. The wiki has an explanation on all of the commands [wiki]SNDINFO[/wiki] understands, as well. This should help.
methoddan
Posts: 7
Joined: Sun Dec 12, 2010 12:42 pm

Re: SNDINFO modding help needed - randomising player sounds

Post by methoddan »

Ah, thanks very much !

I'd have never guessed there was any sort of 'alias' line - just tested and it works perfectly; thanks again :)

- Dan
Locked

Return to “Editing (Archive)”