GE Lua Documentation

Press F to search!

clearArrows

Definition


-- @/lua/ge/extensions/core/groundMarkerArrows.lua:29

local function clearArrows()
  --log('I', 'arrow', 'Clearing arrows')
  -- Delete all arrow objects through their proxies
  for id, proxy in pairs(arrowProxies) do
    local arrow = scenetree.findObjectById(id)
    if arrow then arrow:delete() end
  end

  -- Clear all tracking tables
  arrowProxies = {}
  wpToArrowId = {}
  arrowToWp = {}
  wrongDirectionCounter = -20

  -- Clean up the pool if it exists
  local arrowPool = scenetree.findObject("arrowPool")
  if arrowPool then
    arrowPool:delete()
  end
end

Callers

@/lua/ge/extensions/core/groundMarkers.lua

  core_groundMarkerArrows.clearArrows()
end
local function onSerialize()
  core_groundMarkerArrows.clearArrows()
end
    else
      core_groundMarkerArrows.clearArrows()
    end