Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stopping Lantern Sound ?
Darkfire Offline
Senior Member

Posts: 371
Threads: 22
Joined: May 2014
Reputation: 15
Stopping Lantern Sound ?

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 ?

09-03-2018, 06:48 PM
Find Reply
Luis Offline
Frictional Games

Posts: 280
Threads: 19
Joined: Jun 2006
Reputation: 9
RE: Stopping Lantern Sound ?

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?

09-06-2018, 03:55 PM
Find Reply
Mudbill Offline

Posts: 3,877
Threads: 59
Joined: Apr 2013
Reputation: 178
RE: Stopping Lantern Sound ?

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?

09-06-2018, 04:30 PM
Find Reply
Darkfire Offline
Senior Member

Posts: 371
Threads: 22
Joined: May 2014
Reputation: 15
RE: Stopping Lantern Sound ?

Yes, that's what I did:

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...

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

09-16-2018, 03:05 PM
Find Reply

Users browsing this thread: 1 Guest(s)