-
Notifications
You must be signed in to change notification settings - Fork 2
Missile_Launcher
By address
local component = require("component")
local launcher = component.proxy("xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
By searching through all the components
local component = require("component")
local launcher = nil
for k,v in component.list() do
local p = component.proxy(k)
if not (p.isICBM == nil) and p.isICBM("component_missile_launcher") then
launcher = p
end
end
-
launcher.setDetonationHeight(y : number)
Sets the missile destination height of the missile launcher, only supported by tier 3 and tier 2 launchers, throws exception on 1. -
launcher.getDetonationHeight() : number
Gets the missile destination height of the missile launcher, only supported by tier 3 and tier 2 launchers, throws exception on 1. -
launcher.setFrequency(freq: number)
Set the Frequency of the launcher, only supported by tier 3 launchers, throws exception on tier 2 and 1. -
launcher.getFrequency() : number
Get the Frequency of the launcher, only supported by tier 3 launchers, throws exception on tier 2 and 1. -
launcher.getInaccuracy() : number
Gets the inaccary in block of the launcher, determined by the tier and support frame -
launcher.setLockHeight(height: number)
Set the LockHeight of the launcher, only supported by tier 3 and tier 2 launchers, throws exception on 1. -
launcher.getLockHeight() : number
Get the LockHeight of the launcher, only supported by tier 3 and tier 2 launchers, throws exception on 1. -
launcher.setTargetPos(x : number, z : number)
Sets the missile destination location of the missile launcher -
launcher.getTargetPos() : {x : number, z : number}
Gets the missile destination location of the missile launcher -
launcher.getTier() : number
Gets the launcher tier 1, 2 or 3
-
launcher.isInRange(x : number, y : number) : boolean
Returnstrue
if the position is within the supported range of the missile launcher,false
otherwise. -
launcher.getRange() : number
Gets the maximum range of the missile launcher -
launcher.containsMissile() : boolean
Returnstrue
if a missile is loaded in the missile launcher,false
otherwise. -
launcher.getMissile() : string
Returns name of the missile if a missile is loaded in the missile launcher, nil otherwise.
Possible values are:
Conventional_Missile, Shrapnel_Missile, Incendiary_Missile, Debilitation_Missile, Chemical_Missile, Anvil_Missile, Repulsive_Missile, Attractive_Missile, Fragmentation_Missile, Contagious_Missile, Sonic_Missile, Breaching_Missile, Thermobaric_Missile, Nuclear_Missile, EMP_Missile, Exothermic_Missile, Endothermic_Missile, Anti-Gravitational_Missile, Ender_Missile, Hypersonic_Missile, Antimatter_Missile, Red_Matter_Missile
-
launcher.launch() : boolean
Launches the missile at the location set bylauncher.setTargetPos
. Returnstrue
if the launch succeed,false
otherwise. -
launcher.launch(x : number, z : number) : boolean
Launches the missile at the the x and z coordinates, overwrites the location set bylauncher.setTargetPos
. Returnstrue
if the launch succeed,false
otherwise. -
launcher.launchMissile() : boolean
Alias forlauncher.launch()