Is it possible to cancel console/chat beep noise on event?

Place to get help with not working mods / modding interface.
YuhBoiChin
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Sep 14, 2022 3:32 am
Contact:

Is it possible to cancel console/chat beep noise on event?

Post by YuhBoiChin »

I am new to modding so bare with me. I was messing around with the console/chat, having different sounds play based on the input. My question is, is there a way to cancel or disable the beep noise that plays and have w.e sound I want play in its place?

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)
Post Reply

Return to “Modding help”