Cruise_Launcher - ArjanSeijs/OC_ICBM_Addon GitHub Wiki
By address
local component = require("component")
local cruise_launcher = component.proxy("xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")By searching through all the components
local component = require("component")
local cruise_launcher = nil
for k,v in component.list() do
local p = component.proxy(k)
if not (p.isICBM == nil) and p.isICBM("component_cruise_launcher") then
cruise_launcher = p
end
end-
launcher.setFrequency(freq: number)
Set the Frequency of the launcher. -
launcher.getFrequency() : number
Get the Frequency of the launcher. -
launcher.setTargetPos(x : number, y : number, z : number)
Sets the missile destination location of the cruise launcher -
launcher.getTargetPos() : {x : number, y : number, z : number}
Gets the missile destination location of the cruise launcher
-
launcher.canLaunch() : boolean
Returnstrueif the cruise launcher is ready to launch the missile,falseotherwise. -
launcher.launch() : boolean
Launches the missile at the location set bylauncher.setTargetPos. Returnstrueif the launch succeed,falseotherwise.