Frictional Games Forum (read-only)

Full Version: Stopping Lantern Sound ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, hopefully someone will read this

I need to silence the On/Off Lantern sound. What I suspect is that it is very much possible using StopSound.

For that, however, I need the sound's internal name - not the .ogg name which is listed in the game.cfg file (ui_lantern_on etc)

So, do you have any ideas how to find that name ? I tried "Show sounds playing" in the debug menu, but it only shows the .ogg name.
Maybe there's a way to get it from the game's engine ? But where would that be ?
That should be the actual name (there's no internal name besides the one showing on the "show sounds playing" info). How are you trying to stop these?
I think Darkfire tried that. The "Show sounds playing" seems to display the filename for whatever sound is played rather than the internal names. StopSound won't work with that, no?
Yes, that's what I did:

Code:
StopSound("ui_lantern_off", 0.0f);
//I also tried this:
StopSound("ui_lantern_off.snt", 0.0f);
//same with the on sounds.
This didn't work however.
If I recall correctly, I used that code in SetLanternLitCallback. When I think about it, maybe a looping timer might help, but...

Code:
StopSound(string& asSoundName, float afFadeTime);
PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);
StopSound requires asSoundName, and when using the "Show sounds playing" it only shows the asSoundFile (I checked that with other sounds I set up).
So if the UI sounds don't have such names, what I'm trying to achieve might be impossible ¯\_(ツ)_/¯

PS. I was trying to refer to .snt, not .ogg, in the previous post