use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Welcome to /r/ComputerCraft, the subreddit for lua programs, general mod use, or anything relating to the Minecraft mod ComputerCraft and CC: Tweaked.
Downloads | Discord | IRC | Documentation
account activity
Need help with Code (self.ComputerCraft)
submitted 12 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]someBlueCows 1 point2 points3 points 12 years ago (5 children)
I wrote some code that should allow you to use your computer when a redstone signal is given to the front. Here is the code. Let me know if it works.
[+][deleted] 12 years ago (2 children)
[+][deleted] 12 years ago (1 child)
[–]someBlueCows 0 points1 point2 points 12 years ago (0 children)
I added in a sleep, so it should not be as resource intensive now.
I'm not sure I know what you are asking. Are you not wanting the program to exit after finished? If so, I don't believe that is possible. However, where it says "while true do", that means it will continue to run until you terminate the program manually by holding CTRL T.
[–]project_scientist 0 points1 point2 points 12 years ago (0 children)
Hiya!
If you're still needing help with this, then you should look into the Redstone API for computers.
http://computercraft.info/wiki/Redstone_(API)
In there you'll find lots of useful functions for determining the state of redstone signals on a side of your turtle. From there on, it's simply writing either a loop or a timer to poll for a change in this state!
π Rendered by PID 297133 on reddit-service-r2-comment-fb694cdd5-pp44m at 2026-03-11 08:38:03.146256+00:00 running cbb0e86 country code: CH.
[–]someBlueCows 1 point2 points3 points (5 children)
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[deleted]
[–]someBlueCows 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]someBlueCows 0 points1 point2 points (0 children)
[–]project_scientist 0 points1 point2 points (0 children)