Posted 24 June 2013 - 03:50 PM
– EDIT –
Okay guys well, I ended up just sitting down with a pen and piece of paper and figured it out, thanks to "Lyqyd" and "Freack100" for creating this into a thread and attempting to help me!
FOR ANYONE WANTING TO KNOW THE SOLUTION I WENT WITH:
Instead of having the turtle "sleep" I simply have him enter a "rednet.receive(60) the 60 is a timeout buffer so if he receives a message within that time he will simply send a message to the next turtle telling him he needs to do the job. If the timeout, times out then it will simply loop back to the very first rednet.receive() that doesn't have a timeout.
If anyone would like further information or even the actual code I used please do not hesitate to ask me!
One more thanks to the guys who helped/ attempted to help ;)/>
ORIGINAL POST
"Here is the issue, I am trying to make a very simple system that will send a rednet message to a turtle telling him there are items in an ender chest that he needs to suck up and then drop down into a machine, the problem is if he gets another message within the time that the first batch of items are still being processed the system will clog up, so I have 5 turtles, 5 machines and 5 enderchests, this should be enough for what I will be using the system for.
The problem is, I want a turtle to receive its orders then go into "notFree" mode, if that is the case it then sends out a rednet message to the next turtle in line the problem I am having is the only way I know to get the turtles/computers to count in seconds is to use the sleep function, but if I tell a turtle to sleep for 60 seconds it completely ignores any incoming rednet messages.
What I need: I need a way for a turtle to count to 60 seconds whilst being able to receive a rednet message. The 60 seconds is just the amount of time I am allowing one machine to process a stack of items.
Thanks in advanced, if you need any additional information then please let me know! ;)/>"
Okay guys well, I ended up just sitting down with a pen and piece of paper and figured it out, thanks to "Lyqyd" and "Freack100" for creating this into a thread and attempting to help me!
FOR ANYONE WANTING TO KNOW THE SOLUTION I WENT WITH:
Instead of having the turtle "sleep" I simply have him enter a "rednet.receive(60) the 60 is a timeout buffer so if he receives a message within that time he will simply send a message to the next turtle telling him he needs to do the job. If the timeout, times out then it will simply loop back to the very first rednet.receive() that doesn't have a timeout.
If anyone would like further information or even the actual code I used please do not hesitate to ask me!
One more thanks to the guys who helped/ attempted to help ;)/>
ORIGINAL POST
"Here is the issue, I am trying to make a very simple system that will send a rednet message to a turtle telling him there are items in an ender chest that he needs to suck up and then drop down into a machine, the problem is if he gets another message within the time that the first batch of items are still being processed the system will clog up, so I have 5 turtles, 5 machines and 5 enderchests, this should be enough for what I will be using the system for.
The problem is, I want a turtle to receive its orders then go into "notFree" mode, if that is the case it then sends out a rednet message to the next turtle in line the problem I am having is the only way I know to get the turtles/computers to count in seconds is to use the sleep function, but if I tell a turtle to sleep for 60 seconds it completely ignores any incoming rednet messages.
What I need: I need a way for a turtle to count to 60 seconds whilst being able to receive a rednet message. The 60 seconds is just the amount of time I am allowing one machine to process a stack of items.
Thanks in advanced, if you need any additional information then please let me know! ;)/>"