• Flatline Death sound
    11 replies, posted
Is there any way to replace the flatline death noise? I wanted to make the death noise a custom sound, but I dont know how to. Please help!
I don't know the exact soundpath for the flatline sound, but i'd say you could just rename any old sound file to it (so long as it's a wav) and replace the file.
[url]http://wiki.garrysmod.com/?title=Gamemode.PlayerDeathSound[/url]
But I don't know the path where the flatline sound is located.. :(
[lua]hook.Add("PlayerDeathSound", "DeFlatline", function() return true end) local noise = Sound("deadnoise.wav") hook.Add("PlayerDeath", "NewSound", function(vic,unused1,unused2) vic:EmitSound(noise) end)[/lua] Untested, but should work. Put that in a Lua file in lua/autorun, then have whatever sound you want to use as sound/deadnoise.wav
I named a file in lua/autorun deadnoise, put this in the lua file: 1. hook.Add("PlayerDeathSound", "DeFlatline", function() return true end) 2. local noise = Sound("deadnoise.wav") 3. hook.Add("PlayerDeath", "NewSound", function(vic,unused1,unused2) vic:EmitSound(noise) end) put the file I wanted ( it IS a .wav ) in sound/ named it deathnoise, but it didnt work. Should I put this in the lua file? : function OverrideDeathSound() return true end hook.Add("PlayerDeathSound", "OverrideDeathSound", OverrideDeathSound) And if I did, Where do I put the sound I want and what do I name it?
I belive you'd name it "flatline.wav" I looked it up in GCF scape, Its located in "Source sounds.gcf>root>hl2>sound>hl1>fvox>filename.wav" Try that and see what you get, theres also a "beep.wav" that does the "Beep beep beep" right when you die. You may also consider changing that or making a .wav thats silent so as not to interupt your custom sound. I hope this helps. :smile:
Thanks, it helped and worked, but it does different pitches of the noise so the pitch change ruined it. :(
Hmm, I've had that happen to me in CSS. I never found out why though, but I think theres a script you can make/use to fix that but thats outta my league. I'm glad it worked and I'm sorry I can't help you further.
sound/HL1/flatline.wav I think.
Yup, thats it. Now i decided to put in a custom sound, but my problem is once I die the sound plays forever. I'm really horrid at LUA and i don't know what to put to make the sound stop, help please?
[QUOTE=MoparMan777;20108326]I named a file in lua/autorun deadnoise, put this in the lua file: 1. hook.Add("PlayerDeathSound", "DeFlatline", function() return true end) 2. local noise = Sound("deadnoise.wav") 3. hook.Add("PlayerDeath", "NewSound", function(vic,unused1,unused2) vic:EmitSound(noise) end) put the file I wanted ( it IS a .wav ) in sound/ named it deathnoise, but it didnt work. Should I put this in the lua file? : function OverrideDeathSound() return true end hook.Add("PlayerDeathSound", "OverrideDeathSound", OverrideDeathSound) And if I did, Where do I put the sound I want and what do I name it?[/QUOTE] Remove the line numbers.
Sorry, you need to Log In to post a reply to this thread.