VE Lua Documentation

Press F to search!

detachCoupler

Definition


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

Callers

@/lua/vehicle/controller/advancedCouplerControl.lua
  for _, cnp in ipairs(couplerGroup.couplerNodePairs) do
    obj:detachCoupler(cnp.cid1, 0)
  end
@/lua/vehicle/controller/couplings/fifthwheel.lua
local function detachFifthwheel()
  obj:detachCoupler(fifthwheelNodeCid, 0)
end
@/lua/vehicle/beamstate.lua
    for _, ccid in ipairs(bg) do
      obj:detachCoupler(ccid, math.huge)
    end
    if ((val.couplerLock ~= true or forceLocked) and (val.couplerWeld ~= true or forceWelded) and val.couplerTag and (_nodetag == nil or val.couplerTag == nodetag)) and val.cid then
      obj:detachCoupler(val.cid, 0)
      obj:queueGameEngineLua(string.format("onCouplerDetach(%s,%s)", obj:getId(), val.cid))