Left 4 Dead 2

Left 4 Dead 2

Custom Weapon Lab [Base][Vscript]
The Renegadist 27. maj 2024 kl. 16:21
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
< >
Viser 1-5 af 5 kommentarer
devlos  [udvikler] 28. maj 2024 kl. 5:36 
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. maj 2024 kl. 8:13 
Couldn't it just be clientside? Once the player downloads the sounds from the server they play locally?
devlos  [udvikler] 28. maj 2024 kl. 9:03 
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. maj 2024 kl. 10:39 
So is the clientside route something that can be done or is this entirely out if the question?
devlos  [udvikler] 30. maj 2024 kl. 9:25 
Oprindeligt skrevet af 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.
< >
Viser 1-5 af 5 kommentarer
Per side: 1530 50