Jump to content

Recommended Posts

Posted

i modified an existing mod to allow for hitsounds, but there's a problem: if you use a shotgun, it makes a hitsound for each individual pellet, and given how new vegas' sound works, this is considered "loud" and thus overrides most other sounds for a hot second.

 

is there a way to allow only one instance of a sound? I.E. a sound can not overlap itself, especially if multiple instances occur at the same time, inadvertently making the sound louder?

Posted
You could instead just prevent the sound playing within some time interval of another by storing and comparing the current time before playing the sound.
Posted
I assume you are working on that hitsound mod and therefore you want to use it in an event handler. If that's the case, it's easier to use GetSecondsPassed but you might need to test how it behaves if called multiple times in a same frame. It theory it should return 0 unless it's being called without breaking out of the UDF
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...