Radar - ArjanSeijs/OC_ICBM_Addon GitHub Wiki
By address
local component = require("component")
local radar = component.proxy("xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")By searching through all the components
local component = require("component")
local radar = nil
for k,v in component.list() do
local p = component.proxy(k)
if not (p.isICBM == nil) and p.isICBM("component_radar_station") then
radar = p
end
end-
radar.getFrequency() : number
Returns the frequency the radar operates on. -
radar.setFrequency(frequency : number)
Sets the frequency the radar operates on. -
radar.getSafetyRange() : number
Returns the SafetyRange the radar operates on. -
radar.setSafetyRange(range : number)
Sets the safetyrange of the radar. -
radar.getAlarmRange() : number
Returns the Alarm Range of the radar. -
radar.setAlarmRange(range : number)
Sets the safetyrange of the radar. -
radar.getMissiles() : Table
Returns a table with Missiles currently detected by the radar. The table has the following format
{ {uuid:string, x: number y: number, z : number}, {uuid:string, x: number y: number, z : number}, .... }
Where x,y,z are the coordinates of the missile at the time of the function call and the UUID is a identifier for the missile. -
radar.getIncomingMissiles() : Table
Alias forradar.getMissiles()