local thisObj
function OnScriptLoaded(level, obj)
  thisObj = obj
  if obj.Parent.IsRefNode == false then
    engine.error("In " .. obj:GetName() .. " Helheim Dead Zone script is not being used in a refnoded module!!! ", level)
    return
  end
  game.SubObject.SetEntityZoneHandler(obj, obj.Parent.Parent)
  game.SubObject.SetForgetOnCheckpoint(obj)
  game.SubObject.Sleep(obj)
end
function OnMarkerEnterZone(level, scriptObj, volumeGameObject, markerGameObject, markerId)
  if game.LargeInteger.HashString("Heldead") == markerId or game.LargeInteger.HashString("Heldead") == game.LargeInteger.HashString(tostring(markerId)) then
    if markerGameObject.Parent.Parent.LuaObjectScript == nil then
      local LD = require("design.LevelDesignLibrary")
      engine.error("OnMarkerEnterZone: Helheim Dead Zone " .. LD.GetParentTrace(thisObj) .. " has Nil LuaObjectScript on Helheim Dead spawner: " .. LD.GetParentTrace(markerGameObject.Parent.Parent))
    else
      markerGameObject.Parent.Parent.LuaObjectScript.IncrementZoneObjCount("Character")
    end
  end
end
function OnMarkerExitZone(level, scriptObj, volumeGameObject, markerGameObject, markerId)
  if game.LargeInteger.HashString("Heldead") == markerId or game.LargeInteger.HashString("Heldead") == game.LargeInteger.HashString(tostring(markerId)) then
    if markerGameObject.Parent.Parent.LuaObjectScript == nil then
      local LD = require("design.LevelDesignLibrary")
      engine.error("OnMarkerEnterZone: Helheim Dead Zone " .. LD.GetParentTrace(thisObj) .. " has Nil LuaObjectScript on Helheim Dead spawner: " .. LD.GetParentTrace(markerGameObject.Parent.Parent))
    else
      markerGameObject.Parent.Parent.LuaObjectScript.DecrementZoneObjCount()
    end
  end
end
