GE Lua Documentation

Press F to search!

objectExistsById

Definition


-- @/=[C]:-1
function objectExistsById(...)

Callers

@/lua/ge/extensions/editor/trafficDebug.lua
      for i = trafficAmount, trafficAmount + trafficAmountChange[0], -1 do
        if trafficAiVehsList[i] and scenetree.objectExistsById(trafficAiVehsList[i]) then
          getObjectByID(trafficAiVehsList[i]):delete()
      for i = parkedAmount, parkedAmount + parkingAmountChange[0], -1 do
        if parkedVehsList[i] and scenetree.objectExistsById(parkedVehsList[i]) then
          getObjectByID(parkedVehsList[i]):delete()

  if scenetree.objectExistsById(currId) then
    im.Text("Information")
@/lua/ge/extensions/editor/trafficManager.lua
  for _, id in ipairs(session.lightsSorted) do
    if scenetree.objectExistsById(session.lights[id].spawnedObjectId or 0) then
      scenetree.findObjectById(session.lights[id].spawnedObjectId):delete()

        if not scenetree.objectExistsById(currInstance.spawnedObjectId or 0) then
          im.SameLine()
        if queueDelete then
          if scenetree.objectExistsById(session.lights[currSelection.light].spawnedObjectId or 0) then
            scenetree.findObjectById(session.lights[currSelection.light].spawnedObjectId):delete()
@/lua/ge/ge_utils.lua
scenetree.objectExistsById = function(objectId)
  return Sim.objectExistsById(objectId)
end
@/lua/ge/extensions/freeroam/specialTriggers.lua
  local valid = false
  if scenetree.objectExistsById(vehId) and be:getObjectActive(vehId) then
    if (trigger.subjectIds and arrayFindValueIndex(trigger.subjectIds, vehId)) or
@/lua/ge/extensions/freeroam/bigMapMode.lua
  end
  if not (iconRendererId and scenetree.objectExistsById(iconRendererId)) then
    local iconRenderer = createObject("BeamNGWorldIconsRenderer")