So I'm kinda new to modding this game and recently my friends and I stumbled upon this mod called TrainHorn by Benjamin Lee.
It plays a sound to the player who died by a train, but we want it to be played globally.
Code: Select all
script.on_event(defines.events.on_player_died, function(event)
if event.cause ~= nil then
if event.cause.type == 'locomotive' then
for index,player in pairs(game.connected_players) do
player.play_sound{path="ambient/horn.ogg", position = player.position}
end
end
end
end)
However, when we change it to "ambient/horn.ogg" it gives an unknown sound error.
Does anyone know how to make the horn sound a known ambient sound?
I thank you all in advance!
- Theelicht