(done) Adding randomised weapon sounds
Posted: Wed Nov 28, 2018 12:34 pm
I'd like the "swish" sound for some weapons to be pulled from a randomised bank of sounds, to add some variety.
I've tracked down the code for this, but it's within a really big function that I don't want to have to duplicate/override (line ~109 in method_physattack() in methods.lua).
Is there a clean way of overriding this sound function, so that it'll play a randomised sound from a defined table and then fall back to a single sound if there's no table defined? Similar to the way the "oofs" are handled...?
I've tracked down the code for this, but it's within a really big function that I don't want to have to duplicate/override (line ~109 in method_physattack() in methods.lua).
Is there a clean way of overriding this sound function, so that it'll play a randomised sound from a defined table and then fall back to a single sound if there's no table defined? Similar to the way the "oofs" are handled...?