Posted 29 August 2012 - 04:47 AM
Please not that I am using computercraft along with other Tekkit equipment, but you don't really need the knowledge of tekkit equipment, it's simple really.
What i'm trying to make is a coins system where the player inputs gold bars through a pipe that will eventually trigger a item detector that will send a pulse to a computercraft computer. For every gold bar that is inputted, I want a counter on my screen that will increase by one. But I can't figure out how to get the counter working. I'm a lua noob so please bear with me.
I have tried things like:
iCount = 0
if event "redstone" and rs.getInput("back") then
iCount = iCount+1
print("Count:"..iCount)
*I do not know how to finish it as I think you need a loop so it will keep checking for a redstone pulse?
Now I know this is bad and you'll probably be rather annoyed, but like I said, I'm new to this and need to learn, so if anyone with the knowledge to be able to do this please guide me through the steps of what to do to make this work? I'm not asking for someone to do this for me, I'm asking for someone to teach me.
What i'm trying to make is a coins system where the player inputs gold bars through a pipe that will eventually trigger a item detector that will send a pulse to a computercraft computer. For every gold bar that is inputted, I want a counter on my screen that will increase by one. But I can't figure out how to get the counter working. I'm a lua noob so please bear with me.
I have tried things like:
iCount = 0
if event "redstone" and rs.getInput("back") then
iCount = iCount+1
print("Count:"..iCount)
*I do not know how to finish it as I think you need a loop so it will keep checking for a redstone pulse?
Now I know this is bad and you'll probably be rather annoyed, but like I said, I'm new to this and need to learn, so if anyone with the knowledge to be able to do this please guide me through the steps of what to do to make this work? I'm not asking for someone to do this for me, I'm asking for someone to teach me.