I'm making my own version of the DW20 mining well system.
I've been writing my own code until i've now ran in to a problem.
When the Mining turtels are done the use the command:
rednet.broadcast("done")
I want the main turtel, that sends out the
rednet.broadcast("start")
command to wait for ALL mining turtels until it proceeds to the next step.Currently its looking like this: (main turtle)
local times = 0
term.write("How many times would you like to run:")
times = read()
for i = 0, times do
rednet.broadcast("start")
place()
local event, id, msg = os.pullEvent("rednet_message")
if msg == "done" then
remove()
So i would like the main turtle to wait for X amount of broadcasted "done" messages, is that possible?
Thanks in advance!
/Molo
EDIT: Check end of thread for solution!












