Thread: [Help / Support] Replacing knife deploy sound
View Single Post
Author Message
Fawkes37
Senior Member
Join Date: Jul 2008
Old 08-07-2020 , 00:55   Replacing knife deploy sound
Reply With Quote #1

How to add a custom knife deploy sound for zombies? (The sound when they switch to knife after being infected.)

I tried adding to zp50_zombie_sounds where the other attack/knife sounds are handled, but with no success (soundfile is 'weapons/knife_deploy1.wav', so we check for 'd', 'e', 'p' in specific indexes):
Code:
if (sample[14] == 'd' && sample[15] == 'e' && sample[16] == 'p') // deploy
{
	ArrayGetString(g_sound_nemesis_draw_knife, random_num(0, ArraySize(g_sound_nemesis_draw_knife) - 1), sound, charsmax(sound))
	emit_sound(id, channel, sound, volume, attn, flags, pitch)
	return FMRES_SUPERCEDE;
}
Also adding the SMA file.

Thanks in advance
Attached Files
File Type: sma Get Plugin or Get Source (zp50_zombie_sounds.sma - 97 views - 22.2 KB)
Fawkes37 is offline