This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
computercraftrules89's profile picture

How to use these commands

Started by computercraftrules89, 05 November 2012 - 04:09 AM
computercraftrules89 #1
Posted 05 November 2012 - 05:09 AM
ComputerCraft
Missile launchers (both cruise and conventional) can be controlled with a ComputerCraft computer. Functions avaliable are:

launch() - Launchs the missile to the target.
getTarget() - Returns a table with the 3 value of the coord.
setTarget(x, y, z) - Sets the target to the specific coord.
setFrequency(frequency) - Sets the frequency of the launcher of it if it is tier three.
getFrequency() - Gets the frequency of the launcher.
Radars will also be able to return detected missile coords and such as long as it is powered by electricity.

getMissiles() - Gets all detected missiles from this radar station and returns a table with the coordinates for each of them. Table orders in x, y, z per missile.
getRadars() - Gets all detected radars from this radar station and return a table with the coordinates for each of them. Table orders in x, y, z per radar.
ICBM peripherals need to be controlled in a specific way. You have to first place a computer next to an ICBM peripheral. Then type in the command:

p = peripheral.wrap("left")


Would like to know how to use these above commands in computer craft so i can make a program to launch missles.
Leo Verto #2
Posted 05 November 2012 - 05:47 AM
Please explain what you are trying to do, which mods you're using and don't just copy/paste the CC integration instructions from the ICBM page.

Place a computer next to a launcher, edit a new program and type in some code similar to this:

launcher = peripheral.warp("right") --replace with the side of the computer attached to the launcher
launcher.setTarget(100, 70, -30) --replace with target coordinates
launcher.launch()
launcher ist just a variable, you can also do that with radars, just wrap them the same way as launchers.
computercraftrules89 #3
Posted 05 November 2012 - 06:54 AM
Im sorry i put this in the wrong section put it under tutorials.

Strange thing is im wanting a tutorial on how to use the commands.

Ive tried what you say above and i get the following error

launcher:3: attempt to index ? (a nil value)

heres my code and i called the program launcher

launcher = peripheral.wrap("left")
launcher.setTarget(567, 70, -201)
Leo Verto #4
Posted 05 November 2012 - 06:59 AM
That are only 2 lines, could you post the 3rd one too?
Cruor #5
Posted 05 November 2012 - 06:59 AM
D: moved to Ask a Pro
computercraftrules89 #6
Posted 05 November 2012 - 07:04 AM
launcher = peripheral.wrap("left") –console is on the left
launcher.setTarget(100, 70, -30)
launcher.launch(0)

still get the same error as before

am i ment to have any sort of program like an API loaded for this to work the guy for ICBM mod didnt really explain what to do.
Leo Verto #7
Posted 05 November 2012 - 07:06 AM
launch() doesn't need any parameters, remove the 0.
computercraftrules89 #8
Posted 05 November 2012 - 07:15 AM
nope still doesnt work if i remove it

still get

launcher:2: attempt to index ? (a nil value)

using this code

launcher = peripheral.wrap("left")
launcher.setTarget(100, 70, -30)
launcher.launch()
Leo Verto #9
Posted 05 November 2012 - 07:17 AM
Ok, what kind of launcher/launcher control panel are you using?
computercraftrules89 #10
Posted 05 November 2012 - 07:19 AM
launcher control panel T3
launcher platform T3
computercraftrules89 #11
Posted 05 November 2012 - 07:30 AM
Duno why it doesnt work for me its weird.
Leo Verto #12
Posted 05 November 2012 - 07:33 AM
Works for me, which version of ICBM do you use?
computercraftrules89 #13
Posted 05 November 2012 - 07:37 AM
well am using it through Tekkit.

maybe thats why.

using an old as version 0.4.1
as tekkit uses minecraft 1.2.5
Leo Verto #14
Posted 05 November 2012 - 07:42 AM
That's the problem, CC Integration has been added to ICBM in v0.5.7.

Just a general tip: Stop using tekkit, there are loads of new CC features in the current versions and 1.33 is rarely supported.
computercraftrules89 #15
Posted 05 November 2012 - 07:48 AM
well ive got minecraft 1.4.2 with forge 6.0.1.355 installed and 40 mods including computer craft

I just downloaded ICBM Basic Components and Universal electricity the game works and loaded up even says the mod is loaded but i cannot build anything in ICBM.
Leo Verto #16
Posted 05 November 2012 - 07:49 AM
Don't download UE, it's just an API now.
computercraftrules89 #17
Posted 05 November 2012 - 07:51 AM
Nevermind Not Enough Items was hiding them from me
computercraftrules89 #18
Posted 05 November 2012 - 07:54 AM
Thanks for the help and yeah i only play tekkit because it has the condenser and energy link and things like that its the only way i know to make a safe nuclear reactor following this tutorial.

http://thetekkit.wikia.com/wiki/Tutorial_/_Safe,_Easy,_%26_Powerful_Nuclear_Reactor
Doyle3694 #19
Posted 05 November 2012 - 07:17 PM
That's what they tell you, but they are still lacking a few… Back to subject though!
Cruor #20
Posted 05 November 2012 - 08:18 PM
BAAAAAH Tekkit wars *poof*. Aaaand nothing to see here
Doyle3694 #21
Posted 05 November 2012 - 08:37 PM
Yeah dont let it slip and start tekkit wars… let's just let the thread drip down into the deep pit of inactive threads
PixelToast #22
Posted 05 November 2012 - 08:42 PM
-snip- sorry
computercraftrules89 #23
Posted 06 November 2012 - 02:43 PM
Sorry I haven't been able to reply for a while have been studying and I hate the tutor that would of been teaching me today if I went.

Anyway thanks for all the help I got the above commands going on Minecraft.

I love both Tekkit and Minecraft I played Technic but thought that was just crazy weird as birds and beast walking around.

Lastly thanks to everyone who helped out and the nice and friendly mods.

The guys over at Forge could learn from use I had a post there and because I didn't get back to it within a day they locked my post down on me.

Figured it all out in the end I'm guessing it wasn't all my fault as the server sending the files needed through FML was down and I'd load the game and get a black screen.

The one last thing I'd like to know is can you keep re-enriching uranium if you build a birth- er reactor.
Leo Verto #24
Posted 07 November 2012 - 03:57 AM
I don think so, Atomic Science is currently in an alpha stage, but Calclavia is adding a new type of reactor this week (Plasma!)