plazter, on 30 September 2013 - 06:32 AM, said:
Now could be a good time to pass on your code :b
rednet.open("right")
function f1()
senderID, msg, dis = rednet.receive()
if msg == "attack" then
while true do
turtle.attack()
end
end
end
function f2()
senderID, msg, dis = rednet.receive()
if msg == "dismissed" then
sleep(.5)
shell.run("fight")
end
end
parallel.waitForAny(f1, f2)
I changed it because I thought after reading around that this might work.. regardless, still the same issue. If take out the functions and just have it listen for "attack" and "dismissed" once it gets the signal to attack, it will ignore anything else.