Posted 03 December 2012 - 08:57 AM
Hello I am rather new to Lua and programming in computer craft. I am making a inventory program which acts somewhat like a sorting machine/bank/item retriever.
Essentially, I will have an input computer. Currently it detects red stone pulses which increase the inventory counter but also waits to receive an order from the control computer.
I am doing this via os.pullEvent()
If the computer receives a message then depending on it, will send a message back. Is there a way I can get the parameters of the redstone message on the event without using event, param1, param2, param3 = os.pullEvent() ?
I couldn't find anything pertaining to this when I looked around. Any help would be nice.
Essentially, I will have an input computer. Currently it detects red stone pulses which increase the inventory counter but also waits to receive an order from the control computer.
I am doing this via os.pullEvent()
while true do
event = os.pullevent()
if event == "redstone" then
--do this
elseif event == "redstone_message" then
--do that
end
end
If the computer receives a message then depending on it, will send a message back. Is there a way I can get the parameters of the redstone message on the event without using event, param1, param2, param3 = os.pullEvent() ?
I couldn't find anything pertaining to this when I looked around. Any help would be nice.