This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
a newbie from doncaster's profile picture

redstone problems

Started by a newbie from doncaster, 07 January 2013 - 06:14 AM
a newbie from doncaster #1
Posted 07 January 2013 - 07:14 AM
I'm completely new to programming of any kind :wacko:/>
I want to create an elevator in tekkit but i wish to also integrate computercraft into my design, however im struggling with the craftOS scripting language :(/>
My question is i want to create a piece of script that when i send a redstone input i want a redstone output coming out of another side lasting 0.5 seconds and repeating however many times i want it to, can anyone help me?
I would like to know how to do this because I want the lift to go up smoothly, rather than the user having to repeatedly press a button, and it being a nuisence since tekkit is about getting rid of manual labour :)/>
PixelToast #2
Posted 07 January 2013 - 07:33 AM
welcome to the forums

you want to use the RS api:
http://computercraft...stone_%28API%29
and the sleep function:

sleep(0.5)
if you want to learn LUA then you can read the manual:
http://www.lua.org/manual/5.1/

and look around the programs section to see how other people did it

you can also use RP's timers if you dont think you are ready for CC
a newbie from doncaster #3
Posted 09 January 2013 - 08:01 AM
Thanks pixel toast, i'll look into it
theoriginalbit #4
Posted 09 January 2013 - 08:27 AM
also just an fyi. on these forums post coding/your program related questions in the "Ask a Pro" section :)/>