Skip to content

Latest commit

 

History

History
14 lines (13 loc) · 564 Bytes

File metadata and controls

14 lines (13 loc) · 564 Bytes

Use the bell hammer as intended

customEventHooks.registerHandler("OnObjectHit", function(eventStatus, pid, cellDescription, objects)
    if not eventStatus.validCustomHandlers then return end
    for uniqueIndex, object in pairs(objects) do
        local _, _, bellId = string.find(object.refId, "active_6th_bell_0(%d)")
        if bellId then
            local consoleCommand = "PlaySound3D \"bell" .. bellId .. "\""
            logicHandler.RunConsoleCommandOnObject(pid, consoleCommand, cellDescription, uniqueIndex, true)
        end
    end
end)