Ask a simple question, get a simple answer

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

WAFFLE OF WAR

New Member
Jul 29, 2019
288
0
0
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.
 

unspunreality

New Member
Jul 29, 2019
378
0
0
Solid
Nearly anything that burns in a Furnace may be used to feed a Solid Fuel Firebox.
Bucket of Lava = 1000
Charcoal = 1600
Forestry Peat = 2000
Coal = 3200
Coal Coke = 6400

Liquid
Lava is not a valid liquid fuel, this is intentional.
Creosote Oil = 3200
Forestry Bio-Fuel = 32000
BuildCraft Fuel = 96000

I see this for the steam boiler. Does MFR biofuel count as usable?
 

Adonis0

New Member
Jul 29, 2019
1,800
0
0
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.

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
 

Adonis0

New Member
Jul 29, 2019
1,800
0
0
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()

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
 

WAFFLE OF WAR

New Member
Jul 29, 2019
288
0
0
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
Sweet, thank you so much! Now if only I knew what I was doing...

EDIT; After messing around with it for a bit, I've a question; is there a way to tell it to detect only when he signal is on? Right now, it triggers every time the redstone is changed, be it on -> off or off -> on.
 

unspunreality

New Member
Jul 29, 2019
378
0
0
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=
 

Dr_appleman

Active Member
Jul 29, 2019
64
0
26
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=

depends on the fertilizer if it's mfr fertilizer then a simple animal farm with a sewer connected to a composter but if it's forestry fertilizer you need some apatite.
 

WAFFLE OF WAR

New Member
Jul 29, 2019
288
0
0
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.
 

Adonis0

New Member
Jul 29, 2019
1,800
0
0
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.

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
 

Neirin

New Member
Jul 29, 2019
590
0
0
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.
 

SatanicSanta

New Member
Jul 29, 2019
4,849
-3
0
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.

It isn't my bee. I have never breeded bees before. Can you explain this a little more in depth? Also, the guy whos bees I am using has about 500(0 I can't remember if it is 500 or 5000) valuable bees.
 

Greyed

New Member
Jul 29, 2019
445
0
0
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

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
 

Adonis0

New Member
Jul 29, 2019
1,800
0
0
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

Very good point P:
Now, lets hope we have the syntax right there, and that should be a working attack turtle code which allows them to be toggled on and off with redstone signals.
 

nardavin

New Member
Jul 29, 2019
51
0
0
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.

To make it simple, this is how you switch boolean variables:

variable = not(variable)