EMP - ArjanSeijs/OC_ICBM_Addon GitHub Wiki

EMP Tower documentation

Getting the EMP proxy

By address

local component = require("component")
local emp = component.proxy("xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")

By searching through all the components

local component = require("component")
local emp = nil

for k,v in component.list() do
  local p = component.proxy(k)
  if not (p.isICBM == nil) and p.isICBM("component_emp_tower") then
    emp = p
  end
end

Radar Methods

  • emp.getRadius() : number
    Returns the current radius setting of the EMP Tower.

  • emp.setRadius(r: number)
    Sets the radius of the EMP Tower.

  • emp.isReady() : boolean
    Returns true if the EMP is ready to fire an EMP, false otherwise.

  • emp.launch() : boolean
    Will activiate the EMP tower if the EMP is ready.
    Returns true if it successfully fired, false otherwise.

  • emp.getMode():number
    Gets the mode of the EMP Tower,
    0 = Both, 1 = Missile, 2 = Energy

  • emp.setMode(mode : number)
    Sets the mode of the EMP Tower,
    0 = Both, 1 = Missile, 2 = Energy

Navigation

⚠️ **GitHub.com Fallback** ⚠️