General > Developers Corner
Edit sound in ttt_radio
Vendaar:
Hello,
I tried to edit the sounds of the traitors radio. I wanted to change the sound of the c4 beep button. So i opened gamemodes\terrortown\entities\entities\ttt_radio\shared.lua
This is my code on the "beeps" line
--- Code: --- beeps = {
sound = { Sound("sound/sturm.wav") },
delay = 0.75,
times = {8, 16},
ampl = 70
}
};
--- End code ---
I copied the soundfile to "steamapps/garrysmod/garrysmod\sound" and of course i added the sound to FastDownload and I can play it via playsound ulx command, but when I press the C4 Button on the Traitor-radio, nothing happens.
What do I have to do? Tried different delays and times but nothing helped so far.
Thanks for any advice
Regards
EDIT: Also tried .mp3 Format
Bytewave:
The Sound() function already includes the sound/ directory.
Try Sound("sturm.wav")
Vendaar:
+karma
Thank you very much!
And can somebody tell me what exactly "times= {9,17}; defines? Can I delete this line? I just want the sound to be played once per click. Its about 90 Seconds long
Thank you
Regards
Bytewave:
--- Quote from: Vendaar on January 21, 2014, 12:07:42 AM ---+karma
Thank you very much!
And can somebody tell me what exactly "times= {9,17}; defines? Can I delete this line? I just want the sound to be played once per click. Its about 90 Seconds long
Thank you
Regards
--- End quote ---
Hmmm...
I'd have to dig around TTT's code to see what that does.
Try removing it and post any Lua errors you get.
Vendaar:
Thank you. I got an error when I deleted it, because the c4-beep sound was meant to be played repeatedly.
So I just replaced the explosion-soundfile (will just play one sound per click, like the "scream"-sounds) with mine and it worked fine :)
One last question:
Does anybody know how I can "stick" the sound to the radio? When someone moves the radio (doesnt matter what sound it plays) the sound stays in place where the radio was, when the sound started playing. You can't roam around with the music playing.
The sound of the radio on several ttt_67way maps will synchronize with the radios location and I would like to know how to add this feature to the Traitor Radio.
Navigation
[0] Message Index
[#] Next page
Go to full version