local LD = require("design.LevelDesignLibrary")
local lootScriptObj
function OnScriptLoaded(level, obj)
  lootScriptObj = obj:FindSingleGOByName("LootCorpseScript_scrObj")
  if lootScriptObj == nil then
    lootScriptObj = obj:FindSingleGOByName("ConsumableObject")
  end
  if lootScriptObj ~= nil and lootScriptObj.IsRefNode then
    lootScriptObj = lootScriptObj.Child
  end
  if lootScriptObj then
    LD.ForwardUserFunctionToObject(obj, lootScriptObj)
  end
  game.SubObject.Sleep(obj)
  game.SubObject.SetForgetOnCheckpoint(obj)
end
