-- * local variables * --
local val = 10 -- amount to raise/lower the volume by...
-- * text started lower volume * --
function onTextStarted(text)
if not Conditions["music_muted"].ConditionValue then setVolume(eMusicVolume, (getVolume(eMusicVolume) - val)) end
end
-- * text stopped raise volume * --
function onTextStopped(text)
if not Conditions["music_muted"].ConditionValue then setVolume(eMusicVolume, (getVolume(eMusicVolume) + val)) end
end
-- * the event listeners for text start & stop * --
registerEventHandler("textStarted", "onTextStarted")
registerEventHandler("textStopped", "onTextStopped")