(done) Adding randomised weapon sounds

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13769
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

(done) Adding randomised weapon sounds

Post by Gambit37 »

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...?
User avatar
Gambit37
Should eat more pies
Posts: 13769
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Adding randomised weapon sounds

Post by Gambit37 »

Also probably need the same fix for other methods too, not just weapons. Spell casting, etc.
Post Reply