Thanks 😃😃😃
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Using computers as command blocks
Started by jacob.schooley, 12 January 2013 - 07:31 AMPosted 12 January 2013 - 08:31 AM
Is there a way to make a computer perform command block functions, like saying something in the chatbox or giving a player an item, without connecting command blocks through redstone?
Thanks 😃😃😃
Thanks 😃😃😃
Posted 12 January 2013 - 08:36 AM
Not on their own. I think they can wrap command blocks as peripherals, but I'm not sure because I don't really use them.
Posted 12 January 2013 - 08:40 AM
OmegaVest is right, you need to use redstone
Posted 12 January 2013 - 08:44 AM
here is an example of how to use it to teleport the nearest player to 0, 300, 0. place the command block against the back of the computer and run the code
local cmdb=peripheral.wrap("back")
cmdb.setCommand("tp @p 0 300 0")
cmdb.runCommand()
Posted 12 January 2013 - 09:05 AM
here is an example of how to use it to teleport the nearest player to 0, 300, 0. place the command block against the back of the computer and run the codelocal cmdb=peripheral.wrap("back") cmdb.setCommand("tp @p 0 300 0") cmdb.runCommand()
Can you confirm that it works?
Posted 12 January 2013 - 09:21 AM
yep, tested and functional
Posted 19 January 2013 - 05:34 PM
Why can't I access Command Blocks?
Is there additional configuration, plug-ins, etc, required?
I am using:
Minecraft 1.47
MCForge minecraftforge-universal-1.4.7-6.6.0.497.zip
CCcraft 1.481
…and nothing else.
I have a Command Block attached onto each of the computer's six sides.
But the computer refuses to recognize them.
———————————————————-
allsides = redstone.getSides()
for k,side in ipairs(allsides) do
touchable = peripheral.isPresent(side)
print("peripheral on ",side,"? ",touchable)
end
——————————————————–
peripheral on top? false
peripheral on bottom? false
peripheral on front? false
peripheral on back? false
peripheral on left? false
peripheral on right? false
——————————————————–
According to my system, CommandBlocks aren't seen by CCcraft.
Likewise, your code
local cmdb=peripheral.wrap("back")
cmdb.setCommand("tp @p 0 300 0")
cmdb.runCommand()
gives error
attempt to index ? (a nil value) –again it says bock is nonexistent.
Why doesn't the command-block work like a peripheral for me?
Thanks
Is there additional configuration, plug-ins, etc, required?
I am using:
Minecraft 1.47
MCForge minecraftforge-universal-1.4.7-6.6.0.497.zip
CCcraft 1.481
…and nothing else.
I have a Command Block attached onto each of the computer's six sides.
But the computer refuses to recognize them.
———————————————————-
allsides = redstone.getSides()
for k,side in ipairs(allsides) do
touchable = peripheral.isPresent(side)
print("peripheral on ",side,"? ",touchable)
end
——————————————————–
peripheral on top? false
peripheral on bottom? false
peripheral on front? false
peripheral on back? false
peripheral on left? false
peripheral on right? false
——————————————————–
According to my system, CommandBlocks aren't seen by CCcraft.
Likewise, your code
local cmdb=peripheral.wrap("back")
cmdb.setCommand("tp @p 0 300 0")
cmdb.runCommand()
gives error
attempt to index ? (a nil value) –again it says bock is nonexistent.
Why doesn't the command-block work like a peripheral for me?
Thanks
Posted 19 January 2013 - 06:26 PM
in the ComputerCraft config file there is a boolean you have to set to true to use the command blocks as a peripheral…
Posted 23 January 2013 - 03:46 PM
I'm a little disappointed. I was looking forward to a bank of command blocks and wires.