2 Sound Engine questions
DerAkademiker
Join Date: 2012-12-19 Member: 175540Members
So I have two questions on the Sound Engine:
1. There are audio effects added to the sounds (delay, reverb, maybe even filters), when they are set to 3d mode in Fmod. These effects seem to be dynamic - big rooms add a wet, small corridors add a dry audio effect. Where are these effects defined and how can I tweak/change/disable them?
2. I want to make two entities for some sounds, so I can play one sound for the Client only, and the other one for all players in 3d mode at certain events. Let's say I have two slightly differently equalized sounds for the pistol fire, one for 1st-person (pistol1), one for 3rd-person listeners (pistol2). How do I implement those two entities in the lua files?
Any ideas?
1. There are audio effects added to the sounds (delay, reverb, maybe even filters), when they are set to 3d mode in Fmod. These effects seem to be dynamic - big rooms add a wet, small corridors add a dry audio effect. Where are these effects defined and how can I tweak/change/disable them?
2. I want to make two entities for some sounds, so I can play one sound for the Client only, and the other one for all players in 3d mode at certain events. Let's say I have two slightly differently equalized sounds for the pistol fire, one for 1st-person (pistol1), one for 3rd-person listeners (pistol2). How do I implement those two entities in the lua files?
Any ideas?
Comments
Have you tried looking for the functions which send a sound to the client (Try the unofficial docs?), then transmitting the different sounds to each client in range manually?
As I said, stab in the dark, hope it helps.
I have no programming knowledge, so even if I found the function, I'd have no idea how to write it down in the lua files. I thought there may be just a parameter or something, that sais 'This one only for the Client who fired'.
This is what contains the path to the pistol sound in Marineweaponeffects.lua:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->kMarineWeaponEffects =
{
pistol_attack =
{
pistolAttackEffects =
{
{viewmodel_cinematic = "cinematics/marine/pistol/muzzle_flash.cinematic", attach_point = "fxnode_pistolmuzzle"},
{weapon_cinematic = "cinematics/marine/pistol/muzzle_flash.cinematic", attach_point = "fxnode_pistolmuzzle"},
// Sound effect
{sound = "sound/NS2.fev/marine/pistol/fire"},
},
},
}<!--c2--></div><!--ec2-->
I thought I could just add a line like
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->{sound = "sound/NS2.fev/marine/pistol/fire[i]2[/i]" [i]WhateverTheParamMayBe[/i] = true}<!--c2--></div><!--ec2-->
Or am I thinking wrong?
Your best bet is trying to find something with two different sounds (depending on who's listening) and see how that does it, if there is anything like that.
- I can find an event where two different sounds are triggered, it's the footsteps inside PlayerEffects.lua. There are normal footstep sounds and those for enemies. The parameter sais 'enemy = true', but that still isn't really what I'm searching for...I want to have 'Firstperson' vs. 'Thirdperson', I know that the CryEngine for example has those parameters inside xml-files. Spark should have those parameters as well, shouldn't it? Anybody?
Update: Game Effects Manager, InternalTriggerSound is getting closer.
Update2: Bingo, EffectsManager.lua, line 600. That handles all the sound output. Enjoy :)