Frictional Games Forum (read-only)
[SCRIPT] .snt / other sound effect's volume - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] .snt / other sound effect's volume (/thread-15289.html)



.snt / other sound effect's volume - Sazureth - 05-06-2012

Hey.
Is it possible to change the volume of a .snt sound effect or use .ogg when I'm playing music at the same time?
On my current project, besides music I want rain -and occasional thunder/rockslide/owl effects, but the problem is that the volumes feel really uneven. I, for example, can hear owls barely at all with all the other sound effects playing.

/E: Oh, btw. I cannot use FadeGlobalSoundVolume since I want to adjust every sound effect individually.
Second edit: What does the string& asSoundName' mean in PlaySoundAtEntity(string& asSoundName...
I though that'd give a name to the sound, but apparently not?


RE: .snt / other sound effect's volume - FlawlessHappiness - 06-10-2012

The asSoundName is the internal name of the PlaySoundAtEntity. I guess it is used when you delete the sound. Because then you have to specify an internal name and that should be it


RE: .snt / other sound effect's volume - Ermu - 06-10-2012

(05-06-2012, 02:52 PM)Sazureth Wrote: Hey.
Is it possible to change the volume of a .snt sound effect or use .ogg when I'm playing music at the same time?
On my current project, besides music I want rain -and occasional thunder/rockslide/owl effects, but the problem is that the volumes feel really uneven. I, for example, can hear owls barely at all with all the other sound effects playing.

/E: Oh, btw. I cannot use FadeGlobalSoundVolume since I want to adjust every sound effect individually.
Second edit: What does the string& asSoundName' mean in PlaySoundAtEntity(string& asSoundName...
I though that'd give a name to the sound, but apparently not?
You can change the volume in the .snt file. (<PROPERTIES Volume="0.5" part in .snt)

PlaySoundAtEntity("", "yoursound.snt", "EntityNameToPlayAt", float afFadeTime, bool abSaveSound);

Adjust these 2 as you want:
afFadeTime - time in seconds the sound needs to fade
abSaveSound - determines whether a sound should “remember” its state. If true, the sound is never attached to the entity! Also note that saving should on be used on looping sounds!