JoonBug03

buggy_trigger

Aug 13th, 2026 (edited)
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | Gaming | 0 0
  1. -- Variables
  2. local x = 0
  3. local args = {...}
  4. local total_pos = tonumber(args[1])
  5. local monitor = peripheral.find("monitor")
  6.  
  7. if monitor then
  8. term.redirect(monitor)
  9. end
  10.  
  11. print("Starting buggy_trigger with " .. total_pos .. " nodes.")
  12.  
  13. while true do
  14. if os.pullEvent("redstone") then
  15. if redstone.getInput("bottom") then
  16. x = x + 1
  17. print("Node " .. x)
  18. shell.run("buggy_rotate", x)
  19. if x == total_pos then
  20. x = 0
  21. end
  22. end
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment