The current code will play the sound assigned but only after the in game beep noise is played first.
I am also aware you can disable that sound entirely within the games interface options but I wanted to keep the sound if the user input doesnt satisfy the condition.
Code: Select all
-- Possible to cancel chat beep noise?
script.on_event(defines.events.on_console_chat, function(event)
if (event.message == "yes")
then
game.play_sound({path = "sfx_yes"})
end)