mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-14 01:39:36 -04:00
Updated Component RedstoneInMotion (markdown)
parent
a95affb85d
commit
67f8dc36d7
@ -18,9 +18,14 @@ Example use:
|
|||||||
```lua
|
```lua
|
||||||
local cc = component.carriage -- get primary carriage controller
|
local cc = component.carriage -- get primary carriage controller
|
||||||
cc.move("up")
|
cc.move("up")
|
||||||
local result, reason = event.pull("carriage_moved")
|
local _, _, result, reason, x, y, z = event.pull("carriage_moved")
|
||||||
if not result then
|
if not result then
|
||||||
print(reason)
|
if x then
|
||||||
|
print(reason)
|
||||||
|
print("Block location: " .. x .. ", " .. y .. ", " .. z)
|
||||||
|
else
|
||||||
|
print(reason)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- using the sides table:
|
-- using the sides table:
|
||||||
cc.simulate(sides.west)
|
cc.simulate(sides.west)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user