Teardown

Teardown

FBI Open Up
 This topic has been pinned, so it's probably important
Ahi 6 Apr, 2023 @ 4:23pm
How to add your own sound effects
I'll be using " * " to label stuff as a lot of stuff in lua uses quotation marks

So make sure that your audio file is in the copy of the mod folder. Open up * main.lua *

Under where it says * function init( ) * and above where it says * if not HasKey * paste in

* snd = LoadSound("[your audio file name goes here, and make sure it's an .ogg file]") *

After that, go under where it says * function tick( ) * and above * if rcd> 0 then * paste in

* if InputPressed("x") then
PlaySound(snd)
end
*

Make sure everything is lined up properly and then you're done, save your edits and boot up the game. If you can't hear any audio, turn on your screen recorder and then press esc five seconds after activating it to deactivate it.
< >
Showing 1-1 of 1 comments
Ahi 6 Apr, 2023 @ 4:25pm 
I used the " [] " to put in a info, don't leave that in the code.
For example my snd code was: snd = LoadSound("standkick.ogg")
< >
Showing 1-1 of 1 comments
Per page: 1530 50