Left 4 Dead 2

Left 4 Dead 2

Custom Weapon Lab [Base][Vscript]
Reload SFX Support?
I left a comment but it's now buried, I was curious if it's possible to script a way to play SFX from a directory for the reloading animations without needing to go into a modeling program to hardcode the sound events. You would basically have a prefix the script would look for then play those sounds with the defined frame in the animation. You would also need to mute any sound pre-defined events coming from the animation or else you'd have duplicate sounds.

If it's possible it would be a way for people to easily add custom reloading sounds without modeling or animating skills.

An example would be:

Reload Sound Path: sound/weapons/ak74

Reload Frame 23: Rifle.Reload01
Reload Frame 29: Rifle.Reload02
Reload Frame 37: button_press_01
< >
Showing 1-5 of 5 comments
devlos  [developer] 28 May, 2024 @ 5:36am 
The problem is that these sounds have to line up every frame , if i would do these server side and you have let's say for example 140 ping , the sound would never be played in time and instead be delayed or cut out. That is why i mostly kept these sound events based on the animation frames within the weapons viewmodel to be played in time client-side.
The Renegadist 28 May, 2024 @ 8:13am 
Couldn't it just be clientside? Once the player downloads the sounds from the server they play locally?
devlos  [developer] 28 May, 2024 @ 9:03am 
It's about the latency being called a input from the server to play the sound. Client side i mean that the server does not control when the sound is played therefor it always plays in time without delays or cut outs , so you reload on your screen there is nothing required to be send to the server to check if a sound has to be played therefor there is no latency and the sound plays perfectly in time.
The Renegadist 28 May, 2024 @ 10:39am 
So is the clientside route something that can be done or is this entirely out if the question?
devlos  [developer] 30 May, 2024 @ 9:25am 
Originally posted by The Renegadist:
So is the clientside route something that can be done or is this entirely out if the question?

it can be done , but it would just be a worse experience overall.
< >
Showing 1-5 of 5 comments
Per page: 1530 50