Dog, on 21 November 2016 - 03:12 AM, said:
I believe it's just rednet.receive(number), and yeah, os.pullEvent doesn't have a timeout. You're probably best using a timer, then act on the event captured with an if/elseif statement.
local myTimer = os.startTimer(5)
while true do
local a, b, c, d, e = os.pullEvent()
if a == "timer" and b == myTimer then --# act when myTimer triggers
--# do timer stuff
elseif a == "myEvent" then --# act when the event you are waiting for triggers
--# do event stuff
end
end
So... I did that.
Now I have a crapload of empty timer events???
literally so many timer events that it looks like this:
http://imgur.com/vZvoTwB
(these events are fired EVERY TICK, but my timer is set to fire every 0.7 seconds).
... So, on the other hand. I'm just going to scrap the timer thing (for now, unless I find a better way). but now the timer things have seemed to stay (Not sure if it is a glitch on CC's hand, because I am using CCtweaks).