commandblock.setCommand

From ComputerCraft
Jump to navigation Jump to search

commandblock.setCommand
Function
Syntax
commandblock.setCommand()
Returns nil
API commandblock
Source CC:Tweaked (source)

Set the command of a commandblock.

Note Note: The commandblock peripheral is disabled by default. You have to enable it in the config before using it.

ExampleExampleSet command
Set command.
Code
local commandblock = peripheral.find("command")
commandblock.setCommand("kill @a")