-
Notifications
You must be signed in to change notification settings - Fork 0
ComputerCraft
Plomph edited this page Sep 15, 2026
·
3 revisions
With CC: Tweaked installed, a Transmission next to a computer, or on a wired modem, is a transmission peripheral.
| Method | Returns |
|---|---|
getGear() |
the current gear, 1 to 4
|
setGear(n) |
true, or false and a reason |
shiftUp(), shiftDown()
|
true, or false and a reason |
getDirection() |
"forward", "reverse" or "neutral"
|
setDirection(d) |
true, or false and a reason |
getGearSpeeds() |
the four gear speeds in RPM |
setGearSpeed(n, rpm) |
the speed stored (kept within 1–256) |
getInputSpeed(), getOutputSpeed()
|
RPM |
A direction set by a computer holds until a Forward or Reverse face is powered.
Refusal reasons:
| Reason | Meaning |
|---|---|
cooldown |
shifted too recently |
limit |
already in 1st or 4th gear |
redstone_override |
a Forward or Reverse face is powered |
local t = peripheral.find("transmission")
t.setGearSpeed(1, 48)
t.setDirection("forward")
local ok, reason = t.setGear(2)
if not ok then print("refused: " .. reason) end
print(t.getGear(), t.getOutputSpeed() .. " RPM")