I am trying to make a program with the bee analyzer in MiscPeripherals and since the block doesn't give any events when there is a bee inside or not or if there is a different bee, I need to make that event my self.
I am trying to make the program wait for a variable that is true to be false. No it only loops all the time saying the variable is true over and over again.
bee = peripheral.wrap("left")
t = bee.analyze()
--print(t)
isbee = bee.isBee()
test = 1
check = true
while true do
if isbee == true and check == true then
check = false
print(check)
for key,value in pairs(t) do
print(key,value)
end
elseif isbee == false and check == false then
check = true
print("Setting Check to TRUE!!")
elseif isbee == true and check == false then
else
end
--print(test)
--test = test + 1
--print("Effects: "..t["effect"])
--sleep(2)
os.queueEvent("isbee",isbee)
event, p1,p2,p3 = os.pullEvent("isbee")
print(event)
print(p1)
print(p2)
print(p3)
end
Thanks :)/>