EarthQuake Wicked Sick!
Joined: 02 Apr 2004 Location: Athens, Ohio. Dieblieber gonna getcha!
|
Posted: Fri Apr 26, 2013 11:59 pm Post subject: [SNDINFO] $random sounds not played correctly from actors. |
|
|
As you know, the $random command in SNDINFO allows you to define a logical sound that is linked to multiple other logical sounds. When that sound is played, one of the linked sounds is played randomly.
Example:
Code: | imp/sight1 dsbgsit1
imp/sight2 dsbgsit2
$random imp/sight
{
imp/sight1
imp/sight2
} |
This works for the most part, but in my attempts at expanding the number of sounds that fall under a given random sound, only 2 or 3 of the defined sounds are ever actually chosen. When the $random sound is "attached" to a monster (via simple SNDINFO mods or through DeHackEd), this behavior seems to occur. If the sound is played via ACS or through the "playsound" command in the console, the $random sound works fine. Addendum: The sounds also work for any sound effect that is not emitted from an actor.
I've attached a demo wad to show this happening. I've defined the following sound and replaced the default revenant action sound definition with this:
Code: | $random skeleton/active
{
skeleton/active1
skeleton/active2
skeleton/active3
skeleton/active4
skeleton/active5
skeleton/active6
}
skeleton/active1 dsskeact
skeleton/active2 dsskeact
skeleton/active3 dsskeact
skeleton/active4 dsskeact
skeleton/active5 dsskeact
skeleton/active6 dsskeact |
To test this, run the wad in ZDaemon, and before joining the game, set "developer" to "true" in the console. This will show you which sounds are picked when "skeleton/active" is played. Now repeatedly enter "playsound skeleton/active" and note how all 6 sounds are eventually selected.
Now restart ZDaemon (this is important to reset the debugging messages) and spawn a revenant. Make sure you're still using the wad. Wake up the revenant, and then get out of its sight. You should see "skeleton/active2" and "skeleton/active3" being loaded and played, but not the other 4 sounds.
All the sounds reference "dsskeact" so no matter which is chosen, it will sound the same, but the developer mode messages do indeed reflect what is happening.
http://speedy.sh/6majn/random.wad
I did test in ZDoom with actual sound replacements and they work as intended (although the sounds seem to be loaded as the map loads, and not when they are played for the first time like in ZDaemon). |
|