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

redstone counter Made andcoded by mysticT

Started by candycool1234, 21 September 2012 - 12:33 AM
candycool1234 #1
Posted 21 September 2012 - 02:33 AM
i give full credit to mysticT :)/>/> thx dude

local sInputSide = "left" – change to the side of the redstone input (where the wire is)

local count = 0
local lastInput = false

while true do
os.pullEvent("redstone")
local input = rs.getInput(sInputSide)
if input ~= lastInput then
if input then
count = count + 1
print(count, " Units you wanna count in or count:")
end
lastInput = input
end
end
NIN3 #2
Posted 21 September 2012 - 02:41 AM
You really didnt need to post this, nor did you need to double post it. The script is not really spectacular, and its really misticTs to post; not to mention that most of the coders who are good at lua can replicate this.
PixelToast #3
Posted 21 September 2012 - 02:53 AM
You really didnt need to post this, nor did you need to double post it. The script is not really spectacular, and its really misticTs to post; not to mention that most of the coders who are good at lua can replicate this.
who cares, let it get buried in the forum posts

the code is somewhat usefull for people new to lua
Mr. Fang #4
Posted 21 September 2012 - 03:15 AM
Not going to lie, I like this thread. Thanx for the code.