Is there a way for a Turtle to check for a redstone signal? I need it in a program to run 24/7, and every time it gets a signal, (specifically, a pipe signal) to run the program.
Is there a way for a Turtle to check for a redstone signal? I need it in a program to run 24/7, and every time it gets a signal, (specifically, a pipe signal) to run the program.
If "rednet" is the equivalent of redstone, than that's exactly what I need. But, is it?I think there is a command somewhere along the lines of os.pullevent(redstone) and that will activate every time the redstone signal changes state.
You should be able to look it up on the computercraft wiki with that now
If "rednet" is the equivalent of redstone, than that's exactly what I need. But, is it?
http://www.computercraft.info/wiki/Receiving_a_rednet_message_through_os.pullEvent()
Sweet, thank you so much! Now if only I knew what I was doing...Rednet is the wireless api computercraft uses. You can use it to get computers to talk to each other like a normal wireless network so to speak.
This is what you're after http://www.computercraft.info/wiki/Redstone_(event)
EDIT: And the os.pullevent page just for good measure too http://www.computercraft.info/wiki/Os.pullEvent
Ahh crap. Found a flaw in my plan. I need infinite fertilizer. Infinite seeds is easy once mfr gets started, but how do I get fertilizer. I only have about 40 stacks of it. D=
For CC Turtles, is there a way to get either a Boolean or an int to toggle back and forth? I was it to say that the redstone signal is "on" or "off" and wanted to use a variable of some sorts that just switched between 1 and 0 or true and false to judge this.
Value = false
While true do
If os.pullevent("redstone") then
Value = not(Value)
end
While Value do
if os.pull event("redstone") then
Value = not(Value)
end
turtle.attack()
Sleep(1)
End
Sleep(1)
End
Breed your valuable drone for a few cycles and you should hopefully be able to stabilize the genome so you only need to deal with purebred princesses/drones.Is it possible to get a Valuable Queen from either a Valuable Drone or a serum?
Breed your valuable drone for a few cycles and you should hopefully be able to stabilize the genome so you only need to deal with purebred princesses/drones.
You can also get the species serum from the drone, but I'd still recommend breeding it for a few cycles so you have more than one bee available in case it gets destroyed in the process of making the serum.
Been a while since I coded, but perhaps you could do something like this, I think that'd be about the program you're looking for
Code:Value = false While true do If os.pullevent("redstone") then Value = not(Value) end While Value do if os.pull event("redstone") then Value = not(Value) end turtle.attack() Sleep(1) End Sleep(1) End
Attack = False
While true do
if Attack then
turtle.attack(1)
end
if os.pull event("redstone") then
Attack = not(Attack)
end
Sleep(1)
end
Ouch, just... Ouch. Why two loops when one will do. Mind you I don't do LUA so this'll be following your form.
Code:Attack = False While true do if Attack then turtle.attack(1) end if os.pull event("redstone") then Attack = not(Attack) end Sleep(1) end
For CC Turtles, is there a way to get either a Boolean or an int to toggle back and forth? I was it to say that the redstone signal is "on" or "off" and wanted to use a variable of some sorts that just switched between 1 and 0 or true and false to judge this.
nardavin wins the page 200 award!
I was out from one post for wining this D:nardavin wins the page 200 award!