Using sound - NLferdiNL/Teardown-Chaos-Mod GitHub Wiki
If you want to implement sound effects into your effect. You have to add them to the effectSFX table in your effect. The mod will then turn those sound effects into handles on startup. This way you can just call them through your vars. Below is an example of an effect using SFX.
knocking = {
name = "Who's there?",
effectDuration = 15,
effectLifetime = 0,
hideTimer = false,
effectSFX = {{isLoop = false, soundPath = "MOD/sfx/knock.ogg"}},
effectSprites = {},
effectVariables = {},
onEffectStart = function(vars)
PlaySound(vars.effectSFX[1])
end,
onEffectTick = function(vars) end,
onEffectEnd = function(vars) end,
},