VE Lua Documentation

Press F to search!

setDamageTemporary

Definition


-- @/lua/vehicle/damageTracker.lua:71

local function setDamageTemporary(group, name, value, timeoutValue, timeout, notifyUI)
  setDamage(group, name, value, notifyUI)
  temporaryDamageTimeoutTracker[group] = temporaryDamageTimeoutTracker[group] or {}
  temporaryDamageTimeoutTracker[group][name] = {timeout = timeout, timeoutValue = timeoutValue}
end

Callers

@/lua/vehicle/powertrain/manualGearbox.lua
    if device.synchroWear[gearIndex] > 0 and not damageTracker.getDamage("gearbox", "synchroWear") then
      damageTracker.setDamageTemporary("gearbox", "synchroWear", true, false, 2)
    end